From e2ce97a34b16fc99d894c86e91f9d8d90f9c2843 Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Fri, 10 Nov 2023 11:49:10 +0100 Subject: [PATCH 1/9] WIP --- package.json | 3 + .../rule_details/rule_details_flyout.tsx | 13 +- .../components/rule_details/rule_diff_tab.tsx | 173 ++++++++++++++++++ .../rule_details/rule_diff_tab_2.tsx | 124 +++++++++++++ .../components/rule_details/translations.ts | 7 + .../upgrade_prebuilt_rules_table_context.tsx | 30 ++- yarn.lock | 88 ++++++++- 7 files changed, 430 insertions(+), 8 deletions(-) create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx diff --git a/package.json b/package.json index bb666f88f738d..e347968d06821 100644 --- a/package.json +++ b/package.json @@ -1017,6 +1017,9 @@ "react": "^17.0.2", "react-ace": "^7.0.5", "react-color": "^2.13.8", + "react-diff-view": "^3.1.0", + "react-diff-viewer": "^3.1.1", + "react-diff-viewer-continued": "^3.3.1", "react-dom": "^17.0.2", "react-dropzone": "^4.2.9", "react-fast-compare": "^2.0.4", diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx index aa221b6cdb147..8d6ef88d92c74 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx @@ -95,7 +95,7 @@ const tabPaddingClassName = css` padding: 0 ${euiThemeVars.euiSizeM} ${euiThemeVars.euiSizeXL} ${euiThemeVars.euiSizeM}; `; -const TabContentPadding: React.FC = ({ children }) => ( +export const TabContentPadding: React.FC = ({ children }) => (
{children}
); @@ -104,6 +104,7 @@ interface RuleDetailsFlyoutProps { ruleActions?: React.ReactNode; dataTestSubj?: string; closeFlyout: () => void; + getRuleTabs?: (rule: RuleResponse, defaultTabs: EuiTabbedContentTab[]) => EuiTabbedContentTab[]; } export const RuleDetailsFlyout = ({ @@ -111,6 +112,7 @@ export const RuleDetailsFlyout = ({ ruleActions, dataTestSubj, closeFlyout, + getRuleTabs, }: RuleDetailsFlyoutProps) => { const { expandedOverviewSections, toggleOverviewSection } = useOverviewTabSections(); @@ -145,12 +147,13 @@ export const RuleDetailsFlyout = ({ ); const tabs = useMemo(() => { + const defaultTabs = [overviewTab]; if (rule.note) { - return [overviewTab, investigationGuideTab]; - } else { - return [overviewTab]; + defaultTabs.push(investigationGuideTab); } - }, [overviewTab, investigationGuideTab, rule.note]); + + return getRuleTabs ? getRuleTabs(rule, defaultTabs) : defaultTabs; + }, [overviewTab, investigationGuideTab, rule, getRuleTabs]); const [selectedTabId, setSelectedTabId] = useState(tabs[0].id); const selectedTab = tabs.find((tab) => tab.id === selectedTabId) ?? tabs[0]; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx new file mode 100644 index 0000000000000..37bd449fa3392 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx @@ -0,0 +1,173 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useMemo } from 'react'; +// import { Change, diffChars, diffLines, diffWords } from 'diff'; +import { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { EuiSpacer, useEuiBackgroundColor, tint } from '@elastic/eui'; +import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; + +const indicatorCss = css` + position: absolute; + width: ${euiThemeVars.euiSizeS}; + height: 100%; + margin-left: calc(-${euiThemeVars.euiSizeS} - calc(${euiThemeVars.euiSizeXS} / 2)); + text-align: center; + line-height: ${euiThemeVars.euiFontSizeM}; + font-weight: ${euiThemeVars.euiFontWeightMedium}; +`; + +const matchIndicatorCss = css` + &:before { + content: '+'; + ${indicatorCss} + background-color: ${euiThemeVars.euiColorSuccess}; + color: ${euiThemeVars.euiColorLightestShade}; + } +`; + +const diffIndicatorCss = css` + &:before { + content: '-'; + ${indicatorCss} + background-color: ${tint(euiThemeVars.euiColorDanger, 0.25)}; + color: ${euiThemeVars.euiColorLightestShade}; + } +`; + +const DiffSegment = ({ + change, + diffMode, + showDiffDecorations, +}: // matchCss, +// diffCss, +{ + change: Change; + diffMode: 'lines' | undefined; + showDiffDecorations: boolean | undefined; + // matchCss: ReturnType; + // diffCss: ReturnType; +}) => { + const matchBackgroundColor = useEuiBackgroundColor('success'); + const diffBackgroundColor = useEuiBackgroundColor('danger'); + + const matchCss = css` + background-color: ${matchBackgroundColor}; + color: ${euiThemeVars.euiColorSuccessText}; + `; + const diffCss = css` + background-color: ${diffBackgroundColor}; + color: ${euiThemeVars.euiColorDangerText}; + `; + + const highlightCss = useMemo( + () => (change.added ? matchCss : change.removed ? diffCss : undefined), + [change.added, change.removed, diffCss, matchCss] + ); + + const paddingCss = useMemo(() => { + if (diffMode === 'lines') { + return css` + padding-left: calc(${euiThemeVars.euiSizeXS} / 2); + `; + } + }, [diffMode]); + + const decorationCss = useMemo(() => { + if (!showDiffDecorations) { + return undefined; + } + + if (diffMode === 'lines') { + if (change.added) { + return matchIndicatorCss; + } else if (change.removed) { + return diffIndicatorCss; + } + } else { + if (change.added) { + return css` + text-decoration: underline; + `; + } else if (change.removed) { + return css` + text-decoration: line-through; + `; + } + } + }, [change.added, change.removed, diffMode, showDiffDecorations]); + + return ( +
+ {change.value} +
+ ); +}; + +interface RuleDiffTabProps { + fields: RuleFieldsDiff; +} + +export const RuleDiffTab = ({ fields }: RuleDiffTabProps) => { + // console.log(fields, diffLines); + + const matchBackgroundColor = useEuiBackgroundColor('success'); + const diffBackgroundColor = useEuiBackgroundColor('danger'); + + if (!fields.references) { + return null; + } + + const matchCss = css` + background-color: ${matchBackgroundColor}; + color: ${euiThemeVars.euiColorSuccessText}; + `; + const diffCss = css` + background-color: ${diffBackgroundColor}; + color: ${euiThemeVars.euiColorDangerText}; + `; + + // console.log( + // 'DIFIF', + // JSON.stringify(fields.references.current_version), + // JSON.stringify(fields.references.merged_version) + // ); + + // const diff = diffLines( + // JSON.stringify(fields.references.current_version, null, 2), + // JSON.stringify(fields.references.merged_version, null, 2), + // { ignoreWhitespace: false } + // ); + + // console.log('!!!DIFF', diff); + + return ( + <> + + {diff.map((change, i) => ( + + ))} + + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx new file mode 100644 index 0000000000000..c91f90015e4e5 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx @@ -0,0 +1,124 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; +// import ReactDiffViewer from 'react-diff-viewer'; +import ReactDiffViewer from 'react-diff-viewer-continued'; +import { + EuiSpacer, + EuiAccordion, + EuiTitle, + EuiFlexGroup, + EuiHorizontalRule, + useGeneratedHtmlId, +} from '@elastic/eui'; +import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; + +import * as i18n from './translations'; + +interface ExpandableSectionProps { + title: string; + isOpen: boolean; + toggle: () => void; + children: React.ReactNode; +} + +const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { + const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); + + return ( + +

{title}

+ + } + initialIsOpen={true} + > + + + {children} + +
+ ); +}; + +interface RuleDiffTabProps { + fields: Partial; +} + +export const RuleDiffTab = ({ fields }: RuleDiffTabProps) => { + const [openSections, setOpenSections] = useState>( + Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) + ); + + const toggleSection = (sectionName: string) => { + setOpenSections((prevOpenSections) => ({ + ...prevOpenSections, + [sectionName]: !prevOpenSections[sectionName], + })); + }; + + if (!fields.references && !fields.risk_score) { + return null; + } + + return ( + <> + + { + toggleSection('eql_query'); + }} + > + + + + { + toggleSection('references'); + }} + > + + + + { + toggleSection('risk_score'); + }} + > + + + + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/translations.ts index 1d159bf24a392..b1d3af9321429 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/translations.ts @@ -21,6 +21,13 @@ export const INVESTIGATION_GUIDE_TAB_LABEL = i18n.translate( } ); +export const DIFF_TAB_LABEL = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleDetails.diffTabLabel', + { + defaultMessage: 'Updates', + } +); + export const DISMISS_BUTTON_LABEL = i18n.translate( 'xpack.securitySolution.detectionEngine.ruleDetails.dismissButtonLabel', { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx index 290f85ade3a03..238201c2440f0 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx @@ -24,11 +24,18 @@ import type { UpgradePrebuiltRulesTableFilterOptions } from './use_filter_prebui import { useFilterPrebuiltRulesToUpgrade } from './use_filter_prebuilt_rules_to_upgrade'; import { useAsyncConfirmation } from '../rules_table/use_async_confirmation'; import { useRuleDetailsFlyout } from '../../../../rule_management/components/rule_details/use_rule_details_flyout'; -import { RuleDetailsFlyout } from '../../../../rule_management/components/rule_details/rule_details_flyout'; +import { + RuleDetailsFlyout, + TabContentPadding, +} from '../../../../rule_management/components/rule_details/rule_details_flyout'; import * as i18n from './translations'; import { MlJobUpgradeModal } from '../../../../../detections/components/modals/ml_job_upgrade_modal'; +// import { RuleDiffTab } from '../../../../rule_management/components/rule_details/rule_diff_tab'; +import { RuleDiffTab } from '../../../../rule_management/components/rule_details/rule_diff_tab_2'; +// import * as ruleDetailsI18n from '../../../../rule_management/components/rule_details/translations.ts'; + export interface UpgradePrebuiltRulesTableState { /** * Rules available to be updated @@ -257,6 +264,8 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ actions, ]); + // console.log('ReactDiffViewer pre', ReactDiffViewer); + return ( <> @@ -286,6 +295,25 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ {i18n.UPDATE_BUTTON_LABEL} } + getRuleTabs={(rule, defaultTabs) => { + const diff = filteredRules.find(({ id }) => rule.id)?.diff; + + if (!diff) { + return defaultTabs; + } + + const diffTab = { + id: 'diff', + name: 'ruleDetailsI18n.DIFF_TAB_LABEL', + content: ( + + + + ), + }; + + return [diffTab, ...defaultTabs]; + }} /> )} diff --git a/yarn.lock b/yarn.lock index e6b6c9eeef668..b1ccf99cdb77d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1887,6 +1887,17 @@ "@emotion/sheet" "^1.2.2" "@emotion/utils" "^1.2.1" +"@emotion/css@^11.11.2": + version "11.11.2" + resolved "https://registry.yarnpkg.com/@emotion/css/-/css-11.11.2.tgz#e5fa081d0c6e335352e1bc2b05953b61832dca5a" + integrity sha512-VJxe1ucoMYMS7DkiMdC2T7PWNbrEI0a39YRiyDvK2qq4lXwjRbVP/z4lpG+odCsRzadlR+1ywwrTzhdm5HNdew== + dependencies: + "@emotion/babel-plugin" "^11.11.0" + "@emotion/cache" "^11.11.0" + "@emotion/serialize" "^1.1.2" + "@emotion/sheet" "^1.2.2" + "@emotion/utils" "^1.2.1" + "@emotion/hash@0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" @@ -13624,6 +13635,16 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" +create-emotion@^10.0.14, create-emotion@^10.0.27: + version "10.0.27" + resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-10.0.27.tgz#cb4fa2db750f6ca6f9a001a33fbf1f6c46789503" + integrity sha512-fIK73w82HPPn/RsAij7+Zt8eCE8SptcJ3WoRMfxMtjteYxud8GDTKKld7MYwAX2TVhrw29uR1N/bVGxeStHILg== + dependencies: + "@emotion/cache" "^10.0.27" + "@emotion/serialize" "^0.11.15" + "@emotion/sheet" "0.9.4" + "@emotion/utils" "0.11.3" + create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -14868,7 +14889,7 @@ diacritics@^1.3.0: resolved "https://registry.yarnpkg.com/diacritics/-/diacritics-1.3.0.tgz#3efa87323ebb863e6696cebb0082d48ff3d6f7a1" integrity sha1-PvqHMj67hj5mls67AILUj/PW96E= -diff-match-patch@^1.0.0, diff-match-patch@^1.0.4: +diff-match-patch@^1.0.0, diff-match-patch@^1.0.4, diff-match-patch@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37" integrity sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw== @@ -14908,6 +14929,11 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +diff@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" + integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== + diffie-hellman@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" @@ -15393,6 +15419,14 @@ emoticon@^3.2.0: resolved "https://registry.yarnpkg.com/emoticon/-/emoticon-3.2.0.tgz#c008ca7d7620fac742fe1bf4af8ff8fed154ae7f" integrity sha512-SNujglcLTTg+lDAcApPNgEdudaqQFiAbJCqzjNxJkvN9vAwCGi0uu8IUVvx+f16h+V44KCY6Y2yboroc9pilHg== +emotion@^10.0.14: + version "10.0.27" + resolved "https://registry.yarnpkg.com/emotion/-/emotion-10.0.27.tgz#f9ca5df98630980a23c819a56262560562e5d75e" + integrity sha512-2xdDzdWWzue8R8lu4G76uWX5WhyQuzATon9LmNeCy/2BHVC6dsEpfhN1a0qhELgtDVdjyEA6J8Y/VlI5ZnaH0g== + dependencies: + babel-plugin-emotion "^10.0.27" + create-emotion "^10.0.27" + enabled@2.0.x: version "2.0.0" resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" @@ -17475,6 +17509,11 @@ git-hooks-list@1.0.3: resolved "https://registry.yarnpkg.com/git-hooks-list/-/git-hooks-list-1.0.3.tgz#be5baaf78203ce342f2f844a9d2b03dba1b45156" integrity sha512-Y7wLWcrLUXwk2noSka166byGCvhMtDRpgHdzCno1UQv/n/Hegp++a2xBWJL1lJarnKD3SWaljD+0z1ztqxuKyQ== +gitdiff-parser@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/gitdiff-parser/-/gitdiff-parser-0.3.1.tgz#5eb3e66eb7862810ba962fab762134071601baa5" + integrity sha512-YQJnY8aew65id8okGxKCksH3efDCJ9HzV7M9rsvd65habf39Pkh4cgYJ27AaoDMqo1X98pgNJhNMrm/kpV7UVQ== + github-from-package@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" @@ -21830,6 +21869,11 @@ memfs@^3.1.2, memfs@^3.4.3: resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== +memoize-one@^5.0.4: + version "5.2.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" + integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== + memoize-one@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" @@ -25305,6 +25349,41 @@ react-colorful@^5.1.2: resolved "https://registry.yarnpkg.com/react-colorful/-/react-colorful-5.5.1.tgz#29d9c4e496f2ca784dd2bb5053a3a4340cfaf784" integrity sha512-M1TJH2X3RXEt12sWkpa6hLc/bbYS0H6F4rIqjQZ+RxNBstpY67d9TrFXtqdZwhpmBXcCwEi7stKqFue3ZRkiOg== +react-diff-view@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/react-diff-view/-/react-diff-view-3.1.0.tgz#d8c6eb2108179c7bf99c202ba70dcc9ec673c0e2" + integrity sha512-xIouC5F8gSXJ4DNlZWjyGyqRT9HVQ6v6Fo2ko+XDQpRmsJjYcd32YiQnCV1kwXOjoWPfhTCouyFT3dgyOZpRgA== + dependencies: + classnames "^2.3.2" + diff-match-patch "^1.0.5" + gitdiff-parser "^0.3.1" + lodash "^4.17.21" + shallow-equal "^3.1.0" + warning "^4.0.3" + +react-diff-viewer-continued@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/react-diff-viewer-continued/-/react-diff-viewer-continued-3.3.1.tgz#1ef6af86fc92ad721a5461f8f3c44f74381ea81d" + integrity sha512-YhjWjCUq6cs8k9iErpWh/xB2jFCndigGAz2TKubdqrSTtDH5Ib+tdQgzBWVXMMqgtEwoPLi+WFmSsdSoYbDVpw== + dependencies: + "@emotion/css" "^11.11.2" + classnames "^2.3.2" + diff "^5.1.0" + memoize-one "^6.0.0" + prop-types "^15.8.1" + +react-diff-viewer@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/react-diff-viewer/-/react-diff-viewer-3.1.1.tgz#21ac9c891193d05a3734bfd6bd54b107ee6d46cc" + integrity sha512-rmvwNdcClp6ZWdS11m1m01UnBA4OwYaLG/li0dB781e/bQEzsGyj+qewVd6W5ztBwseQ72pO7nwaCcq5jnlzcw== + dependencies: + classnames "^2.2.6" + create-emotion "^10.0.14" + diff "^4.0.1" + emotion "^10.0.14" + memoize-one "^5.0.4" + prop-types "^15.6.2" + react-docgen-typescript@^2.0.0, react-docgen-typescript@^2.1.1: version "2.2.2" resolved "https://registry.yarnpkg.com/react-docgen-typescript/-/react-docgen-typescript-2.2.2.tgz#4611055e569edc071204aadb20e1c93e1ab1659c" @@ -27176,6 +27255,11 @@ shallow-copy@~0.0.1: resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170" integrity sha1-QV9CcC1z2BAzApLMXuhurhoRoXA= +shallow-equal@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-3.1.0.tgz#e7a54bac629c7f248eff6c2f5b63122ba4320bec" + integrity sha512-pfVOw8QZIXpMbhBWvzBISicvToTiM5WBF1EeAUZDDSb5Dt29yl4AYbyywbJFSEsRUMr7gJaxqCdr4L3tQf9wVg== + shallowequal@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" @@ -30484,7 +30568,7 @@ walker@^1.0.7, walker@^1.0.8, walker@~1.0.5: dependencies: makeerror "1.0.12" -warning@^4.0.2: +warning@^4.0.2, warning@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== From 9c6d8b426c64d507fdaf2d8f66b6550f5de1266c Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Wed, 22 Nov 2023 15:47:21 +0100 Subject: [PATCH 2/9] Hack together a few PoCs with different libs --- package.json | 3 + .../shared-ux/code_editor/code_editor.tsx | 42 +- response.json | 110592 +++++++++++++++ .../components/rule_details/rule_diff_tab.tsx | 46 +- .../rule_details/rule_diff_tab_1.tsx | 313 + .../rule_details/rule_diff_tab_2.tsx | 171 +- .../rule_details/rule_diff_tab_3.tsx | 625 + .../rule_details/rule_diff_tab_4.tsx | 251 + .../rule_details/rule_diff_tab_5.tsx | 240 + .../upgrade_prebuilt_rules_table_context.tsx | 79 +- yarn.lock | 74 +- 11 files changed, 112317 insertions(+), 119 deletions(-) create mode 100644 response.json create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_1.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_3.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_4.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_5.tsx diff --git a/package.json b/package.json index e347968d06821..5fec36e5c13c3 100644 --- a/package.json +++ b/package.json @@ -910,6 +910,7 @@ "deep-freeze-strict": "^1.1.1", "deepmerge": "^4.2.2", "del": "^6.1.0", + "diff2html": "^3.4.45", "elastic-apm-node": "^4.1.0", "email-addresses": "^5.0.0", "execa": "^5.1.1", @@ -1023,6 +1024,7 @@ "react-dom": "^17.0.2", "react-dropzone": "^4.2.9", "react-fast-compare": "^2.0.4", + "react-gh-like-diff": "^2.0.2", "react-grid-layout": "^1.3.4", "react-hook-form": "^7.44.2", "react-intl": "^2.8.0", @@ -1080,6 +1082,7 @@ "type-detect": "^4.0.8", "typescript-fsa": "^3.0.0", "typescript-fsa-reducers": "^1.2.2", + "unidiff": "^1.0.4", "unified": "9.2.2", "use-resize-observer": "^9.1.0", "usng.js": "^0.4.5", diff --git a/packages/shared-ux/code_editor/code_editor.tsx b/packages/shared-ux/code_editor/code_editor.tsx index e6d54ddbff04d..1f5862a6112bf 100644 --- a/packages/shared-ux/code_editor/code_editor.tsx +++ b/packages/shared-ux/code_editor/code_editor.tsx @@ -8,7 +8,7 @@ import React, { useState, useRef, useCallback, useMemo, useEffect, KeyboardEvent } from 'react'; import { useResizeDetector } from 'react-resize-detector'; -import ReactMonacoEditor from 'react-monaco-editor'; +import ReactMonacoEditor, { MonacoDiffEditor } from 'react-monaco-editor'; import { htmlIdGenerator, EuiToolTip, @@ -151,6 +151,7 @@ export const CodeEditor: React.FC = ({ }), isCopyable = false, allowFullScreen = false, + original, }) => { const { colorMode, euiTheme } = useEuiTheme(); const useDarkTheme = useDarkThemeProp ?? colorMode === 'DARK'; @@ -162,6 +163,8 @@ export const CodeEditor: React.FC = ({ typeof ReactMonacoEditor === 'function' && ReactMonacoEditor.name === 'JestMockEditor'; return isMockedComponent ? (ReactMonacoEditor as unknown as () => typeof ReactMonacoEditor)() + : original + ? MonacoDiffEditor : ReactMonacoEditor; }, []); @@ -386,23 +389,27 @@ export const CodeEditor: React.FC = ({ textboxMutationObserver.current.observe(textbox, { attributes: true }); } - editor.onKeyDown(onKeydownMonaco); - editor.onDidBlurEditorText(onBlurMonaco); - - // "widget" is not part of the TS interface but does exist - // @ts-expect-errors - const suggestionWidget = editor.getContribution('editor.contrib.suggestController')?.widget - ?.value; + if (editor.onKeyDown && editor.onDidBlurEditorText) { + editor.onKeyDown(onKeydownMonaco); + editor.onDidBlurEditorText(onBlurMonaco); + } - // As I haven't found official documentation for "onDidShow" and "onDidHide" - // we guard from possible changes in the underlying lib - if (suggestionWidget && suggestionWidget.onDidShow && suggestionWidget.onDidHide) { - suggestionWidget.onDidShow(() => { - isSuggestionMenuOpen.current = true; - }); - suggestionWidget.onDidHide(() => { - isSuggestionMenuOpen.current = false; - }); + if (editor.getContribution) { + // "widget" is not part of the TS interface but does exist + // @ts-expect-errors + const suggestionWidget = editor.getContribution('editor.contrib.suggestController')?.widget + ?.value; + + // As I haven't found official documentation for "onDidShow" and "onDidHide" + // we guard from possible changes in the underlying lib + if (suggestionWidget && suggestionWidget.onDidShow && suggestionWidget.onDidHide) { + suggestionWidget.onDidShow(() => { + isSuggestionMenuOpen.current = true; + }); + suggestionWidget.onDidHide(() => { + isSuggestionMenuOpen.current = false; + }); + } } editorDidMount?.(editor); @@ -472,6 +479,7 @@ export const CodeEditor: React.FC = ({ **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Retrieve the contents of the alternate data stream, and analyze it for potential maliciousness. Analysts can use the following PowerShell cmdlet to accomplish this:\n - `Get-Content C:\\Path\\To\\file.exe -stream SampleAlternateDataStreamName`\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of process executable and file conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 111, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1564", + "name": "Hide Artifacts", + "reference": "https://attack.mitre.org/techniques/T1564/", + "subtechnique": [ + { + "id": "T1564.004", + "name": "NTFS File Attributes", + "reference": "https://attack.mitre.org/techniques/T1564/004/" + } + ] + } + ] + } + ], + "id": "e7d5fe91-18df-4749-92b5-305a6454a041", + "rule_id": "71bccb61-e19b-452f-b104-79a60e546a95", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n\n file.path : \"C:\\\\*:*\" and\n not file.path : \n (\"C:\\\\*:zone.identifier*\",\n \"C:\\\\users\\\\*\\\\appdata\\\\roaming\\\\microsoft\\\\teams\\\\old_weblogs_*:$DATA\") and\n\n not process.executable :\n (\"?:\\\\windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\w3wp.exe\",\n \"?:\\\\Windows\\\\explorer.exe\",\n \"?:\\\\Windows\\\\System32\\\\sihost.exe\",\n \"?:\\\\Windows\\\\System32\\\\PickerHost.exe\",\n \"?:\\\\Windows\\\\System32\\\\SearchProtocolHost.exe\",\n \"?:\\\\Program Files (x86)\\\\Dropbox\\\\Client\\\\Dropbox.exe\",\n \"?:\\\\Program Files\\\\Rivet Networks\\\\SmartByte\\\\SmartByteNetworkService.exe\",\n \"?:\\\\Program Files (x86)\\\\Microsoft\\\\Edge\\\\Application\\\\msedge.exe\",\n \"?:\\\\Program Files\\\\ExpressConnect\\\\ExpressConnectNetworkService.exe\",\n \"?:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Program Files\\\\Mozilla Firefox\\\\firefox.exe\",\n \"?:\\\\Program Files(x86)\\\\Microsoft Office\\\\root\\\\*\\\\EXCEL.EXE\",\n \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\*\\\\EXCEL.EXE\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Office\\\\root\\\\*\\\\OUTLOOK.EXE\",\n \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\*\\\\OUTLOOK.EXE\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Office\\\\root\\\\*\\\\POWERPNT.EXE\",\n \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\*\\\\POWERPNT.EXE\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Office\\\\root\\\\*\\\\WINWORD.EXE\",\n \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\*\\\\WINWORD.EXE\") and\n\n file.extension :\n (\n \"pdf\",\n \"dll\",\n \"png\",\n \"exe\",\n \"dat\",\n \"com\",\n \"bat\",\n \"cmd\",\n \"sys\",\n \"vbs\",\n \"ps1\",\n \"hta\",\n \"txt\",\n \"vbe\",\n \"js\",\n \"wsh\",\n \"docx\",\n \"doc\",\n \"xlsx\",\n \"xls\",\n \"pptx\",\n \"ppt\",\n \"rtf\",\n \"gif\",\n \"jpg\",\n \"png\",\n \"bmp\",\n \"img\",\n \"iso\"\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Abnormal Process ID or Lock File Created", + "description": "Identifies the creation of a Process ID (PID), lock or reboot file created in temporary file storage paradigm (tmpfs) directory /var/run. On Linux, the PID files typically hold the process ID to track previous copies running and manage other tasks. Certain Linux malware use the /var/run directory for holding data, executables and other tasks, disguising itself or these files as legitimate PID files.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Abnormal Process ID or Lock File Created\n\nLinux applications may need to save their process identification number (PID) for various purposes: from signaling that a program is running to serving as a signal that a previous instance of an application didn't exit successfully. PID files contain its creator process PID in an integer value.\n\nLinux lock files are used to coordinate operations in files so that conflicts and race conditions are prevented.\n\nThis rule identifies the creation of PID, lock, or reboot files in the /var/run/ directory. Attackers can masquerade malware, payloads, staged data for exfiltration, and more as legitimate PID files.\n\n#### Possible investigation steps\n\n- Retrieve the file and determine if it is malicious:\n - Check the contents of the PID files. They should only contain integer strings.\n - Check the file type of the lock and PID files to determine if they are executables. This is only observed in malicious files.\n - Check the size of the subject file. Legitimate PID files should be under 10 bytes.\n - Check if the lock or PID file has high entropy. This typically indicates an encrypted payload.\n - Analysts can use tools like `ent` to measure entropy.\n - Examine the reputation of the SHA-256 hash in the PID file. Use a database like VirusTotal to identify additional pivots and artifacts for investigation.\n- Trace the file's creation to ensure it came from a legitimate or authorized process.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, file modifications, and any spawned child processes.\n\n### False positive analysis\n\n- False positives can appear if the PID file is legitimate and holding a process ID as intended. If the PID file is an executable or has a file size that's larger than 10 bytes, it should be ruled suspicious.\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of file name and process executable conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Block the identified indicators of compromise (IoCs).\n- Take actions to terminate processes and connections used by the attacker.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 210, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Threat: BPFDoor", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "False-Positives (FP) can appear if the PID file is legitimate and holding a process ID as intended. To differentiate, if the PID file is an executable or larger than 10 bytes, it should be ruled suspicious." + ], + "references": [ + "https://www.sandflysecurity.com/blog/linux-file-masquerading-and-malicious-pids-sandfly-1-2-6-update/", + "https://twitter.com/GossiTheDog/status/1522964028284411907", + "https://exatrack.com/public/Tricephalic_Hellkeeper.pdf", + "https://www.elastic.co/security-labs/a-peek-behind-the-bpfdoor" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + } + ], + "id": "45f712c7-9647-4283-a5c4-26c58ba9e260", + "rule_id": "cac91072-d165-11ec-a764-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "host.os.type:linux and event.category:file and event.action:creation and\nuser.id:0 and file.extension:(pid or lock or reboot) and file.path:(/var/run/* or /run/*) and (\n (process.name : (\n bash or dash or sh or tcsh or csh or zsh or ksh or fish or ash or touch or nano or vim or vi or editor or mv or cp)\n ) or (\n process.executable : (\n ./* or /tmp/* or /var/tmp/* or /dev/shm/* or /var/run/* or /boot/* or /srv/* or /run/*\n ))\n) and not process.name : (go or git or containerd* or snap-confine)\n", + "new_terms_fields": [ + "host.id", + "process.executable", + "file.path" + ], + "history_window_start": "now-14d", + "index": [ + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "Attempt to Modify an Okta Policy Rule", + "description": "Detects attempts to modify a rule within an Okta policy. An adversary may attempt to modify an Okta policy rule in order to weaken an organization's security controls.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Modify an Okta Policy Rule\n\nThe modification of an Okta policy rule can be an indication of malicious activity as it may aim to weaken an organization's security controls.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the modification attempt.\n- Check the `okta.outcome.result` field to confirm the rule modification attempt.\n- Check if there are multiple rule modification attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the modification attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the modification attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the modification attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the modification attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized modification is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific modification technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 207, + "tags": [ + "Use Case: Identity and Access Audit", + "Tactic: Defense Evasion", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if Okta MFA rules are regularly modified in your organization." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "fd9ccf12-0734-49b4-b82e-36c9050d4844", + "rule_id": "000047bb-b27a-47ec-8b62-ef1a5d2c9e19", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:policy.rule.update\n", + "language": "kuery" + }, + { + "name": "Potential Persistence Through Run Control Detected", + "description": "This rule monitors the creation/alteration of the rc.local file by a previously unknown process executable through the use of the new terms rule type. The /etc/rc.local file is used to start custom applications, services, scripts or commands during start-up. The rc.local file has mostly been replaced by Systemd. However, through the \"systemd-rc-local-generator\", rc.local files can be converted to services that run at boot. Adversaries may alter rc.local to execute malicious code at start-up, and gain persistence onto the system.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Persistence Through Run Control Detected\n\nThe `rc.local` file executes custom commands or scripts during system startup on Linux systems. `rc.local` has been deprecated in favor of the use of `systemd services`, and more recent Unix distributions no longer leverage this method of on-boot script execution. \n\nThere might still be users that use `rc.local` in a benign matter, so investigation to see whether the file is malicious is vital. \n\nDetection alerts from this rule indicate the creation of a new `/etc/rc.local` file. \n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible Investigation Steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the file that was created or modified.\n - !{osquery{\"label\":\"Osquery - Retrieve File Information\",\"query\":\"SELECT * FROM file WHERE path = {{file.path}}\"}}\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate whether the `/lib/systemd/system/rc-local.service` and `/run/systemd/generator/multi-user.target.wants/rc-local.service` files were created through the `systemd-rc-local-generator` located at `/usr/lib/systemd/system-generators/systemd-rc-local-generator`.\n - !{osquery{\"label\":\"Osquery - Retrieve rc-local.service File Information\",\"query\":\"SELECT * FROM file WHERE (path = '/run/systemd/generator/multi-user.target.wants/rc-local.service' OR path = '/run/systemd/generator/multi-user.target.wants/rc-local.service')\"}}\n - In case the file is not present here, `sudo systemctl status rc-local` can be executed to find the location of the rc-local unit file.\n - If `rc-local.service` is found, manual investigation is required to check for the rc script execution. Systemd will generate syslogs in case of the execution of the rc-local service. `sudo cat /var/log/syslog | grep \"rc-local.service|/etc/rc.local Compatibility\"` can be executed to check for the execution of the service.\n - If logs are found, it's likely that the contents of the `rc.local` file have been executed. Analyze the logs. In case several syslog log files are available, use a wildcard to search through all of the available logs.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate whether this activity is related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Investigate whether the altered scripts call other malicious scripts elsewhere on the file system. \n - If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- If this activity is related to a system administrator who uses `rc.local` for administrative purposes, consider adding exceptions for this specific administrator user account. \n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Response and remediation\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the `service/rc.local` files or restore their original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.intezer.com/blog/malware-analysis/hiddenwasp-malware-targeting-linux-systems/", + "https://pberba.github.io/security/2022/02/06/linux-threat-hunting-for-persistence-initialization-scripts-and-shell-configuration/#8-boot-or-logon-initialization-scripts-rc-scripts", + "https://www.cyberciti.biz/faq/how-to-enable-rc-local-shell-script-on-systemd-while-booting-linux-system/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1037", + "name": "Boot or Logon Initialization Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/", + "subtechnique": [ + { + "id": "T1037.004", + "name": "RC Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/004/" + } + ] + } + ] + } + ], + "id": "1fb3f0fd-2eac-479e-b13f-08f4a8f4f786", + "rule_id": "0f4d35e4-925e-4959-ab24-911be207ee6f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "host.os.type : \"linux\" and event.category : \"file\" and \nevent.type : (\"change\" or \"file_modify_event\" or \"creation\" or \"file_create_event\") and\nfile.path : \"/etc/rc.local\" and not process.name : (\n \"dockerd\" or \"docker\" or \"dnf\" or \"dnf-automatic\" or \"yum\" or \"rpm\" or \"dpkg\"\n) and not file.extension : (\"swp\" or \"swpx\")\n", + "new_terms_fields": [ + "host.id", + "process.executable", + "user.id" + ], + "history_window_start": "now-7d", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Suspicious File Creation in /etc for Persistence", + "description": "Detects the manual creation of files in specific etc directories, via user root, used by Linux malware to persist and elevate privileges on compromised systems. File creation in these directories should not be entirely common and could indicate a malicious binary or script installing persistence mechanisms for long term access.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 109, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Threat: Orbit", + "Threat: Lightning Framework", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.intezer.com/blog/incident-response/orbit-new-undetected-linux-threat/", + "https://www.intezer.com/blog/research/lightning-framework-new-linux-threat/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1037", + "name": "Boot or Logon Initialization Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/", + "subtechnique": [ + { + "id": "T1037.004", + "name": "RC Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/004/" + } + ] + }, + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.006", + "name": "Dynamic Linker Hijacking", + "reference": "https://attack.mitre.org/techniques/T1574/006/" + } + ] + }, + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.002", + "name": "Systemd Service", + "reference": "https://attack.mitre.org/techniques/T1543/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.003", + "name": "Cron", + "reference": "https://attack.mitre.org/techniques/T1053/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.003", + "name": "Sudo and Sudo Caching", + "reference": "https://attack.mitre.org/techniques/T1548/003/" + } + ] + } + ] + } + ], + "id": "31b766cc-c112-4f4a-8250-d2a0f15d2652", + "rule_id": "1c84dd64-7e6c-4bad-ac73-a5014ee37042", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "file where host.os.type == \"linux\" and event.type in (\"creation\", \"file_create_event\") and user.name == \"root\" and\nfile.path : (\"/etc/ld.so.conf.d/*\", \"/etc/cron.d/*\", \"/etc/sudoers.d/*\", \"/etc/rc.d/init.d/*\", \"/etc/systemd/system/*\",\n\"/usr/lib/systemd/system/*\") and not process.executable : (\"*/dpkg\", \"*/yum\", \"*/apt\", \"*/dnf\", \"*/rpm\", \"*/systemd\",\n\"*/snapd\", \"*/dnf-automatic\",\"*/yum-cron\", \"*/elastic-agent\", \"*/dnfdaemon-system\", \"*/bin/dockerd\", \"*/sbin/dockerd\",\n\"/kaniko/executor\", \"/usr/sbin/rhn_check\") and not file.extension in (\"swp\", \"swpx\", \"tmp\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Suspicious File Changes Activity Detected", + "description": "This rule identifies a sequence of 100 file extension rename events within a set of common file paths by the same process in a timespan of 1 second. Ransomware is a type of malware that encrypts a victim's files or systems and demands payment (usually in cryptocurrency) in exchange for the decryption key. One important indicator of a ransomware attack is the mass encryption of the file system, after which a new file extension is added to the file.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Impact", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1486", + "name": "Data Encrypted for Impact", + "reference": "https://attack.mitre.org/techniques/T1486/" + } + ] + } + ], + "id": "0310774b-92d2-42dc-962b-5012dc10bf3d", + "rule_id": "28738f9f-7427-4d23-bc69-756708b5f624", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by process.entity_id, host.id with maxspan=1s\n [file where host.os.type == \"linux\" and event.type == \"change\" and event.action == \"rename\" and file.extension : \"?*\" \n and process.executable : (\"./*\", \"/tmp/*\", \"/var/tmp/*\", \"/dev/shm/*\", \"/var/run/*\", \"/boot/*\", \"/srv/*\", \"/run/*\") and\n file.path : (\n \"/home/*/Downloads/*\", \"/home/*/Documents/*\", \"/root/*\", \"/bin/*\", \"/usr/bin/*\",\n \"/opt/*\", \"/etc/*\", \"/var/log/*\", \"/var/lib/log/*\", \"/var/backup/*\", \"/var/www/*\")] with runs=25\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Process Access via Direct System Call", + "description": "Identifies suspicious process access events from an unknown memory region. Endpoint security solutions usually hook userland Windows APIs in order to decide if the code that is being executed is malicious or not. It's possible to bypass hooked functions by writing malicious functions that call syscalls directly.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Process Access via Direct System Call\n\nEndpoint security solutions usually hook userland Windows APIs in order to decide if the code that is being executed is malicious or not. It's possible to bypass hooked functions by writing malicious functions that call syscalls directly.\n\nMore context and technical details can be found in this [research blog](https://outflank.nl/blog/2019/06/19/red-team-tactics-combining-direct-system-calls-and-srdi-to-bypass-av-edr/).\n\nThis rule identifies suspicious process access events from an unknown memory region. Attackers can use direct system calls to bypass security solutions that rely on hooks.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This detection may be triggered by certain applications that install root certificates for the purpose of inspecting SSL traffic. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove the malicious certificate from the root certificate store.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 209, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://twitter.com/SBousseaden/status/1278013896440324096", + "https://www.ired.team/offensive-security/defense-evasion/using-syscalls-directly-from-visual-studio-to-bypass-avs-edrs" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + } + ], + "id": "7df8e34b-5c4d-4d61-a3b8-c2c276758826", + "rule_id": "2dd480be-1263-4d9c-8672-172928f6789a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.CallTrace", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetImage", + "type": "keyword", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.code == \"10\" and\n length(winlog.event_data.CallTrace) > 0 and\n\n /* Sysmon CallTrace starting with unknown memory module instead of ntdll which host Windows NT Syscalls */\n not winlog.event_data.CallTrace :\n (\"?:\\\\WINDOWS\\\\SYSTEM32\\\\ntdll.dll*\",\n \"?:\\\\WINDOWS\\\\SysWOW64\\\\ntdll.dll*\",\n \"?:\\\\Windows\\\\System32\\\\wow64cpu.dll*\",\n \"?:\\\\WINDOWS\\\\System32\\\\wow64win.dll*\",\n \"?:\\\\Windows\\\\System32\\\\win32u.dll*\") and\n\n not winlog.event_data.TargetImage :\n (\"?:\\\\Program Files (x86)\\\\Malwarebytes Anti-Exploit\\\\mbae-svc.exe\",\n \"?:\\\\Program Files\\\\Cisco\\\\AMP\\\\*\\\\sfc.exe\",\n \"?:\\\\Program Files (x86)\\\\Microsoft\\\\EdgeWebView\\\\Application\\\\*\\\\msedgewebview2.exe\",\n \"?:\\\\Program Files\\\\Adobe\\\\Acrobat DC\\\\Acrobat\\\\*\\\\AcroCEF.exe\") and\n\n not (process.executable : (\"?:\\\\Program Files\\\\Adobe\\\\Acrobat DC\\\\Acrobat\\\\Acrobat.exe\",\n \"?:\\\\Program Files (x86)\\\\World of Warcraft\\\\_classic_\\\\WowClassic.exe\") and\n not winlog.event_data.TargetImage : \"?:\\\\WINDOWS\\\\system32\\\\lsass.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Attempted Bypass of Okta MFA", + "description": "Detects attempts to bypass Okta multi-factor authentication (MFA). An adversary may attempt to bypass the Okta MFA policies configured for an organization in order to obtain unauthorized access to an application.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempted Bypass of Okta MFA\n\nMulti-factor authentication (MFA) is a crucial security measure in preventing unauthorized access. Okta MFA, like other MFA solutions, requires the user to provide multiple means of identification at login. An adversary might attempt to bypass Okta MFA to gain unauthorized access to an application.\n\nThis rule detects attempts to bypass Okta MFA. It might indicate a serious attempt to compromise a user account within the organization's network.\n\n#### Possible investigation steps\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the bypass attempt.\n- Check the `okta.outcome.result` field to confirm the MFA bypass attempt.\n- Check if there are multiple unsuccessful MFA attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the MFA bypass attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the bypass attempt.\n\n### False positive analysis\n\n- Check if there were issues with the MFA system at the time of the bypass attempt. This could indicate a system error rather than a genuine bypass attempt.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the login attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's MFA settings to ensure they are correctly configured.\n\n### Response and remediation\n\n- If unauthorized access is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific MFA bypass technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 207, + "tags": [ + "Data Source: Okta", + "Use Case: Identity and Access Audit", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1111", + "name": "Multi-Factor Authentication Interception", + "reference": "https://attack.mitre.org/techniques/T1111/" + } + ] + } + ], + "id": "9387f9c4-3fc9-48dc-832f-fd5002c20fdd", + "rule_id": "3805c3dc-f82c-4f8d-891e-63c24d3102b0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:user.mfa.attempt_bypass\n", + "language": "kuery" + }, + { + "name": "Okta Brute Force or Password Spraying Attack", + "description": "Identifies a high number of failed Okta user authentication attempts from a single IP address, which could be indicative of a brute force or password spraying attack. An adversary may attempt a brute force or password spraying attack to obtain unauthorized access to user accounts.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Okta Brute Force or Password Spraying Attack\n\nThis rule alerts when a high number of failed Okta user authentication attempts occur from a single IP address. This could be indicative of a brute force or password spraying attack, where an adversary may attempt to gain unauthorized access to user accounts by guessing the passwords.\n\n#### Possible investigation steps:\n\n- Review the `source.ip` field to identify the IP address from which the high volume of failed login attempts originated.\n- Look into the `event.outcome` field to verify that these are indeed failed authentication attempts.\n- Determine the `user.name` or `user.email` related to these failed login attempts. If the attempts are spread across multiple accounts, it might indicate a password spraying attack.\n- Check the timeline of the events. Are the failed attempts spread out evenly, or are there burst periods, which might indicate an automated tool?\n- Determine the geographical location of the source IP. Is this location consistent with the user's typical login location?\n- Analyze any previous successful logins from this IP. Was this IP previously associated with successful logins?\n\n### False positive analysis:\n\n- A single user or automated process that attempts to authenticate using expired or wrong credentials multiple times may trigger a false positive.\n- Analyze the behavior of the source IP. If the IP is associated with legitimate users or services, it may be a false positive.\n\n### Response and remediation:\n\n- If you identify unauthorized access attempts, consider blocking the source IP at the firewall level.\n- Notify the users who are targeted by the attack. Ask them to change their passwords and ensure they use unique, complex passwords.\n- Enhance monitoring on the affected user accounts for any suspicious activity.\n- If the attack is persistent, consider implementing CAPTCHA or account lockouts after a certain number of failed login attempts.\n- If the attack is persistent, consider implementing multi-factor authentication (MFA) for the affected user accounts.\n- Review and update your security policies based on the findings from the incident.", + "version": 207, + "tags": [ + "Use Case: Identity and Access Audit", + "Tactic: Credential Access", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false positives." + ], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "fcddc54e-a835-48b5-8501-c3510a702ef7", + "rule_id": "42bf698b-4738-445b-8231-c834ddefd8a0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "threshold", + "query": "event.dataset:okta.system and event.category:authentication and event.outcome:failure\n", + "threshold": { + "field": [ + "source.ip" + ], + "value": 25 + }, + "index": [ + "filebeat-*", + "logs-okta*" + ], + "language": "kuery" + }, + { + "name": "Adding Hidden File Attribute via Attrib", + "description": "Adversaries can add the 'hidden' attribute to files to hide them from the user in an attempt to evade detection.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "timeline_id": "e70679c2-6cde-4510-9764-4823df18f7db", + "timeline_title": "Comprehensive Process Timeline", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Adding Hidden File Attribute via Attrib\n\nThe `Hidden` attribute is a file or folder attribute that makes the file or folder invisible to regular directory listings when the attribute is set. \n\nAttackers can use this attribute to conceal tooling and malware to prevent administrators and users from finding it, even if they are looking specifically for it.\n\nThis rule looks for the execution of the `attrib.exe` utility with a command line that indicates the modification of the `Hidden` attribute.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to identify the target file or folder.\n - Examine the file, which process created it, header, etc.\n - If suspicious, retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Observe and collect information about the following activities in the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 109, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1564", + "name": "Hide Artifacts", + "reference": "https://attack.mitre.org/techniques/T1564/", + "subtechnique": [ + { + "id": "T1564.001", + "name": "Hidden Files and Directories", + "reference": "https://attack.mitre.org/techniques/T1564/001/" + } + ] + }, + { + "id": "T1222", + "name": "File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/", + "subtechnique": [ + { + "id": "T1222.001", + "name": "Windows File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "id": "915c8c32-4ba4-49f5-81af-b76d50cdbf39", + "rule_id": "4630d948-40d4-4cef-ac69-4002e29bc3db", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"attrib.exe\" or process.pe.original_file_name == \"ATTRIB.EXE\") and process.args : \"+h\" and\n not\n (process.parent.name: \"cmd.exe\" and\n process.command_line: \"attrib +R +H +S +A *.cui\" and\n process.parent.command_line: \"?:\\\\WINDOWS\\\\system32\\\\cmd.exe /c \\\"?:\\\\WINDOWS\\\\system32\\\\*.bat\\\"\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Persistence Through init.d Detected", + "description": "Files that are placed in the /etc/init.d/ directory in Unix can be used to start custom applications, services, scripts or commands during start-up. Init.d has been mostly replaced in favor of Systemd. However, the \"systemd-sysv-generator\" can convert init.d files to service unit files that run at boot. Adversaries may add or alter files located in the /etc/init.d/ directory to execute malicious code upon boot in order to gain persistence on the system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Persistence Through init.d Detected\n\nThe `/etc/init.d` directory is used in Linux systems to store the initialization scripts for various services and daemons that are executed during system startup and shutdown.\n\nAttackers can abuse files within the `/etc/init.d/` directory to run scripts, commands or malicious software every time a system is rebooted by converting an executable file into a service file through the `systemd-sysv-generator`. After conversion, a unit file is created within the `/run/systemd/generator.late/` directory.\n\nThis rule looks for the creation of new files within the `/etc/init.d/` directory. Executable files in these directories will automatically run at boot with root privileges.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n#### Possible Investigation Steps\n\n- Investigate the file that was created or modified.\n - !{osquery{\"label\":\"Osquery - Retrieve File Information\",\"query\":\"SELECT * FROM file WHERE path = {{file.path}}\"}}\n- Investigate whether any other files in the `/etc/init.d/` or `/run/systemd/generator.late/` directories have been altered.\n - !{osquery{\"label\":\"Osquery - Retrieve File Listing Information\",\"query\":\"SELECT * FROM file WHERE (path LIKE '/etc/init.d/%' OR path LIKE '/run/systemd/generator.late/%')\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Additional File Listing Information\",\"query\":\"SELECT\\n f.path,\\n u.username AS file_owner,\\n g.groupname AS group_owner,\\n datetime(f.atime, 'unixepoch') AS file_last_access_time,\\n datetime(f.mtime, 'unixepoch') AS file_last_modified_time,\\n datetime(f.ctime, 'unixepoch') AS file_last_status_change_time,\\n datetime(f.btime, 'unixepoch') AS file_created_time,\\n f.size AS size_bytes\\nFROM\\n file f\\n LEFT JOIN users u ON f.uid = u.uid\\n LEFT JOIN groups g ON f.gid = g.gid\\nWHERE (path LIKE '/etc/init.d/%' OR path LIKE '/run/systemd/generator.late/%')\\n\"}}\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate syslog through the `sudo cat /var/log/syslog | grep 'LSB'` command to find traces of the LSB header of the script (if present). If syslog is being ingested into Elasticsearch, the same can be accomplished through Kibana.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate whether this activity is related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Investigate whether the altered scripts call other malicious scripts elsewhere on the file system. \n - If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- If this activity is related to a system administrator who uses init.d for administrative purposes, consider adding exceptions for this specific administrator user account. \n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Related Rules\n\n- Suspicious File Creation in /etc for Persistence - 1c84dd64-7e6c-4bad-ac73-a5014ee37042\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the maliciously created service/init.d files or restore it to the original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.intezer.com/blog/malware-analysis/hiddenwasp-malware-targeting-linux-systems/", + "https://pberba.github.io/security/2022/02/06/linux-threat-hunting-for-persistence-initialization-scripts-and-shell-configuration/#8-boot-or-logon-initialization-scripts-rc-scripts", + "https://www.cyberciti.biz/faq/how-to-enable-rc-local-shell-script-on-systemd-while-booting-linux-system/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1037", + "name": "Boot or Logon Initialization Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/" + } + ] + } + ], + "id": "f23f13a8-753c-42de-a3ea-720f182fd12b", + "rule_id": "474fd20e-14cc-49c5-8160-d9ab4ba16c8b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "host.os.type :\"linux\" and event.action:(\"creation\" or \"file_create_event\" or \"rename\" or \"file_rename_event\") and \nfile.path : /etc/init.d/* and not process.name : (\"dpkg\" or \"dockerd\" or \"rpm\" or \"dnf\" or \"chef-client\" or \"apk\" or \"yum\" or \n\"rpm\" or \"vmis-launcher\" or \"exe\") and not file.extension : (\"swp\" or \"swx\")\n", + "new_terms_fields": [ + "file.path", + "process.name" + ], + "history_window_start": "now-7d", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Suspicious Process Spawned from MOTD Detected", + "description": "Message of the day (MOTD) is the message that is presented to the user when a user connects to a Linux server via SSH or a serial connection. Linux systems contain several default MOTD files located in the \"/etc/update-motd.d/\" and \"/usr/lib/update-notifier/\" directories. These scripts run as the root user every time a user connects over SSH or a serial connection. Adversaries may create malicious MOTD files that grant them persistence onto the target every time a user connects to the system by executing a backdoor script or command. This rule detects the execution of potentially malicious processes through the MOTD utility.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Process Spawned from MOTD Detected\n\nThe message-of-the-day (MOTD) is used to display a customizable system-wide message or information to users upon login in Linux.\n\nAttackers can abuse message-of-the-day (motd) files to run scripts, commands or malicious software every time a user connects to a system over SSH or a serial connection, by creating a new file within the `/etc/update-motd.d/` or `/usr/lib/update-notifier/` directory. Files in these directories will automatically run with root privileges when they are made executable.\n\nThis rule identifies the execution of potentially malicious processes from a MOTD script, which is not likely to occur as default benign behavior. \n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible Investigation Steps\n\n- Investigate the file that was created or modified from which the suspicious process was executed.\n - !{osquery{\"label\":\"Osquery - Retrieve File Information\",\"query\":\"SELECT * FROM file WHERE path = {{file.path}}\"}}\n- Investigate whether any other files in the `/etc/update-motd.d/` or `/usr/lib/update-notifier/` directories have been altered.\n - !{osquery{\"label\":\"Osquery - Retrieve File Listing Information\",\"query\":\"SELECT * FROM file WHERE (path LIKE '/etc/update-motd.d/%' OR path LIKE '/usr/lib/update-notifier/%')\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Additional File Listing Information\",\"query\":\"SELECT\\n f.path,\\n u.username AS file_owner,\\n g.groupname AS group_owner,\\n datetime(f.atime, 'unixepoch') AS file_last_access_time,\\n datetime(f.mtime, 'unixepoch') AS file_last_modified_time,\\n datetime(f.ctime, 'unixepoch') AS file_last_status_change_time,\\n datetime(f.btime, 'unixepoch') AS file_created_time,\\n f.size AS size_bytes\\nFROM\\n file f\\n LEFT JOIN users u ON f.uid = u.uid\\n LEFT JOIN groups g ON f.gid = g.gid\\nWHERE (path LIKE '/etc/update-motd.d/%' OR path LIKE '/usr/lib/update-notifier/%')\\n\"}}\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate whether the altered scripts call other malicious scripts elsewhere on the file system. \n - If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services, and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### Related Rules\n\n- Potential Persistence Through MOTD File Creation Detected - 96d11d31-9a79-480f-8401-da28b194608f\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the MOTD files or restore them to the original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://pberba.github.io/security/2022/02/06/linux-threat-hunting-for-persistence-initialization-scripts-and-shell-configuration/#10-boot-or-logon-initialization-scripts-motd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1037", + "name": "Boot or Logon Initialization Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/" + } + ] + } + ], + "id": "639bc106-9b5a-4a7c-8eb7-5ec6109bc371", + "rule_id": "4ec47004-b34a-42e6-8003-376a123ea447", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where event.type == \"start\" and event.action : (\"exec\", \"exec_event\") and\nprocess.parent.executable : (\"/etc/update-motd.d/*\", \"/usr/lib/update-notifier/*\") and (\n (process.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and (\n (process.args : (\"-i\", \"-l\")) or (process.parent.name == \"socat\" and process.parent.args : \"*exec*\"))) or\n (process.name : (\"nc\", \"ncat\", \"netcat\", \"nc.openbsd\") and process.args_count >= 3 and \n not process.args : (\"-*z*\", \"-*l*\")) or\n (process.name : \"python*\" and process.args : \"-c\" and process.args : (\n \"*import*pty*spawn*\", \"*import*subprocess*call*\"\n )) or\n (process.name : \"perl*\" and process.args : \"-e\" and process.args : \"*socket*\" and process.args : (\n \"*exec*\", \"*system*\"\n )) or\n (process.name : \"ruby*\" and process.args : (\"-e\", \"-rsocket\") and process.args : (\n \"*TCPSocket.new*\", \"*TCPSocket.open*\"\n )) or\n (process.name : \"lua*\" and process.args : \"-e\" and process.args : \"*socket.tcp*\" and process.args : (\n \"*io.popen*\", \"*os.execute*\"\n )) or\n (process.name : \"php*\" and process.args : \"-r\" and process.args : \"*fsockopen*\" and process.args : \"*/bin/*sh*\") or \n (process.name : (\"awk\", \"gawk\", \"mawk\", \"nawk\") and process.args : \"*/inet/tcp/*\") or \n (process.name in (\"openssl\", \"telnet\"))\n) and \nnot (process.parent.args : \"--force\" or process.args : (\"/usr/games/lolcat\", \"/usr/bin/screenfetch\"))\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "FirstTime Seen Account Performing DCSync", + "description": "This rule identifies when a User Account starts the Active Directory Replication Process for the first time. Attackers can use the DCSync technique to get credential information of individual accounts or the entire domain, thus compromising the entire domain.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating FirstTime Seen Account Performing DCSync\n\nActive Directory replication is the process by which the changes that originate on one domain controller are automatically transferred to other domain controllers that store the same data.\n\nActive Directory data consists of objects that have properties, or attributes. Each object is an instance of an object class, and object classes and their respective attributes are defined in the Active Directory schema. Objects are defined by the values of their attributes, and changes to attribute values must be transferred from the domain controller on which they occur to every other domain controller that stores a replica of an affected object.\n\nAdversaries can use the DCSync technique that uses Windows Domain Controller's API to simulate the replication process from a remote domain controller, compromising major credential material such as the Kerberos krbtgt keys that are used legitimately for creating tickets, but also for forging tickets by attackers. This attack requires some extended privileges to succeed (DS-Replication-Get-Changes and DS-Replication-Get-Changes-All), which are granted by default to members of the Administrators, Domain Admins, Enterprise Admins, and Domain Controllers groups. Privileged accounts can be abused to grant controlled objects the right to DCsync/Replicate.\n\nMore details can be found on [Threat Hunter Playbook](https://threathunterplaybook.com/library/windows/active_directory_replication.html?highlight=dcsync#directory-replication-services-auditing) and [The Hacker Recipes](https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync).\n\nThis rule monitors for when a Windows Event ID 4662 (Operation was performed on an Active Directory object) with the access mask 0x100 (Control Access) and properties that contain at least one of the following or their equivalent Schema-Id-GUID (DS-Replication-Get-Changes, DS-Replication-Get-Changes-All, DS-Replication-Get-Changes-In-Filtered-Set) is seen in the environment for the first time in the last 15 days.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Correlate security events 4662 and 4624 (Logon Type 3) by their Logon ID (`winlog.logon.id`) on the Domain Controller (DC) that received the replication request. This will tell you where the AD replication request came from, and if it came from another DC or not.\n- Scope which credentials were compromised (for example, whether all accounts were replicated or specific ones).\n\n### False positive analysis\n\n- Administrators may use custom accounts on Azure AD Connect; investigate if this is part of a new Azure AD account setup, and ensure it is properly secured. If the activity was expected and there is no other suspicious activity involving the host or user, the analyst can dismiss the alert.\n- Although replicating Active Directory (AD) data to non-Domain Controllers is not a common practice and is generally not recommended from a security perspective, some software vendors may require it for their products to function correctly. Investigate if this is part of a new product setup, and ensure it is properly secured. If the activity was expected and there is no other suspicious activity involving the host or user, the analyst can dismiss the alert.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the entire domain or the `krbtgt` user was compromised:\n - Activate your incident response plan for total Active Directory compromise which should include, but not be limited to, a password reset (twice) of the `krbtgt` user.\n- Investigate how the attacker escalated privileges and identify systems they used to conduct lateral movement. Use this information to determine ways the attacker could regain access to the environment.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Privilege Escalation", + "Use Case: Active Directory Monitoring", + "Data Source: Active Directory", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-180815210510.html", + "https://threathunterplaybook.com/library/windows/active_directory_replication.html?highlight=dcsync#directory-replication-services-auditing", + "https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_ad_replication_non_machine_account.yml", + "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0027_windows_audit_directory_service_access.md", + "https://attack.stealthbits.com/privilege-escalation-using-mimikatz-dcsync", + "https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.006", + "name": "DCSync", + "reference": "https://attack.mitre.org/techniques/T1003/006/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + } + ] + } + ] + } + ], + "id": "cfe3d8d0-d3db-45ec-8d53-a4e575f08b87", + "rule_id": "5c6f4c58-b381-452a-8976-f1b1c6aa0def", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.Properties", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectUserName", + "type": "keyword", + "ecs": false + } + ], + "setup": "The 'Audit Directory Service Access' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Access (Success,Failure)\n```", + "type": "new_terms", + "query": "event.action:\"Directory Service Access\" and event.code:\"4662\" and\n winlog.event_data.Properties:(*DS-Replication-Get-Changes* or *DS-Replication-Get-Changes-All* or\n *DS-Replication-Get-Changes-In-Filtered-Set* or *1131f6ad-9c07-11d1-f79f-00c04fc2dcd2* or\n *1131f6aa-9c07-11d1-f79f-00c04fc2dcd2* or *89e95b76-444d-4c62-991a-0facbeda640c*) and\n not winlog.event_data.SubjectUserName:(*$ or MSOL_*)\n", + "new_terms_fields": [ + "winlog.event_data.SubjectUserName" + ], + "history_window_start": "now-15d", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "language": "kuery" + }, + { + "name": "New Systemd Timer Created", + "description": "Detects the creation of a systemd timer within any of the default systemd timer directories. Systemd timers can be used by an attacker to gain persistence, by scheduling the execution of a command or script. Similarly to cron/at, systemd timers can be set up to execute on boot time, or on a specific point in time, which allows attackers to regain access in case the connection to the infected asset was lost.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating New Systemd Timer Created\n\nSystemd timers are used for scheduling and automating recurring tasks or services on Linux systems. \n\nAttackers can leverage systemd timers to run scripts, commands, or malicious software at system boot or on a set time interval by creating a systemd timer and a corresponding systemd service file. \n\nThis rule monitors the creation of new systemd timer files, potentially indicating the creation of a persistence mechanism.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible Investigation Steps\n\n- Investigate the timer file that was created or modified.\n - !{osquery{\"label\":\"Osquery - Retrieve File Information\",\"query\":\"SELECT * FROM file WHERE path = {{file.path}}\"}}\n- Investigate the currently enabled systemd timers through the following command `sudo systemctl list-timers`.\n- Search for the systemd service file named similarly to the timer that was created.\n- Investigate whether any other files in any of the available systemd directories have been altered through OSQuery.\n - !{osquery{\"label\":\"Osquery - Retrieve File Listing Information\",\"query\":\"SELECT * FROM file WHERE (\\npath LIKE '/etc/systemd/system/%' OR \\npath LIKE '/usr/local/lib/systemd/system/%' OR \\npath LIKE '/lib/systemd/system/%' OR\\npath LIKE '/usr/lib/systemd/system/%' OR\\npath LIKE '/home/user/.config/systemd/user/%'\\n)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Additional File Listing Information\",\"query\":\"SELECT\\n f.path,\\n u.username AS file_owner,\\n g.groupname AS group_owner,\\n datetime(f.atime, 'unixepoch') AS file_last_access_time,\\n datetime(f.mtime, 'unixepoch') AS file_last_modified_time,\\n datetime(f.ctime, 'unixepoch') AS file_last_status_change_time,\\n datetime(f.btime, 'unixepoch') AS file_created_time,\\n f.size AS size_bytes\\nFROM\\n file f\\n LEFT JOIN users u ON f.uid = u.uid\\n LEFT JOIN groups g ON f.gid = g.gid\\nWHERE (\\npath LIKE '/etc/systemd/system/%' OR \\npath LIKE '/usr/local/lib/systemd/system/%' OR \\npath LIKE '/lib/systemd/system/%' OR\\npath LIKE '/usr/lib/systemd/system/%' OR\\npath LIKE '/home/{{user.name}}/.config/systemd/user/%'\\n)\\n\"}}\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Investigate whether the altered scripts call other malicious scripts elsewhere on the file system. \n - If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- If this activity is related to a system administrator who uses systemd timers for administrative purposes, consider adding exceptions for this specific administrator user account. \n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the service/timer or restore its original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://opensource.com/article/20/7/systemd-timers", + "https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.006", + "name": "Systemd Timers", + "reference": "https://attack.mitre.org/techniques/T1053/006/" + } + ] + } + ] + } + ], + "id": "8ae016fa-63dd-4610-a0c8-a30c69ace77c", + "rule_id": "7fb500fa-8e24-4bd1-9480-2a819352602c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "host.os.type : \"linux\" and event.action : (\"creation\" or \"file_create_event\") and file.extension : \"timer\" and\nfile.path : (/etc/systemd/system/* or /usr/local/lib/systemd/system/* or /lib/systemd/system/* or \n/usr/lib/systemd/system/* or /home/*/.config/systemd/user/*) and not process.name : (\n \"docker\" or \"dockerd\" or \"dnf\" or \"yum\" or \"rpm\" or \"dpkg\" or \"executor\" or \"cloudflared\"\n)\n", + "new_terms_fields": [ + "host.id", + "file.path", + "process.executable" + ], + "history_window_start": "now-10d", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Suspicious PowerShell Engine ImageLoad", + "description": "Identifies the PowerShell engine being invoked by unexpected processes. Rather than executing PowerShell functionality with powershell.exe, some attackers do this to operate more stealthily.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious PowerShell Engine ImageLoad\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can use PowerShell without having to execute `PowerShell.exe` directly. This technique, often called \"PowerShell without PowerShell,\" works by using the underlying System.Management.Automation namespace and can bypass application allowlisting and PowerShell security features.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Retrieve the implementation (DLL, executable, etc.) and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity can happen legitimately. Some vendors have their own PowerShell implementations that are shipped with some products. These benign true positives (B-TPs) can be added as exceptions if necessary after analysis.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 208, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "1989aca0-bd3f-4077-b6c2-615715746c14", + "rule_id": "852c1f19-68e8-43a6-9dce-340771fe1be3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable.caseless", + "type": "unknown", + "ecs": false + }, + { + "name": "process.name.caseless", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type:windows and event.category:library and \n dll.name:(\"System.Management.Automation.dll\" or \"System.Management.Automation.ni.dll\") and \n not (process.code_signature.subject_name:(\"Microsoft Corporation\" or \"Microsoft Dynamic Code Publisher\" or \"Microsoft Windows\") and process.code_signature.trusted:true and not process.name.caseless:(\"regsvr32.exe\" or \"rundll32.exe\")) and \n not (process.executable.caseless:(?\\:\\\\\\\\Program?Files?\\(x86\\)\\\\\\\\*.exe or ?\\:\\\\\\\\Program?Files\\\\\\\\*.exe) and process.code_signature.trusted:true) and \n not (process.executable.caseless:?\\:\\\\\\\\Windows\\\\\\\\Lenovo\\\\\\\\*.exe and process.code_signature.subject_name:\"Lenovo\" and \n process.code_signature.trusted:true) and not process.executable.caseless : \"C:\\\\Windows\\\\System32\\\\powershell.exe\"\n", + "new_terms_fields": [ + "host.id", + "process.executable", + "user.id" + ], + "history_window_start": "now-14d", + "index": [ + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "File made Immutable by Chattr", + "description": "Detects a file being made immutable using the chattr binary. Making a file immutable means it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the file can not be opened in write mode. Threat actors will commonly utilize this to prevent tampering or modification of their malicious files or any system files they have modified for purposes of persistence (e.g .ssh, /etc/passwd, etc.).", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 33, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1222", + "name": "File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/", + "subtechnique": [ + { + "id": "T1222.002", + "name": "Linux and Mac File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/002/" + } + ] + } + ] + } + ], + "id": "4098ad2c-70d6-40d6-9d19-d4a09f13eac7", + "rule_id": "968ccab9-da51-4a87-9ce2-d3c9782fd759", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and user.name == \"root\" and\n process.executable : \"/usr/bin/chattr\" and process.args : (\"-*i*\", \"+*i*\") and\n not process.parent.executable: (\"/lib/systemd/systemd\", \"/usr/local/uems_agent/bin/*\", \"/usr/lib/systemd/systemd\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Potential Persistence Through MOTD File Creation Detected", + "description": "Message of the day (MOTD) is the message that is presented to the user when a user connects to a Linux server via SSH or a serial connection. Linux systems contain several default MOTD files located in the \"/etc/update-motd.d/\" and \"/usr/lib/update-notifier/\" directories. These scripts run as the root user every time a user connects over SSH or a serial connection. Adversaries may create malicious MOTD files that grant them persistence onto the target every time a user connects to the system by executing a backdoor script or command. This rule detects the creation of potentially malicious files within the default MOTD file directories.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Persistence Through MOTD File Creation Detected\n\nThe message-of-the-day (MOTD) is used to display a customizable system-wide message or information to users upon login in Linux.\n\nAttackers can abuse message-of-the-day (motd) files to run scripts, commands or malicious software every time a user connects to a system over SSH or a serial connection, by creating a new file within the `/etc/update-motd.d/` or `/usr/lib/update-notifier/` directory. Executable files in these directories automatically run with root privileges.\n\nThis rule identifies the creation of new files within the `/etc/update-motd.d/` or `/usr/lib/update-notifier/` directories.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible Investigation Steps\n\n- Investigate the file that was created or modified.\n - !{osquery{\"label\":\"Osquery - Retrieve File Information\",\"query\":\"SELECT * FROM file WHERE path = {{file.path}}\"}}\n- Investigate whether any other files in the `/etc/update-motd.d/` or `/usr/lib/update-notifier/` directories have been altered.\n - !{osquery{\"label\":\"Osquery - Retrieve File Listing Information\",\"query\":\"SELECT * FROM file WHERE (path LIKE '/etc/update-motd.d/%' OR path LIKE '/usr/lib/update-notifier/%')\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Additional File Listing Information\",\"query\":\"SELECT\\n f.path,\\n u.username AS file_owner,\\n g.groupname AS group_owner,\\n datetime(f.atime, 'unixepoch') AS file_last_access_time,\\n datetime(f.mtime, 'unixepoch') AS file_last_modified_time,\\n datetime(f.ctime, 'unixepoch') AS file_last_status_change_time,\\n datetime(f.btime, 'unixepoch') AS file_created_time,\\n f.size AS size_bytes\\nFROM\\n file f\\n LEFT JOIN users u ON f.uid = u.uid\\n LEFT JOIN groups g ON f.gid = g.gid\\nWHERE (path LIKE '/etc/update-motd.d/%' OR path LIKE '/usr/lib/update-notifier/%')\\n\"}}\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate whether the modified scripts call other malicious scripts elsewhere on the file system. \n - If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### Related Rules\n\n- Suspicious Process Spawned from MOTD Detected - 4ec47004-b34a-42e6-8003-376a123ea447\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the MOTD files or restore their original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://pberba.github.io/security/2022/02/06/linux-threat-hunting-for-persistence-initialization-scripts-and-shell-configuration/#10-boot-or-logon-initialization-scripts-motd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1037", + "name": "Boot or Logon Initialization Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/" + } + ] + } + ], + "id": "3159ffe5-fae8-4446-bcd2-d2cc8afa07a6", + "rule_id": "96d11d31-9a79-480f-8401-da28b194608f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "host.os.type :\"linux\" and event.action:(\"creation\" or \"file_create_event\" or \"rename\" or \"file_rename_event\") and \nfile.path : (/etc/update-motd.d/* or /usr/lib/update-notifier/*) and not process.name : (\n dpkg or dockerd or rpm or executor or dnf\n) and not file.extension : (\"swp\" or \"swpx\")\n", + "new_terms_fields": [ + "host.id", + "file.path", + "process.executable" + ], + "history_window_start": "now-10d", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Potential Abuse of Repeated MFA Push Notifications", + "description": "Detects when an attacker abuses the Multi-Factor authentication mechanism by repeatedly issuing login requests until the user eventually accepts the Okta push notification. An adversary may attempt to bypass the Okta MFA policies configured for an organization to obtain unauthorized access.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Abuse of Repeated MFA Push Notifications\n\nMulti-Factor Authentication (MFA) is an effective method to prevent unauthorized access. However, some adversaries may abuse the system by repeatedly sending MFA push notifications until the user unwittingly approves the access.\n\nThis rule detects when a user denies MFA Okta Verify push notifications twice, followed by a successful authentication event within a 10-minute window. This sequence could indicate an adversary's attempt to bypass the Okta MFA policy.\n\n#### Possible investigation steps:\n\n- Identify the user who received the MFA notifications by reviewing the `user.email` field.\n- Identify the time, source IP, and geographical location of the MFA requests and the subsequent successful login.\n- Review the `event.action` field to understand the nature of the events. It should include two `user.mfa.okta_verify.deny_push` actions and one `user.authentication.sso` action.\n- Ask the user if they remember receiving the MFA notifications and subsequently logging into their account.\n- Check if the MFA requests and the successful login occurred during the user's regular activity hours.\n- Look for any other suspicious activity on the account around the same time.\n- Identify whether the same pattern is repeated for other users in your organization. Multiple users receiving push notifications simultaneously might indicate a larger attack.\n\n### False positive analysis:\n\n- Determine if the MFA push notifications were legitimate. Sometimes, users accidentally trigger MFA requests or deny them unintentionally and later approve them.\n- Check if there are known issues with the MFA system causing false denials.\n\n### Response and remediation:\n\n- If unauthorized access is confirmed, initiate your incident response process.\n- Alert the user and your IT department immediately.\n- If possible, isolate the user's account until the issue is resolved.\n- Investigate the source of the unauthorized access.\n- If the account was accessed by an unauthorized party, determine the actions they took after logging in.\n- Consider enhancing your MFA policy to prevent such incidents in the future.\n- Encourage users to report any unexpected MFA notifications immediately.\n- Review and update your incident response plans and security policies based on the findings from the incident.", + "version": 207, + "tags": [ + "Use Case: Identity and Access Audit", + "Tactic: Credential Access", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.mandiant.com/resources/russian-targeting-gov-business", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "56180406-be8a-4f24-ab38-831ab0c1f1f1", + "rule_id": "97a8e584-fd3b-421f-9b9d-9c9d9e57e9d7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + }, + { + "name": "user.email", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "eql", + "query": "sequence by user.email with maxspan=10m\n [any where event.dataset == \"okta.system\" and event.module == \"okta\" and event.action == \"user.mfa.okta_verify.deny_push\"]\n [any where event.dataset == \"okta.system\" and event.module == \"okta\" and event.action == \"user.mfa.okta_verify.deny_push\"]\n [any where event.dataset == \"okta.system\" and event.module == \"okta\" and event.action == \"user.authentication.sso\"]\n", + "language": "eql", + "index": [ + "filebeat-*", + "logs-okta*" + ] + }, + { + "name": "Startup or Run Key Registry Modification", + "description": "Identifies run key or startup key registry modifications. In order to survive reboots and other system interrupts, attackers will modify run keys within the registry or leverage startup folder items as a form of persistence.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "timeline_id": "3e47ef71-ebfc-4520-975c-cb27fc090799", + "timeline_title": "Comprehensive Registry Timeline", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Startup or Run Key Registry Modification\n\nAdversaries may achieve persistence by referencing a program with a registry run key. Adding an entry to the run keys in the registry will cause the program referenced to be executed when a user logs in. These programs will executed under the context of the user and will have the account's permissions. This rule looks for this behavior by monitoring a range of registry run keys.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- There is a high possibility of benign legitimate programs being added to registry run keys. This activity could be based on new software installations, patches, or any kind of network administrator related activity. Before undertaking further investigation, verify that this activity is not benign.\n\n### Related rules\n\n- Suspicious Startup Shell Folder Modification - c8b150f0-0164-475b-a75e-74b47800a9ff\n- Persistent Scripts in the Startup Directory - f7c4dc5a-a58d-491d-9f14-9b66507121c0\n- Startup Folder Persistence via Unsigned Process - 2fba96c0-ade5-4bce-b92f-a5df2509da3f\n- Startup Persistence by a Suspicious Process - 440e2db4-bc7f-4c96-a068-65b78da59bde\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 109, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + } + ] + } + ] + } + ], + "id": "2e658f00-2da8-4f8e-a778-339688911e9c", + "rule_id": "97fc44d3-8dae-4019-ae83-298c3015600f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.value", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and registry.data.strings != null and\n registry.path : (\n /* Machine Hive */\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\\\\*\",\n /* Users Hive */\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\\\\*\"\n ) and\n /* add common legitimate changes without being too restrictive as this is one of the most abused AESPs */\n not registry.data.strings : \"ctfmon.exe /n\" and\n not (registry.value : \"Application Restart #*\" and process.name : \"csrss.exe\") and\n not user.id : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\") and\n not registry.data.strings : (\"?:\\\\Program Files\\\\*.exe\", \"?:\\\\Program Files (x86)\\\\*.exe\") and\n not process.executable : (\"?:\\\\Windows\\\\System32\\\\msiexec.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\") and\n not (\n /* Logitech G Hub */\n (\n process.code_signature.trusted == true and process.code_signature.subject_name == \"Logitech Inc\" and\n process.name : \"lghub_agent.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Program Files\\\\LGHUB\\\\lghub.exe\\\" --background\"\n )\n ) or\n\n /* Google Drive File Stream, Chrome, and Google Update */\n (\n process.code_signature.trusted == true and process.code_signature.subject_name == \"Google LLC\" and\n (\n process.name : \"GoogleDriveFS.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Program Files\\\\Google\\\\Drive File Stream\\\\*\\\\GoogleDriveFS.exe\\\" --startup_mode\"\n ) or\n\n process.name : \"chrome.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\\\" --no-startup-window /prefetch:5\",\n \"\\\"?:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\\\" --no-startup-window /prefetch:5\"\n ) or\n\n process.name : \"GoogleUpdate.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Update\\\\*\\\\GoogleUpdateCore.exe\\\"\"\n )\n )\n ) or\n\n /* MS Programs */\n (\n process.code_signature.trusted == true and process.code_signature.subject_name in (\"Microsoft Windows\", \"Microsoft Corporation\") and\n (\n process.name : \"msedge.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Program Files (x86)\\\\Microsoft\\\\Edge\\\\Application\\\\msedge.exe\\\" --no-startup-window --win-session-start /prefetch:5\"\n ) or\n\n process.name : (\"Update.exe\", \"Teams.exe\") and registry.data.strings : (\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\Teams\\\\Update.exe --processStart \\\"Teams.exe\\\" --process-start-args \\\"--system-initiated\\\"\"\n ) or\n\n process.name : \"OneDriveStandaloneUpdater.exe\" and registry.data.strings : (\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\*\\\\Microsoft.SharePoint.exe\"\n ) or\n\n process.name : \"OneDriveSetup.exe\" and\n registry.value : (\n \"Delete Cached Standalone Update Binary\", \"Delete Cached Update Binary\", \"amd64\", \"Uninstall *\", \"i386\", \"OneDrive\"\n ) and\n registry.data.strings : (\n \"?:\\\\Windows\\\\system32\\\\cmd.exe /q /c * \\\"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\*\\\"\",\n \"?:\\\\Program Files (x86)\\\\Microsoft OneDrive\\\\OneDrive.exe /background *\",\n \"\\\"?:\\\\Program Files (x86)\\\\Microsoft OneDrive\\\\OneDrive.exe\\\" /background *\",\n \"?:\\\\Program Files\\\\Microsoft OneDrive\\\\OneDrive.exe /background *\"\n )\n )\n ) or\n\n /* Slack */\n (\n process.code_signature.trusted == true and process.code_signature.subject_name in (\n \"Slack Technologies, Inc.\", \"Slack Technologies, LLC\"\n ) and process.name : \"slack.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\slack\\\\slack.exe\\\" --process-start-args --startup\"\n )\n ) or\n\n /* WebEx */\n (\n process.code_signature.trusted == true and process.code_signature.subject_name in (\"Cisco WebEx LLC\", \"Cisco Systems, Inc.\") and\n process.name : \"WebexHost.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\WebEx\\\\WebexHost.exe\\\" /daemon /runFrom=autorun\"\n )\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Microsoft Build Engine Using an Alternate Name", + "description": "An instance of MSBuild, the Microsoft Build Engine, was started after being renamed. This is uncommon behavior and may indicate an attempt to run unnoticed or undetected.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Microsoft Build Engine Using an Alternate Name\n\nThe OriginalFileName attribute of a PE (Portable Executable) file is a metadata field that contains the original name of the executable file when compiled or linked. By using this attribute, analysts can identify renamed instances that attackers can use with the intent of evading detections, application allowlists, and other security protections.\n\nThe Microsoft Build Engine is a platform for building applications. This engine, also known as MSBuild, provides an XML schema for a project file that controls how the build platform processes and builds software, and can be abused to proxy execution of code.\n\nThis rule checks for renamed instances of MSBuild, which can indicate an attempt of evading detections, application allowlists, and other security protections.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 109, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.003", + "name": "Rename System Utilities", + "reference": "https://attack.mitre.org/techniques/T1036/003/" + } + ] + }, + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] + } + ] + } + ], + "id": "caa961a9-4962-4dc5-8652-adae3b9cb504", + "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name == \"MSBuild.exe\" and\n not process.name : \"MSBuild.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Credential Access via DCSync", + "description": "This rule identifies when a User Account starts the Active Directory Replication Process. Attackers can use the DCSync technique to get credential information of individual accounts or the entire domain, thus compromising the entire domain.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Credential Access via DCSync\n\nActive Directory replication is the process by which the changes that originate on one domain controller are automatically transferred to other domain controllers that store the same data.\n\nActive Directory data consists of objects that have properties, or attributes. Each object is an instance of an object class, and object classes and their respective attributes are defined in the Active Directory schema. Objects are defined by the values of their attributes, and changes to attribute values must be transferred from the domain controller on which they occur to every other domain controller that stores a replica of an affected object.\n\nAdversaries can use the DCSync technique that uses Windows Domain Controller's API to simulate the replication process from a remote domain controller, compromising major credential material such as the Kerberos krbtgt keys used legitimately for tickets creation, but also tickets forging by attackers. This attack requires some extended privileges to succeed (DS-Replication-Get-Changes and DS-Replication-Get-Changes-All), which are granted by default to members of the Administrators, Domain Admins, Enterprise Admins, and Domain Controllers groups. Privileged accounts can be abused to grant controlled objects the right to DCsync/Replicate.\n\nMore details can be found on [Threat Hunter Playbook](https://threathunterplaybook.com/library/windows/active_directory_replication.html?highlight=dcsync#directory-replication-services-auditing) and [The Hacker Recipes](https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync).\n\nThis rule monitors for Event ID 4662 (Operation was performed on an Active Directory object) and identifies events that use the access mask 0x100 (Control Access) and properties that contain at least one of the following or their equivalent Schema-Id-GUID (DS-Replication-Get-Changes, DS-Replication-Get-Changes-All, DS-Replication-Get-Changes-In-Filtered-Set). It also filters out events that use computer accounts and also Azure AD Connect MSOL accounts (more details [here](https://techcommunity.microsoft.com/t5/microsoft-defender-for-identity/ad-connect-msol-user-suspected-dcsync-attack/m-p/788028)).\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Correlate security events 4662 and 4624 (Logon Type 3) by their Logon ID (`winlog.logon.id`) on the Domain Controller (DC) that received the replication request. This will tell you where the AD replication request came from, and if it came from another DC or not.\n- Scope which credentials were compromised (for example, whether all accounts were replicated or specific ones).\n\n### False positive analysis\n\n- Administrators may use custom accounts on Azure AD Connect, investigate if it is the case, and if it is properly secured. If noisy in your environment due to expected activity, consider adding the corresponding account as a exception.\n- Although replicating Active Directory (AD) data to non-Domain Controllers is not a common practice and is generally not recommended from a security perspective, some software vendors may require it for their products to function correctly. If this rule is noisy in your environment due to expected activity, consider adding the corresponding account as a exception.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the entire domain or the `krbtgt` user was compromised:\n - Activate your incident response plan for total Active Directory compromise which should include, but not be limited to, a password reset (twice) of the `krbtgt` user.\n- Investigate how the attacker escalated privileges and identify systems they used to conduct lateral movement. Use this information to determine ways the attacker could regain access to the environment.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 110, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Privilege Escalation", + "Data Source: Active Directory", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-180815210510.html", + "https://threathunterplaybook.com/library/windows/active_directory_replication.html?highlight=dcsync#directory-replication-services-auditing", + "https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_ad_replication_non_machine_account.yml", + "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0027_windows_audit_directory_service_access.md", + "https://attack.stealthbits.com/privilege-escalation-using-mimikatz-dcsync", + "https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.006", + "name": "DCSync", + "reference": "https://attack.mitre.org/techniques/T1003/006/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + } + ] + } + ] + } + ], + "id": "1955f4d8-bfd0-48f4-8692-b4cdc3cd571c", + "rule_id": "9f962927-1a4f-45f3-a57b-287f2c7029c1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.AccessMask", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.Properties", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectUserName", + "type": "keyword", + "ecs": false + } + ], + "setup": "The 'Audit Directory Service Access' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Access (Success,Failure)\n```", + "type": "eql", + "query": "any where event.action == \"Directory Service Access\" and\n event.code == \"4662\" and winlog.event_data.Properties : (\n\n /* Control Access Rights/Permissions Symbol */\n\n \"*DS-Replication-Get-Changes*\",\n \"*DS-Replication-Get-Changes-All*\",\n \"*DS-Replication-Get-Changes-In-Filtered-Set*\",\n\n /* Identifying GUID used in ACE */\n\n \"*1131f6ad-9c07-11d1-f79f-00c04fc2dcd2*\",\n \"*1131f6aa-9c07-11d1-f79f-00c04fc2dcd2*\",\n \"*89e95b76-444d-4c62-991a-0facbeda640c*\")\n\n /* The right to perform an operation controlled by an extended access right. */\n\n and winlog.event_data.AccessMask : \"0x100\" and\n not winlog.event_data.SubjectUserName : (\"*$\", \"MSOL_*\", \"OpenDNS_Connector\")\n\n /* The Umbrella AD Connector uses the OpenDNS_Connector account to perform replication */\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "PowerShell Keylogging Script", + "description": "Detects the use of Win32 API Functions that can be used to capture user keystrokes in PowerShell scripts. Attackers use this technique to capture user input, looking for credentials and/or other valuable data.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Keylogging Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can abuse PowerShell capabilities to capture user keystrokes with the goal of stealing credentials and other valuable information as credit card data and confidential conversations.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Determine whether the script stores the captured data locally.\n- Investigate whether the script contains exfiltration capabilities and identify the exfiltration server.\n- Assess network data to determine if the host communicated with the exfiltration server.\n\n### False positive analysis\n\n- Regular users do not have a business justification for using scripting utilities to capture keystrokes, making false positives unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Prioritize the response if this alert involves key executives or potentially valuable targets for espionage.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 110, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/EmpireProject/Empire/blob/master/data/module_source/collection/Get-Keystrokes.ps1", + "https://github.com/MojtabaTajik/FunnyKeylogger/blob/master/FunnyLogger.ps1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1056", + "name": "Input Capture", + "reference": "https://attack.mitre.org/techniques/T1056/", + "subtechnique": [ + { + "id": "T1056.001", + "name": "Keylogging", + "reference": "https://attack.mitre.org/techniques/T1056/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + }, + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + } + ], + "id": "5a27473b-55b7-49a2-b526-9a4e7e4322a7", + "rule_id": "bd2c86a0-8b61-4457-ab38-96943984e889", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n (\n powershell.file.script_block_text : (GetAsyncKeyState or NtUserGetAsyncKeyState or GetKeyboardState or \"Get-Keystrokes\") or\n powershell.file.script_block_text : (\n (SetWindowsHookA or SetWindowsHookW or SetWindowsHookEx or SetWindowsHookExA or NtUserSetWindowsHookEx) and\n (GetForegroundWindow or GetWindowTextA or GetWindowTextW or \"WM_KEYBOARD_LL\" or \"WH_MOUSE_LL\")\n )\n ) and not user.id : \"S-1-5-18\"\n and not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\"\n )\n", + "language": "kuery" + }, + { + "name": "Potential Linux Ransomware Note Creation Detected", + "description": "This rule identifies a sequence of a mass file encryption event in conjunction with the creation of a .txt file with a file name containing ransomware keywords executed by the same process in a 1 second timespan. Ransomware is a type of malware that encrypts a victim's files or systems and demands payment (usually in cryptocurrency) in exchange for the decryption key. One important indicator of a ransomware attack is the mass encryption of the file system, after which a new file extension is added to the file.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Impact", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1486", + "name": "Data Encrypted for Impact", + "reference": "https://attack.mitre.org/techniques/T1486/" + } + ] + } + ], + "id": "399a6fb9-4d89-4e89-b6c1-898834e60357", + "rule_id": "c8935a8b-634a-4449-98f7-bb24d3b2c0af", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by process.entity_id, host.id with maxspan=1s \n [file where host.os.type == \"linux\" and event.type == \"change\" and event.action == \"rename\" and file.extension : \"?*\" \n and process.executable : (\"./*\", \"/tmp/*\", \"/var/tmp/*\", \"/dev/shm/*\", \"/var/run/*\", \"/boot/*\", \"/srv/*\", \"/run/*\") and\n file.path : (\n \"/home/*/Downloads/*\", \"/home/*/Documents/*\", \"/root/*\", \"/bin/*\", \"/usr/bin/*\",\n \"/opt/*\", \"/etc/*\", \"/var/log/*\", \"/var/lib/log/*\", \"/var/backup/*\", \"/var/www/*\")] with runs=25\n [file where host.os.type == \"linux\" and event.action == \"creation\" and file.name : (\n \"*crypt*\", \"*restore*\", \"*lock*\", \"*recovery*\", \"*data*\", \"*read*\", \"*instruction*\", \"*how_to*\", \"*ransom*\"\n )]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Attempt to Deactivate an Okta Policy Rule", + "description": "Detects attempts to deactivate a rule within an Okta policy. An adversary may attempt to deactivate a rule within an Okta policy in order to remove or weaken an organization's security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Deactivate an Okta Policy Rule\n\nIdentity and Access Management (IAM) systems like Okta serve as the first line of defense for an organization's network, and are often targeted by adversaries. By disabling security rules, adversaries can circumvent multi-factor authentication, access controls, or other protective measures enforced by these policies, enabling unauthorized access, privilege escalation, or other malicious activities.\n\nThis rule detects attempts to deactivate a rule within an Okta policy, which could be indicative of an adversary's attempt to weaken an organization's security controls. A threat actor may do this to remove barriers to their activities or enable future attacks.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the deactivation attempt.\n- Check the `okta.outcome.result` field to confirm the policy rule deactivation attempt.\n- Check if there are multiple policy rule deactivation attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the policy rule deactivation attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the deactivation attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the deactivation attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the deactivation attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized policy rule deactivation is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific deactivation technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 207, + "tags": [ + "Use Case: Identity and Access Audit", + "Tactic: Defense Evasion", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if Okta MFA rules are regularly deactivated in your organization." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "049d3f5b-944e-48f5-a198-14a2356ce3fe", + "rule_id": "cc92c835-da92-45c9-9f29-b4992ad621a0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:policy.rule.deactivate\n", + "language": "kuery" + }, + { + "name": "Okta User Session Impersonation", + "description": "A user has initiated a session impersonation granting them access to the environment with the permissions of the user they are impersonating. This would likely indicate Okta administrative access and should only ever occur if requested and expected.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Okta User Session Impersonation\n\nThe detection of an Okta User Session Impersonation indicates that a user has initiated a session impersonation which grants them access with the permissions of the user they are impersonating. This type of activity typically indicates Okta administrative access and should only ever occur if requested and expected.\n\n#### Possible investigation steps\n\n- Identify the actor associated with the impersonation event by checking the `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields.\n- Review the `event.action` field to confirm the initiation of the impersonation event.\n- Check the `event.time` field to understand the timing of the event.\n- Check the `okta.target.id`, `okta.target.type`, `okta.target.alternate_id`, or `okta.target.display_name` to identify the user who was impersonated.\n- Review any activities that occurred during the impersonation session. Look for any activities related to the impersonated user's account during and after the impersonation event.\n\n### False positive analysis\n\n- Verify if the session impersonation was part of an approved activity. Check if it was associated with any documented administrative tasks or troubleshooting efforts.\n- Ensure that the impersonation session was initiated by an authorized individual. You can check this by verifying the `okta.actor.id` or `okta.actor.display_name` against the list of approved administrators.\n\n### Response and remediation\n\n- If the impersonation was not authorized, consider it as a breach. Suspend the user account of the impersonator immediately.\n- Reset the user session and invalidate any active sessions related to the impersonated user.\n- If a specific impersonation technique was used, ensure that systems are patched or configured to prevent such techniques.\n- Conduct a thorough investigation to understand the extent of the breach and the potential impact on the systems and data.\n- Review and update your security policies to prevent such incidents in the future.\n- Implement additional monitoring and logging of Okta events to improve visibility of user actions.", + "version": 207, + "tags": [ + "Use Case: Identity and Access Audit", + "Tactic: Credential Access", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.cloudflare.com/cloudflare-investigation-of-the-january-2022-okta-compromise/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [] + } + ], + "id": "c95365d2-588f-4311-b188-71671df90b09", + "rule_id": "cdbebdc1-dc97-43c6-a538-f26a20c0a911", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:user.session.impersonation.initiate\n", + "language": "kuery" + }, + { + "name": "Interactive Terminal Spawned via Python", + "description": "Identifies when a terminal (tty) is spawned via Python. Attackers may upgrade a simple reverse shell to a fully interactive tty after obtaining initial access to a host.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.006", + "name": "Python", + "reference": "https://attack.mitre.org/techniques/T1059/006/" + } + ] + } + ] + } + ], + "id": "e01a0eaa-7941-4ba5-8fbd-96dde71efbd0", + "rule_id": "d76b02ef-fc95-4001-9297-01cb7412232f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and\n(\n (process.parent.name : \"python*\" and process.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\",\n \"fish\") and process.parent.args_count >= 3 and process.parent.args : \"*pty.spawn*\" and process.parent.args : \"-c\") or\n (process.parent.name : \"python*\" and process.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\",\n \"fish\") and process.args : \"*sh\" and process.args_count == 1 and process.parent.args_count == 1)\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Attempts to Brute Force an Okta User Account", + "description": "Identifies when an Okta user account is locked out 3 times within a 3 hour window. An adversary may attempt a brute force or password spraying attack to obtain unauthorized access to user accounts. The default Okta authentication policy ensures that a user account is locked out after 10 failed authentication attempts.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempts to Brute Force an Okta User Account\n\nBrute force attacks aim to guess user credentials through exhaustive trial-and-error attempts. In this context, Okta accounts are targeted.\n\nThis rule fires when an Okta user account has been locked out 3 times within a 3-hour window. This could indicate an attempted brute force or password spraying attack to gain unauthorized access to the user account. Okta's default authentication policy locks a user account after 10 failed authentication attempts.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.alternate_id` field in the alert. This should give the username of the account being targeted.\n- Review the `okta.event_type` field to understand the nature of the events that led to the account lockout.\n- Check the `okta.severity` and `okta.display_message` fields for more context around the lockout events.\n- Look for correlation of events from the same IP address. Multiple lockouts from the same IP address might indicate a single source for the attack.\n- If the IP is not familiar, investigate it. The IP could be a proxy, VPN, Tor node, cloud datacenter, or a legitimate IP turned malicious.\n- Determine if the lockout events occurred during the user's regular activity hours. Unusual timing may indicate malicious activity.\n- Examine the authentication methods used during the lockout events by checking the `okta.authentication_context.credential_type` field.\n\n### False positive analysis:\n\n- Determine whether the account owner or an internal user made repeated mistakes in entering their credentials, leading to the account lockout.\n- Ensure there are no known network or application issues that might cause these events.\n\n### Response and remediation:\n\n- Alert the user and your IT department immediately.\n- If unauthorized access is confirmed, initiate your incident response process.\n- Investigate the source of the attack. If a specific machine or network is compromised, additional steps may need to be taken to address the issue.\n- Require the affected user to change their password.\n- If the attack is ongoing, consider blocking the IP address initiating the brute force attack.\n- Implement account lockout policies to limit the impact of brute force attacks.\n- Encourage users to use complex, unique passwords and consider implementing multi-factor authentication.\n- Check if the compromised account was used to access or alter any sensitive data or systems.", + "version": 207, + "tags": [ + "Use Case: Identity and Access Audit", + "Tactic: Credential Access", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-180m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "@BenB196", + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "65ba47ea-1c26-4040-bd9e-41930b5bfb57", + "rule_id": "e08ccd49-0380-4b2b-8d71-8000377d6e49", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "threshold", + "query": "event.dataset:okta.system and event.action:user.account.lock\n", + "threshold": { + "field": [ + "okta.actor.alternate_id" + ], + "value": 3 + }, + "index": [ + "filebeat-*", + "logs-okta*" + ], + "language": "kuery" + }, + { + "name": "High Number of Okta User Password Reset or Unlock Attempts", + "description": "Identifies a high number of Okta user password reset or account unlock attempts. An adversary may attempt to obtain unauthorized access to Okta user accounts using these methods and attempt to blend in with normal activity in their target's environment and evade detection.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating High Number of Okta User Password Reset or Unlock Attempts\n\nThis rule is designed to detect a suspiciously high number of password reset or account unlock attempts in Okta. Excessive password resets or account unlocks can be indicative of an attacker's attempt to gain unauthorized access to an account.\n\n#### Possible investigation steps:\n- Identify the actor associated with the excessive attempts. The `okta.actor.alternate_id` field can be used for this purpose.\n- Determine the client used by the actor. You can look at `okta.client.device`, `okta.client.ip`, `okta.client.user_agent.raw_user_agent`, `okta.client.ip_chain.ip`, and `okta.client.geographical_context`.\n- Review the `okta.outcome.result` and `okta.outcome.reason` fields to understand the outcome of the password reset or unlock attempts.\n- Review the event actions associated with these attempts. Look at the `event.action` field and filter for actions related to password reset and account unlock attempts.\n- Check for other similar patterns of behavior from the same actor or IP address. If there is a high number of failed login attempts before the password reset or unlock attempts, this may suggest a brute force attack.\n- Also, look at the times when these attempts were made. If these were made during off-hours, it could further suggest an adversary's activity.\n\n### False positive analysis:\n- This alert might be a false positive if there are legitimate reasons for a high number of password reset or unlock attempts. This could be due to the user forgetting their password or account lockouts due to too many incorrect attempts.\n- Check the actor's past behavior. If this is their usual behavior and they have a valid reason for it, then it might be a false positive.\n\n### Response and remediation:\n- If unauthorized attempts are confirmed, initiate the incident response process.\n- Reset the user's password and enforce MFA re-enrollment, if applicable.\n- Block the IP address or device used in the attempts, if they appear suspicious.\n- If the attack was facilitated by a particular technique, ensure your systems are patched or configured to prevent such techniques.\n- Consider a security review of your Okta policies and rules to ensure they follow security best practices.", + "version": 207, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "@BenB196", + "Austin Songer" + ], + "false_positives": [ + "The number of Okta user password reset or account unlock attempts will likely vary between organizations. To fit this rule to their organization, users can duplicate this rule and edit the schedule and threshold values in the new rule." + ], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "8ac48ea1-4918-4b72-a0a8-ea99863d34ca", + "rule_id": "e90ee3af-45fc-432e-a850-4a58cf14a457", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "threshold", + "query": "event.dataset:okta.system and\n event.action:(system.email.account_unlock.sent_message or system.email.password_reset.sent_message or\n system.sms.send_account_unlock_message or system.sms.send_password_reset_message or\n system.voice.send_account_unlock_call or system.voice.send_password_reset_call or\n user.account.unlock_token)\n", + "threshold": { + "field": [ + "okta.actor.alternate_id" + ], + "value": 5 + }, + "index": [ + "filebeat-*", + "logs-okta*" + ], + "language": "kuery" + }, + { + "name": "WMI Incoming Lateral Movement", + "description": "Identifies processes executed via Windows Management Instrumentation (WMI) on a remote host. This could be indicative of adversary lateral movement, but could be noisy if administrators use WMI to remotely manage hosts.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "1c3fdfb9-05ad-4f1c-894e-652f002a22a3", + "rule_id": "f3475224-b179-4f78-8877-c2bd64c26b88", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.token.integrity_level_name", + "type": "unknown", + "ecs": false + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "source.port", + "type": "long", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan = 2s\n\n /* Accepted Incoming RPC connection by Winmgmt service */\n\n [network where host.os.type == \"windows\" and process.name : \"svchost.exe\" and network.direction : (\"incoming\", \"ingress\") and\n source.ip != \"127.0.0.1\" and source.ip != \"::1\" and source.port >= 49152 and destination.port >= 49152\n ]\n\n /* Excluding Common FPs Nessus and SCCM */\n\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"WmiPrvSE.exe\" and \n not process.Ext.token.integrity_level_name : \"system\" and not user.id : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\") and \n not process.executable : \n (\"?:\\\\Program Files\\\\HPWBEM\\\\Tools\\\\hpsum_swdiscovery.exe\", \n \"?:\\\\Windows\\\\CCM\\\\Ccm32BitLauncher.exe\", \n \"?:\\\\Windows\\\\System32\\\\wbem\\\\mofcomp.exe\", \n \"?:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\csc.exe\", \n \"?:\\\\Windows\\\\System32\\\\powercfg.exe\") and \n not (process.executable : \"?:\\\\Windows\\\\System32\\\\msiexec.exe\" and process.args : \"REBOOT=ReallySuppress\") and \n not (process.executable : \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\appcmd.exe\" and process.args : \"uninstall\")\n ]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Potential Credential Access via Windows Utilities", + "description": "Identifies the execution of known Windows utilities often abused to dump LSASS memory or the Active Directory database (NTDS.dit) in preparation for credential access.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Credential Access via Windows Utilities\n\nLocal Security Authority Server Service (LSASS) is a process in Microsoft Windows operating systems that is responsible for enforcing security policy on the system. It verifies users logging on to a Windows computer or server, handles password changes, and creates access tokens.\n\nThe `Ntds.dit` file is a database that stores Active Directory data, including information about user objects, groups, and group membership.\n\nThis rule looks for the execution of utilities that can extract credential data from the LSASS memory and Active Directory `Ntds.dit` file.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to identify what information was targeted.\n- Identify the target computer and its role in the IT environment.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If the host is a domain controller (DC):\n - Activate your incident response plan for total Active Directory compromise.\n - Review the privileges assigned to users that can access the DCs, to ensure that the least privilege principle is being followed and to reduce the attack surface.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 109, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://lolbas-project.github.io/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + }, + { + "id": "T1003.003", + "name": "NTDS", + "reference": "https://attack.mitre.org/techniques/T1003/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.011", + "name": "Rundll32", + "reference": "https://attack.mitre.org/techniques/T1218/011/" + } + ] + } + ] + } + ], + "id": "f2a81581-157b-4cea-b32a-b4ab8853d272", + "rule_id": "00140285-b827-4aee-aa09-8113f58a08f3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (\n (process.pe.original_file_name : \"procdump\" or process.name : \"procdump.exe\") and process.args : \"-ma\"\n ) or\n (\n process.name : \"ProcessDump.exe\" and not process.parent.executable regex~ \"\"\"C:\\\\Program Files( \\(x86\\))?\\\\Cisco Systems\\\\.*\"\"\"\n ) or\n (\n (process.pe.original_file_name : \"WriteMiniDump.exe\" or process.name : \"WriteMiniDump.exe\") and\n not process.parent.executable regex~ \"\"\"C:\\\\Program Files( \\(x86\\))?\\\\Steam\\\\.*\"\"\"\n ) or\n (\n (process.pe.original_file_name : \"RUNDLL32.EXE\" or process.name : \"RUNDLL32.exe\") and\n (process.args : \"MiniDump*\" or process.command_line : \"*comsvcs.dll*#24*\")\n ) or\n (\n (process.pe.original_file_name : \"RdrLeakDiag.exe\" or process.name : \"RdrLeakDiag.exe\") and\n process.args : \"/fullmemdmp\"\n ) or\n (\n (process.pe.original_file_name : \"SqlDumper.exe\" or process.name : \"SqlDumper.exe\") and\n process.args : \"0x01100*\") or\n (\n (process.pe.original_file_name : \"TTTracer.exe\" or process.name : \"TTTracer.exe\") and\n process.args : \"-dumpFull\" and process.args : \"-attach\") or\n (\n (process.pe.original_file_name : \"ntdsutil.exe\" or process.name : \"ntdsutil.exe\") and\n process.args : \"create*full*\") or\n (\n (process.pe.original_file_name : \"diskshadow.exe\" or process.name : \"diskshadow.exe\") and process.args : \"/s\")\n)\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*", + "logs-system.*" + ] + }, + { + "name": "System Shells via Services", + "description": "Windows services typically run as SYSTEM and can be used as a privilege escalation opportunity. Malware or penetration testers may run a shell as a service to gain SYSTEM permissions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating System Shells via Services\n\nAttackers may configure existing services or create new ones to execute system shells to elevate their privileges from administrator to SYSTEM. They can also configure services to execute these shells with persistence payloads.\n\nThis rule looks for system shells being spawned by `services.exe`, which is compatible with the above behavior.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify how the service was created or modified. Look for registry changes events or Windows events related to service activities (for example, 4697 and/or 7045).\n - Examine the created and existent services, the executables or drivers referenced, and command line arguments for suspicious entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the referenced files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Check for commands executed under the spawned shell.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the service or restore it to the original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + } + ], + "id": "dd9f068a-19ed-48d9-8753-98bc366bca73", + "rule_id": "0022d47d-39c7-4f69-a232-4fe9dc7a3acd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"services.exe\" and\n process.name : (\"cmd.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and\n\n /* Third party FP's */\n not process.args : \"NVDisplay.ContainerLocalSystem\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Remote System Discovery Commands", + "description": "Discovery of remote system information using built-in commands, which may be used to move laterally.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remote System Discovery Commands\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `arp` or `nbstat` utilities to enumerate remote systems in the environment, which is useful for attackers to identify lateral movement targets.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "building_block_type": "default", + "version": 109, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Resources: Investigation Guide", + "Data Source: Elastic Defend", + "Data Source: Elastic Endgame", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1016", + "name": "System Network Configuration Discovery", + "reference": "https://attack.mitre.org/techniques/T1016/" + }, + { + "id": "T1018", + "name": "Remote System Discovery", + "reference": "https://attack.mitre.org/techniques/T1018/" + } + ] + } + ], + "id": "a4e9a570-21b4-464e-97a0-1b4777445ac3", + "rule_id": "0635c542-1b96-4335-9b47-126582d2c19a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n ((process.name : \"nbtstat.exe\" and process.args : (\"-n\", \"-s\")) or\n (process.name : \"arp.exe\" and process.args : \"-a\") or\n (process.name : \"nltest.exe\" and process.args : (\"/dclist\", \"/dsgetdc\")) or\n (process.name : \"nslookup.exe\" and process.args : \"*_ldap._tcp.dc.*\") or\n (process.name: (\"dsquery.exe\", \"dsget.exe\") and process.args: \"subnet\") or\n ((((process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or\n ((process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and not \n process.parent.name : \"net.exe\")) and \n process.args : \"group\" and process.args : \"/domain\" and not process.args : \"/add\")))\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Process Termination followed by Deletion", + "description": "Identifies a process termination event quickly followed by the deletion of its executable file. Malware tools and other non-native files dropped or created on a system by an adversary may leave traces to indicate to what occurred. Removal of these files can occur during an intrusion, or as part of a post-intrusion process to minimize the adversary's footprint.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Process Termination followed by Deletion\n\nThis rule identifies an unsigned process termination event quickly followed by the deletion of its executable file. Attackers can delete programs after their execution in an attempt to cover their tracks in a host.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, command line and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately, as programs that exhibit this behavior, such as installers and similar utilities, should be signed. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + } + ] + }, + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.004", + "name": "File Deletion", + "reference": "https://attack.mitre.org/techniques/T1070/004/" + } + ] + } + ] + } + ], + "id": "bf39a3d4-6961-4a61-8d32-787e18009370", + "rule_id": "09443c92-46b3-45a4-8f25-383b028b258d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=5s\n [process where host.os.type == \"windows\" and event.type == \"end\" and\n process.code_signature.trusted != true and\n not process.executable : (\"C:\\\\Windows\\\\SoftwareDistribution\\\\*.exe\", \"C:\\\\Windows\\\\WinSxS\\\\*.exe\")\n ] by process.executable\n [file where host.os.type == \"windows\" and event.type == \"deletion\" and file.extension : (\"exe\", \"scr\", \"com\") and\n not process.executable :\n (\"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Windows\\\\System32\\\\drvinst.exe\") and\n not file.path : (\"?:\\\\Program Files\\\\*.exe\", \"?:\\\\Program Files (x86)\\\\*.exe\")\n ] by file.path\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Potential DLL Side-Loading via Trusted Microsoft Programs", + "description": "Identifies an instance of a Windows trusted program that is known to be vulnerable to DLL Search Order Hijacking starting after being renamed or from a non-standard path. This is uncommon behavior and may indicate an attempt to evade defenses via side loading a malicious DLL within the memory space of one of those processes.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + }, + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.002", + "name": "DLL Side-Loading", + "reference": "https://attack.mitre.org/techniques/T1574/002/" + } + ] + } + ] + } + ], + "id": "12a61b07-348e-4d50-8e7c-5ce5b499eb03", + "rule_id": "1160dcdb-0a0a-4a79-91d8-9b84616edebd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name in (\"WinWord.exe\", \"EXPLORER.EXE\", \"w3wp.exe\", \"DISM.EXE\") and\n not (process.name : (\"winword.exe\", \"explorer.exe\", \"w3wp.exe\", \"Dism.exe\") or\n process.executable : (\"?:\\\\Windows\\\\explorer.exe\",\n \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\Office*\\\\WINWORD.EXE\",\n \"?:\\\\Program Files?(x86)\\\\Microsoft Office\\\\root\\\\Office*\\\\WINWORD.EXE\",\n \"?:\\\\Windows\\\\System32\\\\Dism.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\Dism.exe\",\n \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\w3wp.exe\")\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "UAC Bypass via Windows Firewall Snap-In Hijack", + "description": "Identifies attempts to bypass User Account Control (UAC) by hijacking the Microsoft Management Console (MMC) Windows Firewall snap-in. Attackers bypass UAC to stealthily execute code with elevated permissions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating UAC Bypass via Windows Firewall Snap-In Hijack\n\nWindows User Account Control (UAC) allows a program to elevate its privileges (tracked as low to high integrity levels) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. UAC can deny an operation under high-integrity enforcement, or allow the user to perform the action if they are in the local administrators group and enter an administrator password when prompted.\n\nFor more information about the UAC and how it works, check the [official Microsoft docs page](https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works).\n\nThis rule identifies attempts to bypass User Account Control (UAC) by hijacking the Microsoft Management Console (MMC) Windows Firewall snap-in. Attackers bypass UAC to stealthily execute code with elevated permissions.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze any suspicious spawned processes using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/AzAgarampur/byeintegrity-uac" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + }, + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.014", + "name": "MMC", + "reference": "https://attack.mitre.org/techniques/T1218/014/" + } + ] + } + ] + } + ], + "id": "f3809a76-985b-4399-9894-98ff3356196e", + "rule_id": "1178ae09-5aff-460a-9f2f-455cd0ac4d8e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name == \"mmc.exe\" and\n /* process.Ext.token.integrity_level_name == \"high\" can be added in future for tuning */\n /* args of the Windows Firewall SnapIn */\n process.parent.args == \"WF.msc\" and process.name != \"WerFault.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "PowerShell Script with Token Impersonation Capabilities", + "description": "Detects scripts that contain PowerShell functions, structures, or Windows API functions related to token impersonation/theft. Attackers may duplicate then impersonate another user's token to escalate privileges and bypass access controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 8, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/decoder-it/psgetsystem", + "https://github.com/PowerShellMafia/PowerSploit/blob/master/Privesc/Get-System.ps1", + "https://github.com/EmpireProject/Empire/blob/master/data/module_source/privesc/Invoke-MS16032.ps1", + "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/", + "subtechnique": [ + { + "id": "T1134.001", + "name": "Token Impersonation/Theft", + "reference": "https://attack.mitre.org/techniques/T1134/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + }, + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + } + ], + "id": "48c7c4e6-baa1-4d33-b577-3fa23751fc10", + "rule_id": "11dd9713-0ec6-4110-9707-32daae1ee68c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.directory", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be configured (Enable).\n\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text:(\n \"Invoke-TokenManipulation\" or\n \"ImpersonateNamedPipeClient\" or\n \"NtImpersonateThread\" or\n (\n \"STARTUPINFOEX\" and\n \"UpdateProcThreadAttribute\"\n ) or\n (\n \"AdjustTokenPrivileges\" and\n \"SeDebugPrivilege\"\n ) or\n (\n (\"DuplicateToken\" or\n \"DuplicateTokenEx\") and\n (\"SetThreadToken\" or\n \"ImpersonateLoggedOnUser\" or\n \"CreateProcessWithTokenW\" or\n \"CreatePRocessAsUserW\" or\n \"CreateProcessAsUserA\")\n ) \n ) and\n not (\n user.id:(\"S-1-5-18\" or \"S-1-5-19\" or \"S-1-5-20\") and\n file.directory: \"C:\\\\ProgramData\\\\Microsoft\\\\Windows Defender Advanced Threat Protection\\\\Downloads\"\n ) and\n not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n", + "language": "kuery" + }, + { + "name": "Third-party Backup Files Deleted via Unexpected Process", + "description": "Identifies the deletion of backup files, saved using third-party software, by a process outside of the backup suite. Adversaries may delete Backup files to ensure that recovery from a ransomware attack is less likely.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Third-party Backup Files Deleted via Unexpected Process\n\nBackups are a significant obstacle for any ransomware operation. They allow the victim to resume business by performing data recovery, making them a valuable target.\n\nAttackers can delete backups from the host and gain access to backup servers to remove centralized backups for the environment, ensuring that victims have no alternatives to paying the ransom.\n\nThis rule identifies file deletions performed by a process that does not belong to the backup suite and aims to delete Veritas or Veeam backups.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check if any files on the host machine have been encrypted.\n\n### False positive analysis\n\n- This rule can be triggered by the manual removal of backup files and by removal using other third-party tools that are not from the backup suite. Exceptions can be added for specific accounts and executables, preferably tied together.\n\n### Related rules\n\n- Deleting Backup Catalogs with Wbadmin - 581add16-df76-42bb-af8e-c979bfb39a59\n- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921\n- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4\n- Volume Shadow Copy Deletion via WMIC - dc9c1f74-dac3-48e3-b47f-eb79db358f57\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- Perform data recovery locally or restore the backups from replicated copies (Cloud, other servers, etc.).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Impact", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Certain utilities that delete files for disk cleanup or Administrators manually removing backup files." + ], + "references": [ + "https://www.advintel.io/post/backup-removal-solutions-from-conti-ransomware-with-love" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" + }, + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + } + ], + "id": "1e501749-6d2f-44c1-b61d-302082f21ec3", + "rule_id": "11ea6bec-ebde-4d71-a8e9-784948f8e3e9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"deletion\" and\n (\n /* Veeam Related Backup Files */\n (file.extension : (\"VBK\", \"VIB\", \"VBM\") and\n not (\n process.executable : (\"?:\\\\Windows\\\\*\", \"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\") and\n (process.code_signature.trusted == true and process.code_signature.subject_name : \"Veeam Software Group GmbH\")\n )) or\n\n /* Veritas Backup Exec Related Backup File */\n (file.extension : \"BKF\" and\n not process.executable : (\"?:\\\\Program Files\\\\Veritas\\\\Backup Exec\\\\*\",\n \"?:\\\\Program Files (x86)\\\\Veritas\\\\Backup Exec\\\\*\") and\n not file.path : (\"?:\\\\ProgramData\\\\Trend Micro\\\\*\",\n \"?:\\\\Program Files (x86)\\\\Trend Micro\\\\*\",\n \"?:\\\\$RECYCLE.BIN\\\\*\"))\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Component Object Model Hijacking", + "description": "Identifies Component Object Model (COM) hijacking via registry modification. Adversaries may establish persistence by executing malicious content triggered by hijacked references to COM objects.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Component Object Model Hijacking\n\nAdversaries can insert malicious code that can be executed in place of legitimate software through hijacking the COM references and relationships as a means of persistence.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Retrieve the file referenced in the registry and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- Some Microsoft executables will reference the LocalServer32 registry key value for the location of external COM objects.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Tactic: Privilege Escalation", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://bohops.com/2018/08/18/abusing-the-com-registry-structure-part-2-loading-techniques-for-evasion-and-persistence/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.015", + "name": "Component Object Model Hijacking", + "reference": "https://attack.mitre.org/techniques/T1546/015/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.015", + "name": "Component Object Model Hijacking", + "reference": "https://attack.mitre.org/techniques/T1546/015/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "2de2bf48-e9a9-4fb7-a964-e797e5e854ab", + "rule_id": "16a52c14-7883-47af-8745-9357803f0d4c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n /* not necessary but good for filtering privileged installations */\n user.domain != \"NT AUTHORITY\" and\n (\n (\n registry.path : (\"HK*\\\\InprocServer32\\\\\", \"\\\\REGISTRY\\\\*\\\\InprocServer32\\\\\") and\n registry.data.strings: (\"scrobj.dll\", \"C:\\\\*\\\\scrobj.dll\") and\n not registry.path : \"*\\\\{06290BD*-48AA-11D2-8432-006008C3FBFC}\\\\*\"\n ) or\n\n /* in general COM Registry changes on Users Hive is less noisy and worth alerting */\n (registry.path : (\n \"HKEY_USERS\\\\*\\\\InprocServer32\\\\\",\n \"HKEY_USERS\\\\*\\\\LocalServer32\\\\\",\n \"HKEY_USERS\\\\*\\\\DelegateExecute*\",\n \"HKEY_USERS\\\\*\\\\TreatAs*\",\n \"HKEY_USERS\\\\*\\\\ScriptletURL*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\InprocServer32\\\\\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\LocalServer32\\\\\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\DelegateExecute*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\TreatAs*\", \n \"\\\\REGISTRY\\\\USER\\\\*\\\\ScriptletURL*\"\n ) and not \n (\n process.executable : \"?:\\\\Program Files*\\\\Veeam\\\\Backup and Replication\\\\Console\\\\veeam.backup.shell.exe\" and\n registry.path : (\n \"HKEY_USERS\\\\S-1-*_Classes\\\\CLSID\\\\*\\\\LocalServer32\\\\\",\n \"\\\\REGISTRY\\\\USER\\\\S-1-*_Classes\\\\CLSID\\\\*\\\\LocalServer32\\\\\"))\n ) or\n\n (\n registry.path : (\"HKLM\\\\*\\\\InProcServer32\\\\*\", \"\\\\REGISTRY\\\\MACHINE\\\\*\\\\InProcServer32\\\\*\") and\n registry.data.strings : (\"*\\\\Users\\\\*\", \"*\\\\ProgramData\\\\*\")\n )\n ) and\n\n /* removes false-positives generated by OneDrive and Teams */\n not process.name: (\"OneDrive.exe\", \"OneDriveSetup.exe\", \"FileSyncConfig.exe\", \"Teams.exe\") and\n\n /* Teams DLL loaded by regsvr */\n not (process.name: \"regsvr32.exe\" and registry.data.strings : \"*Microsoft.Teams.*.dll\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "New Systemd Service Created by Previously Unknown Process", + "description": "Systemd service files are configuration files in Linux systems used to define and manage system services. Malicious actors can leverage systemd service files to achieve persistence by creating or modifying service files to execute malicious commands or payloads during system startup. This allows them to maintain unauthorized access, execute additional malicious activities, or evade detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://opensource.com/article/20/7/systemd-timers", + "https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.002", + "name": "Systemd Service", + "reference": "https://attack.mitre.org/techniques/T1543/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.002", + "name": "Systemd Service", + "reference": "https://attack.mitre.org/techniques/T1543/002/" + } + ] + } + ] + } + ], + "id": "73ac748d-8878-42c0-bcb1-c5dc21376318", + "rule_id": "17b0a495-4d9f-414c-8ad0-92f018b8e001", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "host.os.type:linux and event.category:file and event.action:(\"creation\" or \"file_create_event\") and file.path:(\n /etc/systemd/system/* or \n /usr/local/lib/systemd/system/* or \n /lib/systemd/system/* or \n /usr/lib/systemd/system/* or \n /home/*/.config/systemd/user/*\n) and \nnot (\n process.name:(\n \"dpkg\" or \"dockerd\" or \"rpm\" or \"snapd\" or \"yum\" or \"exe\" or \"dnf\" or \"dnf-automatic\" or python* or \"puppetd\" or\n \"elastic-agent\" or \"cinc-client\" or \"chef-client\" or \"pacman\" or \"puppet\" or \"cloudflared\"\n ) or \n file.extension:(\"swp\" or \"swpx\")\n)\n", + "new_terms_fields": [ + "host.id", + "file.path", + "process.executable" + ], + "history_window_start": "now-10d", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Rare AWS Error Code", + "description": "A machine learning job detected an unusual error in a CloudTrail message. These can be byproducts of attempted or successful persistence, privilege escalation, defense evasion, discovery, lateral movement, or collection.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Rare AWS Error Code\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.\n\nThis rule uses a machine learning job to detect an unusual error in a CloudTrail message. This can be byproducts of attempted or successful persistence, privilege escalation, defense evasion, discovery, lateral movement, or collection.\n\nDetection alerts from this rule indicate a rare and unusual error code that was associated with the response to an AWS API command or method call.\n\n#### Possible investigation steps\n\n- Examine the history of the error. If the error only manifested recently, it might be related to recent changes in an automation module or script. You can find the error in the `aws.cloudtrail.error_code field` field.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, or network administrator activity.\n- Examine the request parameters. These may indicate the source of the program or the nature of the task being performed when the error occurred.\n - Check whether the error is related to unsuccessful attempts to enumerate or access objects, data, or secrets.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Contact the account owner and confirm whether they are aware of this activity if suspicious.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.\n- The adoption of new services or the addition of new functionality to scripts may generate false positives.\n\n### Related Rules\n\n- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276\n- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1\n- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1\n- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-2h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Rare and unusual errors may indicate an impending service failure state. Rare and unusual user error activity can also be due to manual troubleshooting or reconfiguration attempts by insufficiently privileged users, bugs in cloud automation scripts or workflows, or changes to IAM privileges." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "01ad6d2a-c855-4479-a354-89afdb4249d0", + "rule_id": "19de8096-e2b0-4bd8-80c9-34a820813fff", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": "rare_error_code" + }, + { + "name": "Potential Internal Linux SSH Brute Force Detected", + "description": "Identifies multiple internal consecutive login failures targeting a user account from the same source address within a short time interval. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to these accounts.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Internal Linux SSH Brute Force Detected\n\nThe rule identifies consecutive internal SSH login failures targeting a user account from the same source IP address to the same target host indicating brute force login attempts.\n\n#### Possible investigation steps\n\n- Investigate the login failure user name(s).\n- Investigate the source IP address of the failed ssh login attempt(s).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Infrastructure or availability issue.\n\n### Related Rules\n\n- Potential External Linux SSH Brute Force Detected - fa210b61-b627-4e5e-86f4-17e8270656ab\n- Potential SSH Password Guessing - 8cb84371-d053-4f4f-bce0-c74990e28f28\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 8, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 5, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/", + "subtechnique": [ + { + "id": "T1110.001", + "name": "Password Guessing", + "reference": "https://attack.mitre.org/techniques/T1110/001/" + }, + { + "id": "T1110.003", + "name": "Password Spraying", + "reference": "https://attack.mitre.org/techniques/T1110/003/" + } + ] + } + ] + } + ], + "id": "fcb0fbe9-4252-4634-9b74-79cf87cc31bc", + "rule_id": "1c27fa22-7727-4dd3-81c0-de6da5555feb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, source.ip, user.name with maxspan=15s\n [ authentication where host.os.type == \"linux\" and \n event.action in (\"ssh_login\", \"user_login\") and event.outcome == \"failure\" and\n cidrmatch(source.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \n \"::1\", \"FE80::/10\", \"FF00::/8\") ] with runs = 10\n", + "language": "eql", + "index": [ + "logs-system.auth-*" + ] + }, + { + "name": "Remote File Download via Script Interpreter", + "description": "Identifies built-in Windows script interpreters (cscript.exe or wscript.exe) being used to download an executable file from a remote destination.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remote File Download via Script Interpreter\n\nThe Windows Script Host (WSH) is a Windows automation technology, which is ideal for non-interactive scripting needs, such as logon scripting, administrative scripting, and machine automation.\n\nAttackers commonly use WSH scripts as their initial access method, acting like droppers for second stage payloads, but can also use them to download tools and utilities needed to accomplish their goals.\n\nThis rule looks for DLLs and executables downloaded using `cscript.exe` or `wscript.exe`.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze both the script and the executable involved using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- The usage of these script engines by regular users is unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.005", + "name": "Visual Basic", + "reference": "https://attack.mitre.org/techniques/T1059/005/" + } + ] + } + ] + } + ], + "id": "6e1c751d-cd9c-4958-9143-cf188211c74c", + "rule_id": "1d276579-3380-4095-ad38-e596a01bc64f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "network.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, process.entity_id\n [network where host.os.type == \"windows\" and process.name : (\"wscript.exe\", \"cscript.exe\") and network.protocol != \"dns\" and\n network.direction : (\"outgoing\", \"egress\") and network.type == \"ipv4\" and destination.ip != \"127.0.0.1\"\n ]\n [file where host.os.type == \"windows\" and event.type == \"creation\" and file.extension : (\"exe\", \"dll\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Potential Antimalware Scan Interface Bypass via PowerShell", + "description": "Identifies the execution of PowerShell script with keywords related to different Antimalware Scan Interface (AMSI) bypasses. An adversary may attempt first to disable AMSI before executing further malicious powershell scripts to evade detection.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Antimalware Scan Interface Bypass via PowerShell\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nThe Windows Antimalware Scan Interface (AMSI) is a versatile interface standard that allows your applications and services to integrate with any antimalware product on a machine. AMSI integrates with multiple Windows components, ranging from User Account Control (UAC) to VBA macros and PowerShell.\n\nThis rule identifies scripts that contain methods and classes that can be abused to bypass AMSI.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Determine whether the script was executed and capture relevant information, such as arguments that reveal intent or are indicators of compromise (IoCs).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate commands and scripts executed after this activity was observed.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe:\n - Observe and collect information about the following activities in the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: PowerShell Logs", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/S3cur3Th1sSh1t/Amsi-Bypass-Powershell" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "cbd828d7-3e61-490b-8f20-4ca87bce467e", + "rule_id": "1f0a69c0-3392-4adf-b7d5-6012fd292da8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:\"process\" and host.os.type:windows and\n (powershell.file.script_block_text :\n (\"System.Management.Automation.AmsiUtils\" or\n\t\t\t\t amsiInitFailed or \n\t\t\t\t \"Invoke-AmsiBypass\" or \n\t\t\t\t \"Bypass.AMSI\" or \n\t\t\t\t \"amsi.dll\" or \n\t\t\t\t AntimalwareProvider or \n\t\t\t\t amsiSession or \n\t\t\t\t amsiContext or\n\t\t\t\t AmsiInitialize or \n\t\t\t\t unloadobfuscated or \n\t\t\t\t unloadsilent or \n\t\t\t\t AmsiX64 or \n\t\t\t\t AmsiX32 or \n\t\t\t\t FindAmsiFun) or\n powershell.file.script_block_text:(\"[System.Runtime.InteropServices.Marshal]::Copy\" and \"VirtualProtect\") or\n powershell.file.script_block_text:(\"[Ref].Assembly.GetType(('System.Management.Automation\" and \".SetValue(\")\n )\n and not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n", + "language": "kuery" + }, + { + "name": "Unusual Network Activity from a Windows System Binary", + "description": "Identifies network activity from unexpected system applications. This may indicate adversarial activity as these applications are often leveraged by adversaries to execute code and evade detection.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Network Activity from a Windows System Binary\n\nAttackers can abuse certain trusted developer utilities to proxy the execution of malicious payloads. Since these utilities are usually signed, they can bypass the security controls that were put in place to prevent or detect direct execution.\n\nThis rule identifies network connections established by trusted developer utilities, which can indicate abuse to execute payloads or process masquerading.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- As trusted developer utilities have dual-use purposes, alerts derived from this rule are not essentially malicious. If these utilities are contacting internal or known trusted domains, review their security and consider creating exceptions if the domain is safe.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + }, + { + "id": "T1218.005", + "name": "Mshta", + "reference": "https://attack.mitre.org/techniques/T1218/005/" + } + ] + }, + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + } + ], + "id": "8e881cad-7b85-43b4-bd31-cfd09b93c69f", + "rule_id": "1fe3b299-fbb5-4657-a937-1d746f2c711a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dns.question.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id with maxspan=5m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n\n /* known applocker bypasses */\n (process.name : \"bginfo.exe\" or\n process.name : \"cdb.exe\" or\n process.name : \"control.exe\" or\n process.name : \"cmstp.exe\" or\n process.name : \"csi.exe\" or\n process.name : \"dnx.exe\" or\n process.name : \"fsi.exe\" or\n process.name : \"ieexec.exe\" or\n process.name : \"iexpress.exe\" or\n process.name : \"installutil.exe\" or\n process.name : \"Microsoft.Workflow.Compiler.exe\" or\n process.name : \"MSBuild.exe\" or\n process.name : \"msdt.exe\" or\n process.name : \"mshta.exe\" or\n process.name : \"msiexec.exe\" or\n process.name : \"msxsl.exe\" or\n process.name : \"odbcconf.exe\" or\n process.name : \"rcsi.exe\" or\n process.name : \"regsvr32.exe\" or\n process.name : \"xwizard.exe\")]\n [network where\n (process.name : \"bginfo.exe\" or\n process.name : \"cdb.exe\" or\n process.name : \"control.exe\" or\n process.name : \"cmstp.exe\" or\n process.name : \"csi.exe\" or\n process.name : \"dnx.exe\" or\n process.name : \"fsi.exe\" or\n process.name : \"ieexec.exe\" or\n process.name : \"iexpress.exe\" or\n process.name : \"installutil.exe\" or\n process.name : \"Microsoft.Workflow.Compiler.exe\" or\n process.name : \"MSBuild.exe\" or\n process.name : \"msdt.exe\" or\n process.name : \"mshta.exe\" or\n (\n process.name : \"msiexec.exe\" and not\n dns.question.name : (\n \"ocsp.digicert.com\", \"ocsp.verisign.com\", \"ocsp.comodoca.com\", \"ocsp.entrust.net\", \"ocsp.usertrust.com\",\n \"ocsp.godaddy.com\", \"ocsp.camerfirma.com\", \"ocsp.globalsign.com\", \"ocsp.sectigo.com\", \"*.local\"\n )\n ) or\n process.name : \"msxsl.exe\" or\n process.name : \"odbcconf.exe\" or\n process.name : \"rcsi.exe\" or\n process.name : \"regsvr32.exe\" or\n process.name : \"xwizard.exe\")]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Persistence via Update Orchestrator Service Hijack", + "description": "Identifies potential hijacking of the Microsoft Update Orchestrator Service to establish persistence with an integrity level of SYSTEM.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Persistence via Update Orchestrator Service Hijack\n\nWindows Update Orchestrator Service is a DCOM service used by other components to install Windows updates that are already downloaded. Windows Update Orchestrator Service was vulnerable to elevation of privileges (any user to local system) due to an improper authorization of the callers. The vulnerability affected the Windows 10 and Windows Server Core products. Fixed by Microsoft on Patch Tuesday June 2020.\n\nThis rule will detect uncommon processes spawned by `svchost.exe` with `UsoSvc` as the command line parameters. Attackers can leverage this technique to elevate privileges or maintain persistence.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Use Case: Vulnerability", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/irsl/CVE-2020-1313" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + }, + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/" + } + ] + } + ], + "id": "88ff6fe8-c2d3-447c-948b-e776c93c4ba7", + "rule_id": "265db8f5-fc73-4d0d-b434-6483b56372e2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.executable : \"C:\\\\Windows\\\\System32\\\\svchost.exe\" and\n process.parent.args : \"UsoSvc\" and\n not process.executable :\n (\"?:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\UUS\\\\Packages\\\\*\\\\amd64\\\\MoUsoCoreWorker.exe\",\n \"?:\\\\Windows\\\\System32\\\\UsoClient.exe\",\n \"?:\\\\Windows\\\\System32\\\\MusNotification.exe\",\n \"?:\\\\Windows\\\\System32\\\\MusNotificationUx.exe\",\n \"?:\\\\Windows\\\\System32\\\\MusNotifyIcon.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerMgr.exe\",\n \"?:\\\\Windows\\\\UUS\\\\amd64\\\\MoUsoCoreWorker.exe\",\n \"?:\\\\Windows\\\\System32\\\\MoUsoCoreWorker.exe\",\n \"?:\\\\Windows\\\\UUS\\\\amd64\\\\UsoCoreWorker.exe\",\n \"?:\\\\Windows\\\\System32\\\\UsoCoreWorker.exe\",\n \"?:\\\\Program Files\\\\Common Files\\\\microsoft shared\\\\ClickToRun\\\\OfficeC2RClient.exe\") and\n not process.name : (\"MoUsoCoreWorker.exe\", \"OfficeC2RClient.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Incoming Execution via PowerShell Remoting", + "description": "Identifies remote execution via Windows PowerShell remoting. Windows PowerShell remoting allows a user to run any Windows PowerShell command on one or more remote computers. This could be an indication of lateral movement.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "PowerShell remoting is a dual-use protocol that can be used for benign or malicious activity. It's important to baseline your environment to determine the amount of noise to expect from this tool." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-7.1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.006", + "name": "Windows Remote Management", + "reference": "https://attack.mitre.org/techniques/T1021/006/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "58e0bd07-4f84-4dfc-a68a-09a0ca99407f", + "rule_id": "2772264c-6fb9-4d9d-9014-b416eed21254", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan = 30s\n [network where host.os.type == \"windows\" and network.direction : (\"incoming\", \"ingress\") and destination.port in (5985, 5986) and\n network.protocol == \"http\" and source.ip != \"127.0.0.1\" and source.ip != \"::1\"]\n [process where host.os.type == \"windows\" and \n event.type == \"start\" and process.parent.name : \"wsmprovhost.exe\" and not process.executable : \"?:\\\\Windows\\\\System32\\\\conhost.exe\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "UAC Bypass Attempt via Windows Directory Masquerading", + "description": "Identifies an attempt to bypass User Account Control (UAC) by masquerading as a Microsoft trusted Windows directory. Attackers may bypass UAC to stealthily execute code with elevated permissions.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating UAC Bypass Attempt via Windows Directory Masquerading\n\nWindows User Account Control (UAC) allows a program to elevate its privileges (tracked as low to high integrity levels) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. UAC can deny an operation under high-integrity enforcement, or allow the user to perform the action if they are in the local administrators group and enter an administrator password when prompted.\n\nFor more information about the UAC and how it works, check the [official Microsoft docs page](https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works).\n\nThis rule identifies an attempt to bypass User Account Control (UAC) by masquerading as a Microsoft trusted Windows directory. Attackers may bypass UAC to stealthily execute code with elevated permissions.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze any suspicious spawned processes using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://medium.com/tenable-techblog/uac-bypass-by-mocking-trusted-directories-24a96675f6e" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + }, + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + } + ], + "id": "b6b8fb31-faf8-4ec7-9bb9-29dfb9a88b42", + "rule_id": "290aca65-e94d-403b-ba0f-62f320e63f51", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.args : (\"C:\\\\Windows \\\\system32\\\\*.exe\", \"C:\\\\Windows \\\\SysWOW64\\\\*.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Enumeration of Privileged Local Groups Membership", + "description": "Identifies instances of an unusual process enumerating built-in Windows privileged local groups membership like Administrators or Remote Desktop users.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Enumeration of Privileged Local Groups Membership\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the enumeration of privileged local groups' membership by suspicious processes, and excludes known legitimate utilities and programs installed. Attackers can use this information to decide the next steps of the attack, such as mapping targets for credential compromise and other post-exploitation activities.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the process, host and user involved on the event.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nThe 'Audit Security Group Management' audit policy must be configured (Success).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nAccount Management >\nAudit Security Group Management (Success)\n```\n\nMicrosoft introduced the [event used](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4799) in this detection rule on Windows 10 and Windows Server 2016 or later operating systems.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "version": 208, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1069", + "name": "Permission Groups Discovery", + "reference": "https://attack.mitre.org/techniques/T1069/", + "subtechnique": [ + { + "id": "T1069.001", + "name": "Local Groups", + "reference": "https://attack.mitre.org/techniques/T1069/001/" + } + ] + } + ] + } + ], + "id": "df68a919-7887-4396-9a5f-c3e4b0ce8101", + "rule_id": "291a0de9-937a-4189-94c0-3e847c8b13e4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "group.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.CallerProcessName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectUserName", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetSid", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'Audit Security Group Management' audit policy must be configured (Success).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nAccount Management >\nAudit Security Group Management (Success)\n```\n\nMicrosoft introduced the event used in this detection rule on Windows 10 and Windows Server 2016 or later operating systems.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "new_terms", + "query": "host.os.type:windows and event.category:iam and event.action:user-member-enumerated and \n (\n group.name:(*Admin* or \"RemoteDesktopUsers\") or\n winlog.event_data.TargetSid:(\"S-1-5-32-544\" or \"S-1-5-32-555\")\n ) and \n not (winlog.event_data.SubjectUserName: (*$ or \"LOCAL SERVICE\" or \"NETWORK SERVICE\") or \n winlog.event_data.CallerProcessName:(\"-\" or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\VSSVC.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\SearchIndexer.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\CompatTelRunner.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\oobe\\\\\\\\msoobe.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\net1.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\svchost.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\Netplwiz.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\msiexec.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\CloudExperienceHostBroker.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\wbem\\\\\\\\WmiPrvSE.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\SrTasks.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\diskshadow.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\dfsrs.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\vssadmin.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\dllhost.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\mmc.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\SettingSyncHost.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\inetsrv\\\\\\\\w3wp.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\wsmprovhost.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\spool\\\\\\\\drivers\\\\\\\\x64\\\\\\\\3\\\\\\\\x3jobt3?.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\mstsc.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\esentutl.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\RecoveryDrive.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\SystemPropertiesComputerName.exe or\n *\\:\\\\\\\\Windows\\\\\\\\SysWOW64\\\\\\\\msiexec.exe or\n *\\:\\\\\\\\Windows\\\\\\\\ImmersiveControlPanel\\\\\\\\SystemSettings.exe or\n *\\:\\\\\\\\Windows\\\\\\\\Temp\\\\\\\\rubrik_vmware???\\\\\\\\snaptool.exe or\n *\\:\\\\\\\\Windows\\\\\\\\VeeamVssSupport\\\\\\\\VeeamGuestHelper.exe or\n ?\\:\\\\\\\\WindowsAzure\\\\\\\\*WaAppAgent.exe or\n ?\\:\\\\\\\\Program?Files?\\(x86\\)\\\\\\\\*.exe or\n ?\\:\\\\\\\\Program?Files\\\\\\\\*.exe or\n ?\\:\\\\\\\\$WINDOWS.~BT\\\\\\\\Sources\\\\\\\\*.exe\n )\n )\n", + "new_terms_fields": [ + "host.id", + "winlog.event_data.SubjectUserName", + "winlog.event_data.CallerProcessName" + ], + "history_window_start": "now-14d", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "language": "kuery" + }, + { + "name": "Adobe Hijack Persistence", + "description": "Detects writing executable files that will be automatically launched by Adobe on launch.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Adobe Hijack Persistence\n\nAttackers can replace the `RdrCEF.exe` executable with their own to maintain their access, which will be launched whenever Adobe Acrobat Reader is executed.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://twitter.com/pabraeken/status/997997818362155008" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.010", + "name": "Services File Permissions Weakness", + "reference": "https://attack.mitre.org/techniques/T1574/010/" + } + ] + }, + { + "id": "T1554", + "name": "Compromise Client Software Binary", + "reference": "https://attack.mitre.org/techniques/T1554/" + } + ] + } + ], + "id": "42c2d141-559f-4f5c-808f-2b0f64992c91", + "rule_id": "2bf78aa2-9c56-48de-b139-f169bf99cf86", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n file.path : (\"?:\\\\Program Files (x86)\\\\Adobe\\\\Acrobat Reader DC\\\\Reader\\\\AcroCEF\\\\RdrCEF.exe\",\n \"?:\\\\Program Files\\\\Adobe\\\\Acrobat Reader DC\\\\Reader\\\\AcroCEF\\\\RdrCEF.exe\") and\n not process.name : \"msiexec.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Enumeration of Kernel Modules", + "description": "Loadable Kernel Modules (or LKMs) are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. This identifies attempts to enumerate information about a kernel module.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 206, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Security tools and device drivers may run these programs in order to enumerate kernel modules. Use of these programs by ordinary users is uncommon. These can be exempted by process name or username." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "d4dee1fc-9c8d-46a5-9046-504299999204", + "rule_id": "2d8043ed-5bda-4caf-801c-c1feb7410504", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "event.category:process and host.os.type:linux and event.type:start and (\n (process.name:(lsmod or modinfo)) or \n (process.name:kmod and process.args:list) or \n (process.name:depmod and process.args:(--all or -a))\n) \n", + "new_terms_fields": [ + "host.id", + "process.command_line", + "process.parent.executable" + ], + "history_window_start": "now-14d", + "index": [ + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "Attempt to Disable Syslog Service", + "description": "Adversaries may attempt to disable the syslog service in an attempt to an attempt to disrupt event logging and evade detection by security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "8e9d7202-7234-46b4-ae3b-77881e29da31", + "rule_id": "2f8a1226-5720-437d-9c20-e0029deb6194", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and\n ( (process.name == \"service\" and process.args == \"stop\") or\n (process.name == \"chkconfig\" and process.args == \"off\") or\n (process.name == \"systemctl\" and process.args in (\"disable\", \"stop\", \"kill\"))\n ) and process.args in (\"syslog\", \"rsyslog\", \"syslog-ng\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Startup Folder Persistence via Unsigned Process", + "description": "Identifies files written or modified in the startup folder by unsigned processes. Adversaries may abuse this technique to maintain persistence in an environment.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Startup Folder Persistence via Unsigned Process\n\nThe Windows Startup folder is a special folder in Windows. Programs added to this folder are executed during account logon, without user interaction, providing an excellent way for attackers to maintain persistence.\n\nThis rule looks for unsigned processes writing to the Startup folder locations.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- There is a high possibility of benign legitimate programs being added to Startup folders. This activity could be based on new software installations, patches, or any kind of network administrator related activity. Before undertaking further investigation, verify that this activity is not benign.\n\n### Related rules\n\n- Suspicious Startup Shell Folder Modification - c8b150f0-0164-475b-a75e-74b47800a9ff\n- Persistent Scripts in the Startup Directory - f7c4dc5a-a58d-491d-9f14-9b66507121c0\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + } + ] + } + ] + } + ], + "id": "2083e37d-7327-4c46-8380-1bfd8f025dfd", + "rule_id": "2fba96c0-ade5-4bce-b92f-a5df2509da3f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=5s\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.code_signature.trusted == false and\n /* suspicious paths can be added here */\n process.executable : (\"C:\\\\Users\\\\*.exe\",\n \"C:\\\\ProgramData\\\\*.exe\",\n \"C:\\\\Windows\\\\Temp\\\\*.exe\",\n \"C:\\\\Windows\\\\Tasks\\\\*.exe\",\n \"C:\\\\Intel\\\\*.exe\",\n \"C:\\\\PerfLogs\\\\*.exe\")\n ]\n [file where host.os.type == \"windows\" and event.type != \"deletion\" and user.domain != \"NT AUTHORITY\" and\n file.path : (\"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\*\",\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\StartUp\\\\*\")\n ]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Bypass UAC via Event Viewer", + "description": "Identifies User Account Control (UAC) bypass via eventvwr.exe. Attackers bypass UAC to stealthily execute code with elevated permissions.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Bypass UAC via Event Viewer\n\nWindows User Account Control (UAC) allows a program to elevate its privileges (tracked as low to high integrity levels) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. UAC can deny an operation under high-integrity enforcement, or allow the user to perform the action if they are in the local administrators group and enter an administrator password when prompted.\n\nFor more information about the UAC and how it works, check the [official Microsoft docs page](https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works).\n\nDuring startup, `eventvwr.exe` checks the registry value of the `HKCU\\Software\\Classes\\mscfile\\shell\\open\\command` registry key for the location of `mmc.exe`, which is used to open the `eventvwr.msc` saved console file. If the location of another binary or script is added to this registry value, it will be executed as a high-integrity process without a UAC prompt being displayed to the user. This rule detects this UAC bypass by monitoring processes spawned by `eventvwr.exe` other than `mmc.exe` and `werfault.exe`.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + } + ], + "id": "0232473f-e878-4d13-b708-8d3c4b58bb10", + "rule_id": "31b4c719-f2b4-41f6-a9bd-fce93c2eaf62", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"eventvwr.exe\" and\n not process.executable :\n (\"?:\\\\Windows\\\\SysWOW64\\\\mmc.exe\",\n \"?:\\\\Windows\\\\System32\\\\mmc.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Reverse Shell", + "description": "This detection rule identifies suspicious network traffic patterns associated with TCP reverse shell activity. This activity consists of a parent-child relationship where a network event is followed by the creation of a shell process. An attacker may establish a Linux TCP reverse shell to gain remote access to a target system.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + } + ], + "id": "2a21a2d7-1137-489f-855f-ddb6df2bcf63", + "rule_id": "48b3d2e3-f4e8-41e6-95e6-9b2091228db3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id with maxspan=1s\n [network where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"connection_attempted\", \"connection_accepted\") and \n process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"socat\") and \n destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\"] by process.entity_id\n [process where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"exec\", \"fork\") and \n process.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and \n process.parent.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"socat\") and not \n process.args : \"*imunify360-agent*\"] by process.parent.entity_id\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Deprecated - Potential Reverse Shell via Suspicious Parent Process", + "description": "This detection rule detects the creation of a shell through a suspicious parent child relationship. Any reverse shells spawned by the specified utilities that use a forked process to initialize the connection attempt will be captured through this rule. Attackers may spawn reverse shells to establish persistence onto a target system.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "This rule was deprecated due to its addition to the umbrella `Potential Reverse Shell via Suspicious Child Process` (76e4d92b-61c1-4a95-ab61-5fd94179a1ee) rule.", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + } + ], + "id": "e0eaac95-64d2-47ac-9688-a13638f1f14b", + "rule_id": "4b1a807a-4e7b-414e-8cea-24bf580f6fc5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n", + "type": "eql", + "query": "sequence by host.id, process.parent.entity_id with maxspan=1s\n[ process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"fork\" and (\n (process.name : \"python*\" and process.args == \"-c\" and not process.args == \"/usr/bin/supervisord\") or\n (process.name : \"php*\" and process.args == \"-r\") or\n (process.name : \"perl\" and process.args == \"-e\") or\n (process.name : \"ruby\" and process.args in (\"-e\", \"-rsocket\")) or\n (process.name : \"lua*\" and process.args == \"-e\") or\n (process.name : \"openssl\" and process.args : \"-connect\") or\n (process.name : (\"nc\", \"ncat\", \"netcat\") and process.args_count >= 3 and not process.args == \"-z\") or\n (process.name : \"telnet\" and process.args_count >= 3) or\n (process.name : \"awk\")) and \n process.parent.name : (\"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\") ]\n[ network where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"connection_attempted\", \"connection_accepted\") and \n process.name : (\"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\") and\n destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\" ]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unauthorized Access to an Okta Application", + "description": "Identifies unauthorized access attempts to Okta applications.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 206, + "tags": [ + "Tactic: Initial Access", + "Use Case: Identity and Access Audit", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [] + } + ], + "id": "3caa6156-4b21-446d-bfd1-f62b8d83e46a", + "rule_id": "4edd3e1a-3aa0-499b-8147-4d2ea43b1613", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:app.generic.unauth_app_access_attempt\n", + "language": "kuery" + }, + { + "name": "Exchange Mailbox Export via PowerShell", + "description": "Identifies the use of the Exchange PowerShell cmdlet, New-MailBoxExportRequest, to export the contents of a primary mailbox or archive to a .pst file. Adversaries may target user email to collect sensitive information.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Exchange Mailbox Export via PowerShell\n\nThe `New-MailBoxExportRequest` cmdlet is used to begin the process of exporting contents of a primary mailbox or archive to a .pst file. Note that this is done on a per-mailbox basis and this cmdlet is available only in on-premises Exchange.\nAttackers can abuse this functionality in preparation for exfiltrating contents, which is likely to contain sensitive and strategic data.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the export operation:\n - Identify the user account that performed the action and whether it should perform this kind of action.\n - Contact the account owner and confirm whether they are aware of this activity.\n - Check if this operation was approved and performed according to the organization's change management policy.\n - Retrieve the operation status and use the `Get-MailboxExportRequest` cmdlet to review previous requests.\n - By default, no group in Exchange has the privilege to import or export mailboxes. Investigate administrators that assigned the \"Mailbox Import Export\" privilege for abnormal activity.\n- Investigate if there is a significant quantity of export requests in the alert timeframe. This operation is done on a per-mailbox basis and can be part of a mass export.\n- If the operation was completed successfully:\n - Check if the file is on the path specified in the command.\n - Investigate if the file was compressed, archived, or retrieved by the attacker for exfiltration.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and it is done with proper approval.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If the involved host is not the Exchange server, isolate the host to prevent further post-compromise behavior.\n- Use the `Remove-MailboxExportRequest` cmdlet to remove fully or partially completed export requests.\n- Prioritize cases that involve personally identifiable information (PII) or other classified data.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges of users with the \"Mailbox Import Export\" privilege to ensure that the least privilege principle is being followed.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate exchange system administration activity." + ], + "references": [ + "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/", + "https://docs.microsoft.com/en-us/powershell/module/exchange/new-mailboxexportrequest?view=exchange-ps", + "https://www.elastic.co/security-labs/siestagraph-new-implant-uncovered-in-asean-member-foreign-ministry" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1005", + "name": "Data from Local System", + "reference": "https://attack.mitre.org/techniques/T1005/" + }, + { + "id": "T1114", + "name": "Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/", + "subtechnique": [ + { + "id": "T1114.001", + "name": "Local Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/001/" + }, + { + "id": "T1114.002", + "name": "Remote Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/002/" + } + ] + } + ] + } + ], + "id": "9fc852fc-616d-407f-a801-0f72ca3ae8f5", + "rule_id": "54a81f68-5f2a-421e-8eed-f888278bb712", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : \"New-MailboxExportRequest\" and\n not (\n file.path : (\n ?\\:\\\\\\\\Users\\\\\\\\*\\\\\\\\AppData\\\\\\\\Roaming\\\\\\\\Microsoft\\\\\\\\Exchange\\\\\\\\RemotePowerShell\\\\\\\\*\n ) and file.name:(*.psd1 or *.psm1)\n )\n", + "language": "kuery" + }, + { + "name": "RDP Enabled via Registry", + "description": "Identifies registry write modifications to enable Remote Desktop Protocol (RDP) access. This could be indicative of adversary lateral movement preparation.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating RDP Enabled via Registry\n\nMicrosoft Remote Desktop Protocol (RDP) is a proprietary Microsoft protocol that enables remote connections to other computers, typically over TCP port 3389.\n\nAttackers can use RDP to conduct their actions interactively. Ransomware operators frequently use RDP to access victim servers, often using privileged accounts.\n\nThis rule detects modification of the fDenyTSConnections registry key to the value `0`, which specifies that remote desktop connections are enabled. Attackers can abuse remote registry, use psexec, etc., to enable RDP and move laterally.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the user to check if they are aware of the operation.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check whether it makes sense to enable RDP to this host, given its role in the environment.\n- Check if the host is directly exposed to the internet.\n- Check whether privileged accounts accessed the host shortly after the modification.\n- Review network events within a short timespan of this alert for incoming RDP connection attempts.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Check whether the user should be performing this kind of activity, whether they are aware of it, whether RDP should be open, and whether the action exposes the environment to unnecessary risks.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If RDP is needed, make sure to secure it using firewall rules:\n - Allowlist RDP traffic to specific trusted hosts.\n - Restrict RDP logins to authorized non-administrator accounts, where possible.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.001", + "name": "Remote Desktop Protocol", + "reference": "https://attack.mitre.org/techniques/T1021/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "23ebcca2-4083-467f-8663-c8dd1970233f", + "rule_id": "58aa72ca-d968-4f34-b9f7-bea51d75eb50", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and \n event.type in (\"creation\", \"change\") and\n registry.path : \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Terminal Server\\\\fDenyTSConnections\" and\n registry.data.strings : (\"0\", \"0x00000000\") and\n not process.executable : (\"?:\\\\Windows\\\\System32\\\\SystemPropertiesRemote.exe\", \n \"?:\\\\Windows\\\\System32\\\\SystemPropertiesComputerName.exe\", \n \"?:\\\\Windows\\\\System32\\\\SystemPropertiesAdvanced.exe\", \n \"?:\\\\Windows\\\\System32\\\\SystemSettingsAdminFlows.exe\", \n \"?:\\\\Windows\\\\WinSxS\\\\*\\\\TiWorker.exe\", \n \"?:\\\\Windows\\\\system32\\\\svchost.exe\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Privilege Escalation via InstallerFileTakeOver", + "description": "Identifies a potential exploitation of InstallerTakeOver (CVE-2021-41379) default PoC execution. Successful exploitation allows an unprivileged user to escalate privileges to SYSTEM.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Privilege Escalation via InstallerFileTakeOver\n\nInstallerFileTakeOver is a weaponized escalation of privilege proof of concept (EoP PoC) to the CVE-2021-41379 vulnerability. Upon successful exploitation, an unprivileged user will escalate privileges to SYSTEM/NT AUTHORITY.\n\nThis rule detects the default execution of the PoC, which overwrites the `elevation_service.exe` DACL and copies itself to the location to escalate privileges. An attacker is able to still take over any file that is not in use (locked), which is outside the scope of this rule.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Look for additional processes spawned by the process, command lines, and network communications.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- Verify whether a digital signature exists in the executable, and if it is valid.\n\n### Related rules\n\n- Suspicious DLL Loaded for Persistence or Privilege Escalation - bfeaf89b-a2a7-48a3-817f-e41829dc61ee\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Resources: Investigation Guide", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/klinix5/InstallerFileTakeOver" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "de02bdbf-7183-4f0d-adfa-3e8f7061e1ff", + "rule_id": "58c6d58b-a0d3-412d-b3b8-0981a9400607", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.token.integrity_level_name", + "type": "unknown", + "ecs": false + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.Ext.token.integrity_level_name : \"System\" and\n (\n (process.name : \"elevation_service.exe\" and\n not process.pe.original_file_name == \"elevation_service.exe\") or\n \n (process.name : \"elevation_service.exe\" and\n not process.code_signature.trusted == true) or\n\n (process.parent.name : \"elevation_service.exe\" and\n process.name : (\"rundll32.exe\", \"cmd.exe\", \"powershell.exe\"))\n ) and\n not\n (\n process.name : \"elevation_service.exe\" and process.code_signature.trusted == true and\n process.pe.original_file_name == null\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Secure File Deletion via SDelete Utility", + "description": "Detects file name patterns generated by the use of Sysinternals SDelete utility to securely delete a file via multiple file overwrite and rename operations.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Secure File Deletion via SDelete Utility\n\nSDelete is a tool primarily used for securely deleting data from storage devices, making it unrecoverable. Microsoft develops it as part of the Sysinternals Suite. Although commonly used to delete data securely, attackers can abuse it to delete forensic indicators and remove files as a post-action to a destructive action such as ransomware or data theft to hinder recovery efforts.\n\nThis rule identifies file name patterns generated by the use of SDelete utility to securely delete a file via multiple file overwrite and rename operations.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Examine the command line and identify the files deleted, their importance and whether they could be the target of antiforensics activity.\n\n### False positive analysis\n\n- This is a dual-use tool, meaning its usage is not inherently malicious. Analysts can dismiss the alert if the administrator is aware of the activity, no other suspicious activity was identified, and there are justifications for the execution.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n - Prioritize cases involving critical servers and users.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If important data was encrypted, deleted, or modified, activate your data recovery plan.\n - Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Impact", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.004", + "name": "File Deletion", + "reference": "https://attack.mitre.org/techniques/T1070/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + } + ], + "id": "ecb61d30-c95e-43c0-b62b-92991d417e8f", + "rule_id": "5aee924b-6ceb-4633-980e-1bde8cdb40c5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"change\" and file.name : \"*AAA.AAA\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "PowerShell Suspicious Discovery Related Windows API Functions", + "description": "This rule detects the use of discovery-related Windows API functions in PowerShell Scripts. Attackers can use these functions to perform various situational awareness related activities, like enumerating users, shares, sessions, domain trusts, groups, etc.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Suspicious Discovery Related Windows API Functions\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can use PowerShell to interact with the Win32 API to bypass command line based detections, using libraries like PSReflect or Get-ProcAddress Cmdlet.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Check for additional PowerShell and command-line logs that indicate that imported functions were run.\n\n### False positive analysis\n\n- Discovery activities themselves are not inherently malicious if occurring in isolation, as long as the script does not contain other capabilities, and there are no other alerts related to the user or host; such alerts can be dismissed. However, analysts should keep in mind that this is not a common way of getting information, making it suspicious.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 110, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Tactic: Collection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate PowerShell scripts that make use of these functions." + ], + "references": [ + "https://github.com/BC-SECURITY/Empire/blob/9259e5106986847d2bb770c4289c0c0f1adf2344/data/module_source/situational_awareness/network/powerview.ps1#L21413", + "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1069", + "name": "Permission Groups Discovery", + "reference": "https://attack.mitre.org/techniques/T1069/", + "subtechnique": [ + { + "id": "T1069.001", + "name": "Local Groups", + "reference": "https://attack.mitre.org/techniques/T1069/001/" + } + ] + }, + { + "id": "T1087", + "name": "Account Discovery", + "reference": "https://attack.mitre.org/techniques/T1087/", + "subtechnique": [ + { + "id": "T1087.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1087/001/" + } + ] + }, + { + "id": "T1482", + "name": "Domain Trust Discovery", + "reference": "https://attack.mitre.org/techniques/T1482/" + }, + { + "id": "T1135", + "name": "Network Share Discovery", + "reference": "https://attack.mitre.org/techniques/T1135/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + }, + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1039", + "name": "Data from Network Shared Drive", + "reference": "https://attack.mitre.org/techniques/T1039/" + } + ] + } + ], + "id": "af0c2da2-1016-4843-aca1-44538eb17bd3", + "rule_id": "61ac3638-40a3-44b2-855a-985636ca985e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n NetShareEnum or\n NetWkstaUserEnum or\n NetSessionEnum or\n NetLocalGroupEnum or\n NetLocalGroupGetMembers or\n DsGetSiteName or\n DsEnumerateDomainTrusts or\n WTSEnumerateSessionsEx or\n WTSQuerySessionInformation or\n LsaGetLogonSessionData or\n QueryServiceObjectSecurity or\n GetComputerNameEx or\n NetWkstaGetInfo or\n GetUserNameEx or\n NetUserEnum or\n NetUserGetInfo or\n NetGroupEnum or\n NetGroupGetInfo or\n NetGroupGetUsers or\n NetWkstaTransportEnum or\n NetServerGetInfo or\n LsaEnumerateTrustedDomains or\n NetScheduleJobEnum or\n NetUserModalsGet\n )\n and not user.id : (\"S-1-5-18\" or \"S-1-5-19\")\n", + "language": "kuery" + }, + { + "name": "Network Connection via Signed Binary", + "description": "Binaries signed with trusted digital certificates can execute on Windows systems protected by digital signature validation. Adversaries may use these binaries to 'live off the land' and execute malicious files that could bypass application allowlists and signature validation.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Network Connection via Signed Binary\n\nBy examining the specific traits of Windows binaries (such as process trees, command lines, network connections, registry modifications, and so on) it's possible to establish a baseline of normal activity. Deviations from this baseline can indicate malicious activity, such as masquerading and deserve further investigation.\n\nThis rule looks for the execution of `expand.exe`, `extrac32.exe`, `ieexec.exe`, or `makecab.exe` utilities, followed by a network connection to an external address. Attackers can abuse utilities to execute malicious files or masquerade as those utilities to bypass detections and evade defenses.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n - Investigate the file digital signature and process original filename, if suspicious, treat it as potential malware.\n- Investigate the target host that the signed binary is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of destination IP address and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "a65a0f1f-6ca2-4bc6-b4de-23cc92ee7fff", + "rule_id": "63e65ec3-43b1-45b0-8f2d-45b34291dc44", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and (process.name : \"expand.exe\" or process.name : \"extrac32.exe\" or\n process.name : \"ieexec.exe\" or process.name : \"makecab.exe\") and\n event.type == \"start\"]\n [network where host.os.type == \"windows\" and (process.name : \"expand.exe\" or process.name : \"extrac32.exe\" or\n process.name : \"ieexec.exe\" or process.name : \"makecab.exe\") and\n not cidrmatch(destination.ip,\n \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\", \"192.0.0.0/29\", \"192.0.0.8/32\",\n \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\",\n \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\", \"FE80::/10\", \"FF00::/8\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Connection to Commonly Abused Web Services", + "description": "Adversaries may implement command and control (C2) communications that use common web services to hide their activity. This attack technique is typically targeted at an organization and uses web services common to the victim network, which allows the adversary to blend into legitimate traffic activity. These popular services are typically targeted since they have most likely been used before compromise, which helps malicious traffic blend in.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Connection to Commonly Abused Web Services\n\nAdversaries may use an existing, legitimate external Web service as a means for relaying data to/from a compromised system. Popular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise.\n\nThis rule looks for processes outside known legitimate program locations communicating with a list of services that can be abused for exfiltration or command and control.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Verify whether the digital signature exists in the executable.\n- Identify the operation type (upload, download, tunneling, etc.).\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This rule has a high chance to produce false positives because it detects communication with legitimate services. Noisy false positives can be added as exceptions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1102", + "name": "Web Service", + "reference": "https://attack.mitre.org/techniques/T1102/" + }, + { + "id": "T1568", + "name": "Dynamic Resolution", + "reference": "https://attack.mitre.org/techniques/T1568/", + "subtechnique": [ + { + "id": "T1568.002", + "name": "Domain Generation Algorithms", + "reference": "https://attack.mitre.org/techniques/T1568/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1567", + "name": "Exfiltration Over Web Service", + "reference": "https://attack.mitre.org/techniques/T1567/", + "subtechnique": [ + { + "id": "T1567.001", + "name": "Exfiltration to Code Repository", + "reference": "https://attack.mitre.org/techniques/T1567/001/" + }, + { + "id": "T1567.002", + "name": "Exfiltration to Cloud Storage", + "reference": "https://attack.mitre.org/techniques/T1567/002/" + } + ] + } + ] + } + ], + "id": "31be6f76-5456-4faf-a829-19b3dc977e8d", + "rule_id": "66883649-f908-4a5b-a1e0-54090a1d3a32", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dns.question.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "network where host.os.type == \"windows\" and network.protocol == \"dns\" and\n process.name != null and user.id not in (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\") and\n /* Add new WebSvc domains here */\n dns.question.name :\n (\n \"raw.githubusercontent.*\",\n \"*.pastebin.*\",\n \"*drive.google.*\",\n \"*docs.live.*\",\n \"*api.dropboxapi.*\",\n \"*dropboxusercontent.*\",\n \"*onedrive.*\",\n \"*4shared.*\",\n \"*.file.io\",\n \"*filebin.net\",\n \"*slack-files.com\",\n \"*ghostbin.*\",\n \"*ngrok.*\",\n \"*portmap.*\",\n \"*serveo.net\",\n \"*localtunnel.me\",\n \"*pagekite.me\",\n \"*localxpose.io\",\n \"*notabug.org\",\n \"rawcdn.githack.*\",\n \"paste.nrecom.net\",\n \"zerobin.net\",\n \"controlc.com\",\n \"requestbin.net\",\n \"cdn.discordapp.com\",\n \"discordapp.com\",\n \"discord.com\",\n \"script.google.com\",\n \"script.googleusercontent.com\"\n ) and\n /* Insert noisy false positives here */\n not (\n process.executable : (\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\WWAHost.exe\",\n \"?:\\\\Windows\\\\System32\\\\smartscreen.exe\",\n \"?:\\\\Windows\\\\System32\\\\MicrosoftEdgeCP.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\*\\\\MsMpEng.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Programs\\\\Fiddler\\\\Fiddler.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\Code.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\OneDrive.exe\",\n \"?:\\\\Windows\\\\system32\\\\mobsync.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\mobsync.exe\"\n ) or\n \n /* Discord App */\n (process.name : \"Discord.exe\" and (process.code_signature.subject_name : \"Discord Inc.\" and\n process.code_signature.trusted == true) and dns.question.name : (\"discord.com\", \"cdn.discordapp.com\", \"discordapp.com\")\n ) or \n\n /* MS Sharepoint */\n (process.name : \"Microsoft.SharePoint.exe\" and (process.code_signature.subject_name : \"Microsoft Corporation\" and\n process.code_signature.trusted == true) and dns.question.name : \"onedrive.live.com\"\n ) or \n\n /* Firefox */\n (process.name : \"firefox.exe\" and (process.code_signature.subject_name : \"Mozilla Corporation\" and\n process.code_signature.trusted == true)\n )\n ) \n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Attempt to Modify an Okta Policy", + "description": "Detects attempts to modify an Okta policy. An adversary may attempt to modify an Okta policy in order to weaken an organization's security controls. For example, an adversary may attempt to modify an Okta multi-factor authentication (MFA) policy in order to weaken the authentication requirements for user accounts.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Modify an Okta Policy\n\nModifications to Okta policies may indicate attempts to weaken an organization's security controls. If such an attempt is detected, consider the following steps for investigation.\n\n#### Possible investigation steps:\n- Identify the actor associated with the event. Check the fields `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, and `okta.actor.display_name`.\n- Determine the client used by the actor. You can look at `okta.client.device`, `okta.client.ip`, `okta.client.user_agent.raw_user_agent`, `okta.client.ip_chain.ip`, and `okta.client.geographical_context`.\n- Check the nature of the policy modification. You can review the `okta.target` field, especially `okta.target.display_name` and `okta.target.id`.\n- Examine the `okta.outcome.result` and `okta.outcome.reason` fields to understand the outcome of the modification attempt.\n- Check if there have been other similar modification attempts in a short time span from the same actor or IP address.\n\n### False positive analysis:\n- This alert might be a false positive if Okta policies are regularly updated in your organization as a part of normal operations.\n- Check if the actor associated with the event has legitimate rights to modify the Okta policies.\n- Verify the actor's geographical location and the time of the modification attempt. If these align with the actor's regular behavior, it could be a false positive.\n\n### Response and remediation:\n- If unauthorized modification is confirmed, initiate the incident response process.\n- Lock the actor's account and enforce password change as an immediate response.\n- Reset MFA tokens for the actor and enforce re-enrollment, if applicable.\n- Review any other actions taken by the actor to assess the overall impact.\n- If the attack was facilitated by a particular technique, ensure your systems are patched or configured to prevent such techniques.\n- Consider a security review of your Okta policies and rules to ensure they follow security best practices.", + "version": 206, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if Okta policies are regularly modified in your organization." + ], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "4eddc15b-f1dd-481e-b18e-5ede59d6b8cc", + "rule_id": "6731fbf2-8f28-49ed-9ab9-9a918ceb5a45", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:policy.lifecycle.update\n", + "language": "kuery" + }, + { + "name": "Attempt to Revoke Okta API Token", + "description": "Identifies attempts to revoke an Okta API token. An adversary may attempt to revoke or delete an Okta API token to disrupt an organization's business operations.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Revoke Okta API Token\n\nThe rule alerts when attempts are made to revoke an Okta API token. The API tokens are critical for integration services, and revoking them may lead to disruption in services. Therefore, it's important to validate these activities.\n\n#### Possible investigation steps:\n- Identify the actor associated with the API token revocation attempt. You can use the `okta.actor.alternate_id` field for this purpose.\n- Determine the client used by the actor. Review the `okta.client.device`, `okta.client.ip`, `okta.client.user_agent.raw_user_agent`, `okta.client.ip_chain.ip`, and `okta.client.geographical_context` fields.\n- Verify if the API token revocation was authorized or part of some planned activity.\n- Check the `okta.outcome.result` and `okta.outcome.reason` fields to see if the attempt was successful or failed.\n- Analyze the past activities of the actor involved in this action. An actor who usually performs such activities may indicate a legitimate reason.\n- Evaluate the actions that happened just before and after this event. It can help understand the full context of the activity.\n\n### False positive analysis:\n- It might be a false positive if the action was part of a planned activity or was performed by an authorized person.\n\n### Response and remediation:\n- If unauthorized revocation attempts are confirmed, initiate the incident response process.\n- Block the IP address or device used in the attempts, if they appear suspicious.\n- Reset the user's password and enforce MFA re-enrollment, if applicable.\n- Conduct a review of Okta policies and ensure they are in accordance with security best practices.\n- If the revoked token was used for critical integrations, coordinate with the relevant team to minimize the impact.", + "version": 206, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "If the behavior of revoking Okta API tokens is expected, consider adding exceptions to this rule to filter false positives." + ], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1531", + "name": "Account Access Removal", + "reference": "https://attack.mitre.org/techniques/T1531/" + } + ] + } + ], + "id": "cccbec70-644b-403c-9b04-dccdf1586362", + "rule_id": "676cff2b-450b-4cf1-8ed2-c0c58a4a2dd7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:system.api_token.revoke\n", + "language": "kuery" + }, + { + "name": "High Number of Process Terminations", + "description": "This rule identifies a high number (10) of process terminations via pkill from the same host within a short time period.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating High Number of Process Terminations\n\nAttackers can kill processes for a variety of purposes. For example, they can kill process associated with business applications and databases to release the lock on files used by these applications so they may be encrypted,or stop security and backup solutions, etc.\n\nThis rule identifies a high number (10) of process terminations via pkill from the same host within a short time period.\n\n#### Possible investigation steps\n\n- Examine the entry point to the host and user in action via the Analyse View.\n - Identify the session entry leader and session user.\n- Examine the contents of session leading to the process termination(s) via the Session View.\n - Examine the command execution pattern in the session, which may lead to suspricous activities.\n- Examine the process killed during the malicious execution\n - Identify imment threat to the system from the process killed.\n - Take necessary incident response actions to respawn necessary process.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further destructive behavior, which is commonly associated with this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system or restore it to the operational state.\n- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 109, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Impact", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1489", + "name": "Service Stop", + "reference": "https://attack.mitre.org/techniques/T1489/" + } + ] + } + ], + "id": "077a0e1b-9a04-4521-8e24-57b38fca1ac5", + "rule_id": "67f8443a-4ff3-4a70-916d-3cfa3ae9f02b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "threshold", + "query": "event.category:process and host.os.type:linux and event.type:start and process.name:\"pkill\" and process.args:\"-f\"\n", + "threshold": { + "field": [ + "host.id", + "process.executable", + "user.name" + ], + "value": 10 + }, + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Potential Windows Error Manager Masquerading", + "description": "Identifies suspicious instances of the Windows Error Reporting process (WerFault.exe or Wermgr.exe) with matching command-line and process executable values performing outgoing network connections. This may be indicative of a masquerading attempt to evade suspicious child process behavior detections.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Windows Error Manager Masquerading\n\nBy examining the specific traits of Windows binaries -- such as process trees, command lines, network connections, registry modifications, and so on -- it's possible to establish a baseline of normal activity. Deviations from this baseline can indicate malicious activity, such as masquerading and deserve further investigation.\n\nThis rule identifies a potential malicious process masquerading as `wermgr.exe` or `WerFault.exe`, by looking for a process creation with no arguments followed by a network connection.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legit Application Crash with rare Werfault commandline value" + ], + "references": [ + "https://twitter.com/SBousseaden/status/1235533224337641473", + "https://www.hexacorn.com/blog/2019/09/20/werfault-command-line-switches-v0-1/", + "https://app.any.run/tasks/26051d84-b68e-4afb-8a9a-76921a271b81/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + } + ], + "id": "e5667594-fc8e-4fbd-9e3e-21d2729cf586", + "rule_id": "6ea41894-66c3-4df7-ad6b-2c5074eb3df8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan = 5s\n [process where host.os.type == \"windows\" and event.type:\"start\" and process.name : (\"wermgr.exe\", \"WerFault.exe\") and process.args_count == 1]\n [network where host.os.type == \"windows\" and process.name : (\"wermgr.exe\", \"WerFault.exe\") and network.protocol != \"dns\" and\n network.direction : (\"outgoing\", \"egress\") and destination.ip !=\"::1\" and destination.ip !=\"127.0.0.1\"\n ]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Security Software Discovery using WMIC", + "description": "Identifies the use of Windows Management Instrumentation Command (WMIC) to discover certain System Security Settings such as AntiVirus or Host Firewall details.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Security Software Discovery using WMIC\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `wmic` utility with arguments compatible to the enumeration of the security software installed on the host. Attackers can use this information to decide whether or not to infect a system, disable protections, use bypasses, etc.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "building_block_type": "default", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1518", + "name": "Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/", + "subtechnique": [ + { + "id": "T1518.001", + "name": "Security Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "f01e4795-9316-4eb4-9573-474715b82cda", + "rule_id": "6ea55c81-e2ba-42f2-a134-bccf857ba922", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(process.name : \"wmic.exe\" or process.pe.original_file_name : \"wmic.exe\") and\nprocess.args : \"/namespace:\\\\\\\\root\\\\SecurityCenter2\" and process.args : \"Get\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Modification of Dynamic Linker Preload Shared Object", + "description": "Identifies modification of the dynamic linker preload shared object (ld.so.preload). Adversaries may execute malicious payloads by hijacking the dynamic linker used to load libraries.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 207, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.anomali.com/blog/rocke-evolves-its-arsenal-with-a-new-malware-family-written-in-golang" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.006", + "name": "Dynamic Linker Hijacking", + "reference": "https://attack.mitre.org/techniques/T1574/006/" + } + ] + } + ] + } + ], + "id": "ccf1ca99-a349-4a15-ae87-f36ddec03293", + "rule_id": "717f82c2-7741-4f9b-85b8-d06aeb853f4f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "new_terms", + "query": "host.os.type:linux and event.category:file and event.action:(updated or renamed or rename) and \nnot event.type:deletion and file.path:/etc/ld.so.preload\n", + "new_terms_fields": [ + "host.id", + "user.id", + "process.executable" + ], + "history_window_start": "now-10d", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Attempt to Reset MFA Factors for an Okta User Account", + "description": "Detects attempts to reset an Okta user's enrolled multi-factor authentication (MFA) factors. An adversary may attempt to reset the MFA factors for an Okta user's account in order to register new MFA factors and abuse the account to blend in with normal activity in the victim's environment.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 206, + "tags": [ + "Tactic: Persistence", + "Use Case: Identity and Access Audit", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if the MFA factors for Okta user accounts are regularly reset in your organization." + ], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "6a4a3285-5548-460e-b07f-0f7d94d07323", + "rule_id": "729aa18d-06a6-41c7-b175-b65b739b1181", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:user.mfa.factor.reset_all\n", + "language": "kuery" + }, + { + "name": "Access to a Sensitive LDAP Attribute", + "description": "Identify access to sensitive Active Directory object attributes that contains credentials and decryption keys such as unixUserPassword, ms-PKI-AccountCredentials and msPKI-CredentialRoamingTokens.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "The 'Audit Directory Service Access' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Access (Success,Failure)\n```", + "version": 8, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Privilege Escalation", + "Use Case: Active Directory Monitoring", + "Data Source: Active Directory" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.mandiant.com/resources/blog/apt29-windows-credential-roaming", + "https://social.technet.microsoft.com/wiki/contents/articles/11483.windows-credential-roaming.aspx", + "https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5136" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + }, + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.004", + "name": "Private Keys", + "reference": "https://attack.mitre.org/techniques/T1552/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + } + ] + } + ] + } + ], + "id": "c2db3b6e-3cd8-46d2-9485-185f451b4e6c", + "rule_id": "764c9fcd-4c4c-41e6-a0c7-d6c46c2eff66", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.AccessMask", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.Properties", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectUserSid", + "type": "keyword", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "any where event.action == \"Directory Service Access\" and event.code == \"4662\" and\n\n not winlog.event_data.SubjectUserSid : \"S-1-5-18\" and\n\n winlog.event_data.Properties : (\n /* unixUserPassword */\n \"*612cb747-c0e8-4f92-9221-fdd5f15b550d*\",\n\n /* ms-PKI-AccountCredentials */\n \"*b8dfa744-31dc-4ef1-ac7c-84baf7ef9da7*\",\n\n /* ms-PKI-DPAPIMasterKeys */\n \"*b3f93023-9239-4f7c-b99c-6745d87adbc2*\",\n\n /* msPKI-CredentialRoamingTokens */\n \"*b7ff5a38-0818-42b0-8110-d3d154c97f24*\"\n ) and\n\n /*\n Excluding noisy AccessMasks\n 0x0 undefined and 0x100 Control Access\n https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4662\n */\n not winlog.event_data.AccessMask in (\"0x0\", \"0x100\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Creation of Hidden Shared Object File", + "description": "Identifies the creation of a hidden shared object (.so) file. Users can mark specific files as hidden simply by putting a \".\" as the first character in the file or folder name. Adversaries can use this to their advantage to hide files and folders on the system for persistence and defense evasion.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 33, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1564", + "name": "Hide Artifacts", + "reference": "https://attack.mitre.org/techniques/T1564/", + "subtechnique": [ + { + "id": "T1564.001", + "name": "Hidden Files and Directories", + "reference": "https://attack.mitre.org/techniques/T1564/001/" + } + ] + } + ] + } + ], + "id": "11f4562c-05eb-4495-9f55-6baaa0cd6b24", + "rule_id": "766d3f91-3f12-448c-b65f-20123e9e9e8c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", + "type": "eql", + "query": "file where host.os.type == \"linux\" and event.type == \"creation\" and file.extension == \"so\" and file.name : \".*.so\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Potential Reverse Shell via Suspicious Child Process", + "description": "This detection rule detects the creation of a shell through a suspicious process chain. Any reverse shells spawned by the specified utilities that are initialized from a single process followed by a network connection attempt will be captured through this rule. Attackers may spawn reverse shells to establish persistence onto a target system.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + } + ], + "id": "b462375e-5204-4c3a-985d-99e57b9ccf09", + "rule_id": "76e4d92b-61c1-4a95-ab61-5fd94179a1ee", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"exec\", \"fork\") and (\n (process.name : \"python*\" and process.args : \"-c\" and process.args : (\n \"*import*pty*spawn*\", \"*import*subprocess*call*\"\n )) or\n (process.name : \"perl*\" and process.args : \"-e\" and process.args : \"*socket*\" and process.args : (\n \"*exec*\", \"*system*\"\n )) or\n (process.name : \"ruby*\" and process.args : (\"-e\", \"-rsocket\") and process.args : (\n \"*TCPSocket.new*\", \"*TCPSocket.open*\"\n )) or\n (process.name : \"lua*\" and process.args : \"-e\" and process.args : \"*socket.tcp*\" and process.args : (\n \"*io.popen*\", \"*os.execute*\"\n )) or\n (process.name : \"php*\" and process.args : \"-r\" and process.args : \"*fsockopen*\" and process.args : \"*/bin/*sh*\") or \n (process.name : (\"awk\", \"gawk\", \"mawk\", \"nawk\") and process.args : \"*/inet/tcp/*\") or\n (process.name : \"openssl\" and process.args : \"-connect\") or\n (process.name : (\"nc\", \"ncat\", \"netcat\") and process.args_count >= 3 and not process.args == \"-z\") or\n (process.name : \"telnet\" and process.args_count >= 3)\n ) and process.parent.name : (\n \"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\",\n \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\")]\n [network where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"connection_attempted\", \"connection_accepted\") and \n process.name : (\"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\") and \n destination.ip != null and not cidrmatch(destination.ip, \"127.0.0.0/8\", \"169.254.0.0/16\", \"224.0.0.0/4\", \"::1\")]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Spike in AWS Error Messages", + "description": "A machine learning job detected a significant spike in the rate of a particular error in the CloudTrail messages. Spikes in error messages may accompany attempts at privilege escalation, lateral movement, or discovery.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Spike in AWS Error Messages\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.\n\nThis rule uses a machine learning job to detect a significant spike in the rate of a particular error in the CloudTrail messages. Spikes in error messages may accompany attempts at privilege escalation, lateral movement, or discovery.\n\n#### Possible investigation steps\n\n- Examine the history of the error. If the error only manifested recently, it might be related to recent changes in an automation module or script. You can find the error in the `aws.cloudtrail.error_code field` field.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, or network administrator activity.\n- Examine the request parameters. These may indicate the source of the program or the nature of the task being performed when the error occurred.\n - Check whether the error is related to unsuccessful attempts to enumerate or access objects, data, or secrets.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Contact the account owner and confirm whether they are aware of this activity if suspicious.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.\n- The adoption of new services or the addition of new functionality to scripts may generate false positives.\n\n### Related Rules\n\n- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276\n- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1\n- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1\n- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Spikes in error message activity can also be due to bugs in cloud automation scripts or workflows; changes to cloud automation scripts or workflows; adoption of new services; changes in the way services are used; or changes to IAM privileges." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "e5af9461-f667-4b3e-a73f-edc513545da7", + "rule_id": "78d3d8d9-b476-451d-a9e0-7a5addd70670", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": "high_distinct_count_error_message" + }, + { + "name": "Windows Network Enumeration", + "description": "Identifies attempts to enumerate hosts in a network using the built-in Windows net.exe tool.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Windows Network Enumeration\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `net` utility to enumerate servers in the environment that hosts shared drives or printers. This information is useful to attackers as they can identify targets for lateral movements and search for valuable shared data.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "building_block_type": "default", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Tactic: Collection", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1018", + "name": "Remote System Discovery", + "reference": "https://attack.mitre.org/techniques/T1018/" + }, + { + "id": "T1135", + "name": "Network Share Discovery", + "reference": "https://attack.mitre.org/techniques/T1135/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1039", + "name": "Data from Network Shared Drive", + "reference": "https://attack.mitre.org/techniques/T1039/" + } + ] + } + ], + "id": "5ec299a0-ceb1-4d8d-9876-28a745ce1892", + "rule_id": "7b8bfc26-81d2-435e-965c-d722ee397ef1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n ((process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or\n ((process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and\n not process.parent.name : \"net.exe\")) and\n (process.args : \"view\" or (process.args : \"time\" and process.args : \"\\\\\\\\*\"))\n\n\n /* expand when ancestry is available\n and not descendant of [process where event.type == \"start\" and process.name : \"cmd.exe\" and\n ((process.parent.name : \"userinit.exe\") or\n (process.parent.name : \"gpscript.exe\") or\n (process.parent.name : \"explorer.exe\" and\n process.args : \"C:\\\\*\\\\Start Menu\\\\Programs\\\\Startup\\\\*.bat*\"))]\n */\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Unusual City For an AWS Command", + "description": "A machine learning job detected AWS command activity that, while not inherently suspicious or abnormal, is sourcing from a geolocation (city) that is unusual for the command. This can be the result of compromised credentials or keys being used by a threat actor in a different geography than the authorized user(s).", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual City For an AWS Command\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.\n\nThis rule uses a machine learning job to detect an AWS API command that while not inherently suspicious or abnormal, is sourcing from a geolocation (city) that is unusual for the command. This can be the result of compromised credentials or keys used by a threat actor in a different geography than the authorized user(s).\n\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation of the source IP address.\n\n#### Possible investigation steps\n\n- Identify the user account involved and the action performed. Verify whether it should perform this kind of action.\n - Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context.\n - The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, or network administrator activity.\n- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Contact the account owner and confirm whether they are aware of this activity if suspicious.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- False positives can occur if activity is coming from new employees based in a city with no previous history in AWS.\n- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.\n\n### Related Rules\n\n- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1\n- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1\n- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff\n- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-2h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "New or unusual command and user geolocation activity can be due to manual troubleshooting or reconfiguration; changes in cloud automation scripts or workflows; adoption of new services; expansion into new regions; increased adoption of work from home policies; or users who travel frequently." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "5e4cfc7c-a0ea-4288-893e-9968e0cb5e8d", + "rule_id": "809b70d3-e2c3-455e-af1b-2626a5a1a276", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": "rare_method_for_a_city" + }, + { + "name": "PowerShell Suspicious Payload Encoded and Compressed", + "description": "Identifies the use of .NET functionality for decompression and base64 decoding combined in PowerShell scripts, which malware and security tools heavily use to deobfuscate payloads and load them directly in memory to bypass defenses.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Suspicious Payload Encoded and Compressed\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can embed compressed and encoded payloads in scripts to load directly into the memory without touching the disk. This strategy can circumvent string and file-based security protections.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the script using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately outside engineering or IT business units. As long as the analyst did not identify malware or suspicious activity related to the user or host, this alert can be dismissed.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n- Suspicious .NET Reflection via PowerShell - e26f042e-c590-4e82-8e05-41e81bd822ad\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 109, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate PowerShell Scripts which makes use of compression and encoding." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1027", + "name": "Obfuscated Files or Information", + "reference": "https://attack.mitre.org/techniques/T1027/" + }, + { + "id": "T1140", + "name": "Deobfuscate/Decode Files or Information", + "reference": "https://attack.mitre.org/techniques/T1140/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "b841c7cb-d971-414a-aa1d-bbc9c03c8ca9", + "rule_id": "81fe9dc6-a2d7-4192-a2d8-eed98afc766a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n (\n \"System.IO.Compression.DeflateStream\" or\n \"System.IO.Compression.GzipStream\" or\n \"IO.Compression.DeflateStream\" or\n \"IO.Compression.GzipStream\"\n ) and\n FromBase64String\n ) and\n not file.path: ?\\:\\\\\\\\ProgramData\\\\\\\\Microsoft\\\\\\\\Windows?Defender?Advanced?Threat?Protection\\\\\\\\Downloads\\\\\\\\* and\n not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "Enumerating Domain Trusts via NLTEST.EXE", + "description": "Identifies the use of nltest.exe for domain trust discovery purposes. Adversaries may use this command-line utility to enumerate domain trusts and gain insight into trust relationships, as well as the state of Domain Controller (DC) replication in a Microsoft Windows NT Domain.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Enumerating Domain Trusts via NLTEST.EXE\n\nActive Directory (AD) domain trusts define relationships between domains within a Windows AD environment. In this setup, a \"trusting\" domain permits users from a \"trusted\" domain to access resources. These trust relationships can be configurable as one-way, two-way, transitive, or non-transitive, enabling controlled access and resource sharing across domains.\n\nThis rule identifies the usage of the `nltest.exe` utility to enumerate domain trusts. Attackers can use this information to enable the next actions in a target environment, such as lateral movement.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation and are done within the user business context (e.g., an administrator in this context). As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Related rules\n\n- Enumerating Domain Trusts via DSQUERY.EXE - 06a7a03c-c735-47a6-a313-51c354aef6c3\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Domain administrators may use this command-line utility for legitimate information gathering purposes, but it is not common for environments with Windows Server 2012 and newer." + ], + "references": [ + "https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc731935(v=ws.11)", + "https://redcanary.com/blog/how-one-hospital-thwarted-a-ryuk-ransomware-outbreak/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1482", + "name": "Domain Trust Discovery", + "reference": "https://attack.mitre.org/techniques/T1482/" + }, + { + "id": "T1018", + "name": "Remote System Discovery", + "reference": "https://attack.mitre.org/techniques/T1018/" + } + ] + } + ], + "id": "d5694c65-fbc8-4281-a363-2a551e0f0d25", + "rule_id": "84da2554-e12a-11ec-b896-f661ea17fbcd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"nltest.exe\" and process.args : (\n \"/DCLIST:*\", \"/DCNAME:*\", \"/DSGET*\",\n \"/LSAQUERYFTI:*\", \"/PARENTDOMAIN\",\n \"/DOMAIN_TRUSTS\", \"/BDC_QUERY:*\"\n ) and \nnot process.parent.name : \"PDQInventoryScanner.exe\" and \nnot user.id in (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Attempt to Deactivate an Okta Network Zone", + "description": "Detects attempts to deactivate an Okta network zone. Okta network zones can be configured to limit or restrict access to a network based on IP addresses or geolocations. An adversary may attempt to modify, delete, or deactivate an Okta network zone in order to remove or weaken an organization's security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Deactivate an Okta Network Zone\n\nThe Okta network zones can be configured to restrict or limit access to a network based on IP addresses or geolocations. Deactivating a network zone in Okta may remove or weaken the security controls of an organization, which might be an indicator of an adversary's attempt to evade defenses.\n\n#### Possible investigation steps\n\n- Identify the actor related to the alert by reviewing the `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields.\n- Examine the `event.action` field to confirm the deactivation of a network zone.\n- Check the `okta.target.id`, `okta.target.type`, `okta.target.alternate_id`, or `okta.target.display_name` to identify the network zone that was deactivated.\n- Investigate the `event.time` field to understand when the event happened.\n- Review the actor's activities before and after the event to understand the context of this event.\n\n### False positive analysis\n\n- Check the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor. If these match the actor's normal behavior, it might be a false positive.\n- Check if the actor is a known administrator or part of the IT team who might have a legitimate reason to deactivate a network zone.\n- Verify the actor's actions with any known planned changes or maintenance activities.\n\n### Response and remediation\n\n- If unauthorized access or actions are confirmed, immediately lock the affected actor account and require a password change.\n- Re-enable the deactivated network zone if it was deactivated without authorization.\n- Review and update the privileges of the actor who initiated the deactivation.\n- Check the security policies and procedures to identify any gaps and update them as necessary.\n- Implement additional monitoring and logging of Okta events to improve visibility of user actions.\n- Communicate and train the employees about the importance of following proper procedures for modifying network zone settings.", + "version": 206, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Use Case: Network Security Monitoring", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if your organization's Okta network zones are regularly modified." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/network/network-zones.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "09b972a1-7b3f-4b4b-9fb6-6b49e44ce495", + "rule_id": "8a5c1e5f-ad63-481e-b53a-ef959230f7f1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:zone.deactivate\n", + "language": "kuery" + }, + { + "name": "Potential Successful SSH Brute Force Attack", + "description": "Identifies multiple SSH login failures followed by a successful one from the same source address. Adversaries can attempt to login into multiple users with a common or known password to gain access to accounts.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Successful SSH Brute Force Attack\n\nThe rule identifies consecutive SSH login failures followed by a successful login from the same source IP address to the same target host indicating a successful attempt of brute force password guessing.\n\n#### Possible investigation steps\n\n- Investigate the login failure user name(s).\n- Investigate the source IP address of the failed ssh login attempt(s).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Infrastructure or availability issue.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Ensure active session(s) on the host(s) are terminated as the attacker could have gained initial access to the system(s).\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 8, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/", + "subtechnique": [ + { + "id": "T1110.001", + "name": "Password Guessing", + "reference": "https://attack.mitre.org/techniques/T1110/001/" + }, + { + "id": "T1110.003", + "name": "Password Spraying", + "reference": "https://attack.mitre.org/techniques/T1110/003/" + } + ] + } + ] + } + ], + "id": "50c44021-ffdd-4d74-bbdb-41414672f848", + "rule_id": "8cb84371-d053-4f4f-bce0-c74990e28f28", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, source.ip, user.name with maxspan=15s\n [authentication where host.os.type == \"linux\" and event.action in (\"ssh_login\", \"user_login\") and\n event.outcome == \"failure\" and source.ip != null and source.ip != \"0.0.0.0\" and source.ip != \"::\" ] with runs=10\n\n [authentication where host.os.type == \"linux\" and event.action in (\"ssh_login\", \"user_login\") and\n event.outcome == \"success\" and source.ip != null and source.ip != \"0.0.0.0\" and source.ip != \"::\" ]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-system.auth-*" + ] + }, + { + "name": "PowerShell Suspicious Script with Clipboard Retrieval Capabilities", + "description": "Detects PowerShell scripts that can get the contents of the clipboard, which attackers can abuse to retrieve sensitive information like credentials, messages, etc.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Suspicious Script with Clipboard Retrieval Capabilities\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can abuse PowerShell capabilities to get the contents of the clipboard with the goal of stealing credentials and other valuable information, such as credit card data and confidential conversations.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Determine whether the script stores the captured data locally.\n- Investigate whether the script contains exfiltration capabilities and identify the exfiltration server.\n- Assess network data to determine if the host communicated with the exfiltration server.\n\n### False positive analysis\n\n- Regular users are unlikely to use scripting utilities to capture contents of the clipboard, making false positives unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Related rules\n\n- PowerShell Keylogging Script - bd2c86a0-8b61-4457-ab38-96943984e889\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Prioritize the response if this alert involves key executives or potentially valuable targets for espionage.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Data Source: PowerShell Logs", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-clipboard", + "https://github.com/EmpireProject/Empire/blob/master/data/module_source/collection/Get-ClipboardContents.ps1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1115", + "name": "Clipboard Data", + "reference": "https://attack.mitre.org/techniques/T1115/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "f70becfb-90e1-454e-8e0e-8a64a383c573", + "rule_id": "92984446-aefb-4d5e-ad12-598042ca80ba", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n (powershell.file.script_block_text : (\n \"Windows.Clipboard\" or\n \"Windows.Forms.Clipboard\" or\n \"Windows.Forms.TextBox\"\n ) and\n powershell.file.script_block_text : (\n \"]::GetText\" or\n \".Paste()\"\n )) or powershell.file.script_block_text : \"Get-Clipboard\" and\n not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n ) and\n not user.id : \"S-1-5-18\" and\n not file.path : (\n ?\\:\\\\\\\\program?files\\\\\\\\powershell\\\\\\\\?\\\\\\\\Modules\\\\\\\\*.psd1 or\n ?\\:\\\\\\\\Windows\\\\\\\\system32\\\\\\\\WindowsPowerShell\\\\\\\\v1.0\\\\\\\\Modules\\\\\\\\*.psd1 or\n ?\\:\\\\\\\\WINDOWS\\\\\\\\system32\\\\\\\\WindowsPowerShell\\\\\\\\v1.0\\\\\\\\Modules\\\\\\\\*.psd1 or\n ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules\\\\\\\\*.psd1 or\n ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules\\\\\\\\*.psm1\n ) and \n not (\n file.path : ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\*Modules*.ps1 and\n file.name : (\"Convert-ExcelRangeToImage.ps1\" or \"Read-Clipboard.ps1\")\n )\n", + "language": "kuery" + }, + { + "name": "Modification of Standard Authentication Module or Configuration", + "description": "Adversaries may modify the standard authentication module for persistence via patching the normal authorization process or modifying the login configuration to allow unauthorized access or elevate privileges.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 204, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trusted system module updates or allowed Pluggable Authentication Module (PAM) daemon configuration changes." + ], + "references": [ + "https://github.com/zephrax/linux-pam-backdoor", + "https://github.com/eurialo/pambd", + "http://0x90909090.blogspot.com/2016/06/creating-backdoor-in-pam-in-5-line-of.html", + "https://www.trendmicro.com/en_us/research/19/i/skidmap-linux-malware-uses-rootkit-capabilities-to-hide-cryptocurrency-mining-payload.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1556", + "name": "Modify Authentication Process", + "reference": "https://attack.mitre.org/techniques/T1556/" + } + ] + } + ], + "id": "d469cb82-f182-48e9-8913-95362fb468b5", + "rule_id": "93f47b6f-5728-4004-ba00-625083b3dcb0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "new_terms", + "query": "event.category:file and event.type:change and\n (file.name:pam_*.so or file.path:(/etc/pam.d/* or /private/etc/pam.d/* or /usr/lib64/security/*)) and\n process.executable:\n (* and\n not\n (\n /usr/libexec/packagekitd or\n /usr/bin/vim or\n /usr/libexec/xpcproxy or\n /usr/bin/bsdtar or\n /usr/local/bin/brew or\n \"/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/XPCServices/package_script_service.xpc/Contents/MacOS/package_script_service\"\n )\n ) and\n not file.path:\n (\n /tmp/snap.rootfs_*/pam_*.so or\n /tmp/newroot/lib/*/pam_*.so or\n /private/var/folders/*/T/com.apple.fileprovider.ArchiveService/TemporaryItems/*/lib/security/pam_*.so or\n /tmp/newroot/usr/lib64/security/pam_*.so\n ) and\n not process.name:\n (\n yum or dnf or rsync or platform-python or authconfig or rpm or pdkg or apk or dnf-automatic or btrfs or\n dpkg or pam-auth-update or steam or platform-python3.6 or pam-config or microdnf or yum_install or yum-cron or\n systemd or containerd or pacman\n )\n", + "new_terms_fields": [ + "host.id", + "process.executable", + "file.path" + ], + "history_window_start": "now-7d", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "Suspicious Zoom Child Process", + "description": "A suspicious Zoom child process was detected, which may indicate an attempt to run unnoticed. Verify process details such as command line, network connections, file writes and associated file signature details as well.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Zoom Child Process\n\nBy examining the specific traits of Windows binaries -- such as process trees, command lines, network connections, registry modifications, and so on -- it's possible to establish a baseline of normal activity. Deviations from this baseline can indicate malicious activity, such as masquerading, and deserve further investigation.\n\nThis rule identifies a potential malicious process masquerading as `Zoom.exe` or exploiting a vulnerability in the application causing it to execute code.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the command line of the child process to determine which commands or scripts were executed.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + }, + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1203", + "name": "Exploitation for Client Execution", + "reference": "https://attack.mitre.org/techniques/T1203/" + } + ] + } + ], + "id": "bd735b74-b251-4a32-ba4b-74a98ec61f49", + "rule_id": "97aba1ef-6034-4bd3-8c1a-1e0996b27afa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"Zoom.exe\" and process.name : (\"cmd.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Credential Access via LSASS Memory Dump", + "description": "Identifies suspicious access to LSASS handle from a call trace pointing to DBGHelp.dll or DBGCore.dll, which both export the MiniDumpWriteDump method that can be used to dump LSASS memory content in preparation for credential access.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 207, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic:Execution", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.ired.team/offensive-security/credential-access-and-credential-dumping/dump-credentials-from-lsass-process-without-mimikatz", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + } + ], + "id": "1ae946e9-f012-4525-a1bd-bd4960ab2958", + "rule_id": "9960432d-9b26-409f-972b-839a959e79e2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.CallTrace", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetImage", + "type": "keyword", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.code == \"10\" and\n winlog.event_data.TargetImage : \"?:\\\\WINDOWS\\\\system32\\\\lsass.exe\" and\n\n /* DLLs exporting MiniDumpWriteDump API to create an lsass mdmp*/\n winlog.event_data.CallTrace : (\"*dbghelp*\", \"*dbgcore*\") and\n\n /* case of lsass crashing */\n not process.executable : (\"?:\\\\Windows\\\\System32\\\\WerFault.exe\", \"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Potential Shadow File Read via Command Line Utilities", + "description": "Identifies access to the /etc/shadow file via the commandline using standard system utilities. After elevating privileges to root, threat actors may attempt to read or dump this file in order to gain valid credentials. They may utilize these to move laterally undetected and access additional resources.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.cyberciti.biz/faq/unix-linux-password-cracking-john-the-ripper/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.008", + "name": "/etc/passwd and /etc/shadow", + "reference": "https://attack.mitre.org/techniques/T1003/008/" + } + ] + } + ] + } + ], + "id": "257de89a-0baf-4ca2-9941-11e54d03c0f2", + "rule_id": "9a3a3689-8ed1-4cdb-83fb-9506db54c61f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.working_directory", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "host.os.type : \"linux\" and event.category : \"process\" and event.action : (\"exec\" or \"exec_event\") and\n(process.args : \"/etc/shadow\" or (process.working_directory: \"/etc\" and process.args: \"shadow\")) and not \n(process.executable : (\"/bin/chown\" or \"/usr/bin/chown\") and process.args : \"root:shadow\") and not \n(process.executable : (\"/bin/chmod\" or \"/usr/bin/chmod\") and process.args : \"640\")\n", + "new_terms_fields": [ + "process.command_line" + ], + "history_window_start": "now-7d", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Microsoft Build Engine Started by a Script Process", + "description": "An instance of MSBuild, the Microsoft Build Engine, was started by a script or the Windows command interpreter. This behavior is unusual and is sometimes used by malicious payloads.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 206, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + }, + { + "id": "T1059.005", + "name": "Visual Basic", + "reference": "https://attack.mitre.org/techniques/T1059/005/" + } + ] + } + ] + } + ], + "id": "d4c54da3-a6f6-4658-bb97-d1a21b1d0e49", + "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name.caseless", + "type": "unknown", + "ecs": false + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type:windows and event.category:process and event.type:start and (\n process.name.caseless:\"msbuild.exe\" or process.pe.original_file_name:\"MSBuild.exe\") and \n process.parent.name:(\"cmd.exe\" or \"powershell.exe\" or \"pwsh.exe\" or \"powershell_ise.exe\" or \"cscript.exe\" or\n \"wscript.exe\" or \"mshta.exe\")\n", + "new_terms_fields": [ + "host.id", + "user.name", + "process.command_line" + ], + "history_window_start": "now-14d", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ], + "language": "kuery" + }, + { + "name": "Potential Credential Access via Trusted Developer Utility", + "description": "An instance of MSBuild, the Microsoft Build Engine, loaded DLLs (dynamically linked libraries) responsible for Windows credential management. This technique is sometimes used for credential dumping.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Credential Access via Trusted Developer Utility\n\nThe Microsoft Build Engine is a platform for building applications. This engine, also known as MSBuild, provides an XML schema for a project file that controls how the build platform processes and builds software.\n\nAdversaries can abuse MSBuild to proxy the execution of malicious code. The inline task capability of MSBuild that was introduced in .NET version 4 allows for C# or Visual Basic code to be inserted into an XML project file. MSBuild will compile and execute the inline task. `MSBuild.exe` is a signed Microsoft binary, and the execution of code using it can bypass application control defenses that are configured to allow `MSBuild.exe` execution.\n\nThis rule looks for the MSBuild process loading `vaultcli.dll` or `SAMLib.DLL`, which indicates the execution of credential access activities.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to identify the `.csproj` file location.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.002", + "name": "Security Account Manager", + "reference": "https://attack.mitre.org/techniques/T1003/002/" + } + ] + }, + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/", + "subtechnique": [ + { + "id": "T1555.004", + "name": "Windows Credential Manager", + "reference": "https://attack.mitre.org/techniques/T1555/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] + } + ] + } + ], + "id": "a68db131-95bb-47bd-a9c7-4dc26ffccaa7", + "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and (process.name : \"MSBuild.exe\" or process.pe.original_file_name == \"MSBuild.exe\")]\n [any where host.os.type == \"windows\" and (event.category == \"library\" or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : (\"vaultcli.dll\", \"SAMLib.DLL\") or file.name : (\"vaultcli.dll\", \"SAMLib.DLL\"))]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Microsoft Build Engine Started an Unusual Process", + "description": "An instance of MSBuild, the Microsoft Build Engine, started a PowerShell script or the Visual C# Command Line Compiler. This technique is sometimes used to deploy a malicious payload using the Build Engine.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 207, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual. If a build system triggers this rule it can be exempted by process, user or host name." + ], + "references": [ + "https://blog.talosintelligence.com/2020/02/building-bypass-with-msbuild.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1027", + "name": "Obfuscated Files or Information", + "reference": "https://attack.mitre.org/techniques/T1027/", + "subtechnique": [ + { + "id": "T1027.004", + "name": "Compile After Delivery", + "reference": "https://attack.mitre.org/techniques/T1027/004/" + } + ] + }, + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] + } + ] + } + ], + "id": "40e24351-6419-4dbe-b7a7-7ddb0ada19bb", + "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name.caseless", + "type": "unknown", + "ecs": false + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "new_terms", + "query": "host.os.type:windows and event.category:process and event.type:start and process.parent.name:\"MSBuild.exe\" and\nprocess.name.caseless:(\"csc.exe\" or \"iexplore.exe\" or \"powershell.exe\")\n", + "new_terms_fields": [ + "host.id", + "user.name", + "process.parent.command_line" + ], + "history_window_start": "now-14d", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ], + "language": "kuery" + }, + { + "name": "Potential Protocol Tunneling via EarthWorm", + "description": "Identifies the execution of the EarthWorm tunneler. Adversaries may tunnel network communications to and from a victim system within a separate protocol to avoid detection and network filtering, or to enable access to otherwise unreachable systems.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "http://rootkiter.com/EarthWorm/", + "https://decoded.avast.io/luigicamastra/apt-group-targeting-governmental-agencies-in-east-asia/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + } + ], + "id": "47f5ffa4-d3c9-4e51-a913-6afa9b30bd4b", + "rule_id": "9f1c4ca3-44b5-481d-ba42-32dc215a2769", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and\n process.args : \"-s\" and process.args : \"-d\" and process.args : \"rssocks\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "File Permission Modification in Writable Directory", + "description": "Identifies file permission modifications in common writable directories by a non-root user. Adversaries often drop files or payloads into a writable directory and change permissions prior to execution.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 206, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Certain programs or applications may modify files or change ownership in writable directories. These can be exempted by username." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1222", + "name": "File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/" + } + ] + } + ], + "id": "4ca272bc-a0e4-4ca4-b683-7ce94624edfe", + "rule_id": "9f9a2a82-93a8-4b1a-8778-1780895626d4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.working_directory", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "new_terms", + "query": "host.os.type:linux and event.category:process and event.type:start and\nprocess.name:(chmod or chown or chattr or chgrp) and \nprocess.working_directory:(\"/tmp\" or \"/var/tmp\" or \"/dev/shm\")\n", + "new_terms_fields": [ + "host.id", + "process.parent.executable", + "process.command_line" + ], + "history_window_start": "now-14d", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "First Time Seen AWS Secret Value Accessed in Secrets Manager", + "description": "An adversary equipped with compromised credentials may attempt to access the secrets in secrets manager to steal certificates, credentials, or other sensitive material.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating First Time Seen AWS Secret Value Accessed in Secrets Manager\n\nAWS Secrets Manager is a service that enables the replacement of hardcoded credentials in code, including passwords, with an API call to Secrets Manager to retrieve the secret programmatically.\n\nThis rule looks for the retrieval of credentials using `GetSecretValue` action in Secrets Manager programmatically. This is a [New Terms](https://www.elastic.co/guide/en/security/master/rules-ui-create.html#create-new-terms-rule) rule indicating this is the first time a specific user identity has successfuly retrieved a secret value from Secrets Manager.\n\n#### Possible investigation steps\n\n- Identify the account and its role in the environment, and inspect the related policy.\n- Identify the applications that should use this account.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Investigate abnormal values in the `user_agent.original` field by comparing them with the intended and authorized usage and historical data. Suspicious user agent values include non-SDK, AWS CLI, custom user agents, etc.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences involving other users.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Review IAM permission policies for the user identity and specific secrets accessed.\n- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- False positives may occur due to the intended usage of the service. Tuning is needed in order to have higher confidence. Consider adding exceptions — preferably with a combination of user agent and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Rotate secrets or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 308, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Credential Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Nick Jones", + "Elastic" + ], + "false_positives": [ + "Verify whether the user identity, user agent, and/or hostname should be using GetSecretString API for the specified SecretId. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html", + "http://detectioninthe.cloud/credential_access/access_secret_in_secrets_manager/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1528", + "name": "Steal Application Access Token", + "reference": "https://attack.mitre.org/techniques/T1528/" + } + ] + } + ], + "id": "b72a7d63-3b9b-4087-bfc5-630d05bf8b5d", + "rule_id": "a00681e3-9ed6-447c-ab2c-be648821c622", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "user_agent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "new_terms", + "query": "event.dataset:aws.cloudtrail and event.provider:secretsmanager.amazonaws.com and\n event.action:GetSecretValue and event.outcome:success and\n not user_agent.name: (\"Chrome\" or \"Firefox\" or \"Safari\" or \"Edge\" or \"Brave\" or \"Opera\" or \"aws-cli\")\n", + "new_terms_fields": [ + "aws.cloudtrail.user_identity.access_key_id", + "aws.cloudtrail.request_parameters" + ], + "history_window_start": "now-15d", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "language": "kuery" + }, + { + "name": "System Log File Deletion", + "description": "Identifies the deletion of sensitive Linux system logs. This may indicate an attempt to evade detection or destroy forensic evidence on a system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.fireeye.com/blog/threat-research/2020/11/live-off-the-land-an-overview-of-unc1945.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.002", + "name": "Clear Linux or Mac System Logs", + "reference": "https://attack.mitre.org/techniques/T1070/002/" + } + ] + } + ] + } + ], + "id": "97a1db1a-da0f-49b0-859c-af127a1b77b2", + "rule_id": "aa895aea-b69c-4411-b110-8d7599634b30", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", + "type": "eql", + "query": "file where host.os.type == \"linux\" and event.type == \"deletion\" and\n file.path :\n (\n \"/var/run/utmp\",\n \"/var/log/wtmp\",\n \"/var/log/btmp\",\n \"/var/log/lastlog\",\n \"/var/log/faillog\",\n \"/var/log/syslog\",\n \"/var/log/messages\",\n \"/var/log/secure\",\n \"/var/log/auth.log\",\n \"/var/log/boot.log\",\n \"/var/log/kern.log\"\n ) and\n not process.name in (\"gzip\", \"executor\", \"dockerd\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Remotely Started Services via RPC", + "description": "Identifies remote execution of Windows services over remote procedure call (RPC). This could be indicative of lateral movement, but will be noisy if commonly done by administrators.\"", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remotely Started Services via RPC\n\nThe Service Control Manager Remote Protocol is a client/server protocol used for configuring and controlling service programs running on a remote computer. A remote service management session begins with the client initiating the connection request to the server. If the server grants the request, the connection is established. The client can then make multiple requests to modify, query the configuration, or start and stop services on the server by using the same session until the session is terminated.\n\nThis rule detects the remote creation or start of a service by correlating a `services.exe` network connection and the spawn of a child process.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Review login events (e.g., 4624) in the alert timeframe to identify the account used to perform this action. Use the `source.address` field to help identify the source system.\n- Review network events from the source system using the source port identified on the alert and try to identify the program used to initiate the action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- Remote management software like SCCM may trigger this rule. If noisy on your environment, consider adding exceptions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-scmr/705b624a-13de-43cc-b8a2-99573da3635f" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + } + ], + "id": "aae040f5-86a5-471c-82c4-a2c2cc3c1deb", + "rule_id": "aa9a274d-6b53-424d-ac5e-cb8ca4251650", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "source.port", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=1s\n [network where host.os.type == \"windows\" and process.name : \"services.exe\" and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.port >= 49152 and destination.port >= 49152 and source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ] by host.id, process.entity_id\n [process where host.os.type == \"windows\" and \n event.type == \"start\" and process.parent.name : \"services.exe\" and\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\svchost.exe\" and process.args : \"tiledatamodelsvc\") and\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\msiexec.exe\" and process.args : \"/V\") and\n not process.executable :\n (\"?:\\\\Windows\\\\ADCR_Agent\\\\adcrsvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\VSSVC.exe\",\n \"?:\\\\Windows\\\\servicing\\\\TrustedInstaller.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Windows\\\\PSEXESVC.EXE\",\n \"?:\\\\Windows\\\\System32\\\\sppsvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\wbem\\\\WmiApSrv.exe\",\n \"?:\\\\WINDOWS\\\\RemoteAuditService.exe\",\n \"?:\\\\Windows\\\\VeeamVssSupport\\\\VeeamGuestHelper.exe\",\n \"?:\\\\Windows\\\\VeeamLogShipper\\\\VeeamLogShipper.exe\",\n \"?:\\\\Windows\\\\CAInvokerService.exe\",\n \"?:\\\\Windows\\\\System32\\\\upfc.exe\",\n \"?:\\\\Windows\\\\AdminArsenal\\\\PDQ*.exe\",\n \"?:\\\\Windows\\\\System32\\\\vds.exe\",\n \"?:\\\\Windows\\\\Veeam\\\\Backup\\\\VeeamDeploymentSvc.exe\",\n \"?:\\\\Windows\\\\ProPatches\\\\Scheduler\\\\STSchedEx.exe\",\n \"?:\\\\Windows\\\\System32\\\\certsrv.exe\",\n \"?:\\\\Windows\\\\eset-remote-install-service.exe\",\n \"?:\\\\Pella Corporation\\\\Pella Order Management\\\\GPAutoSvc.exe\",\n \"?:\\\\Pella Corporation\\\\OSCToGPAutoService\\\\OSCToGPAutoSvc.exe\",\n \"?:\\\\Pella Corporation\\\\Pella Order Management\\\\GPAutoSvc.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\NwxExeSvc\\\\NwxExeSvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\taskhostex.exe\")\n ] by host.id, process.parent.entity_id\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Remote Execution via File Shares", + "description": "Identifies the execution of a file that was created by the virtual system process. This may indicate lateral movement via network file shares.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remote Execution via File Shares\n\nAdversaries can use network shares to host tooling to support the compromise of other hosts in the environment. These tools can include discovery utilities, credential dumpers, malware, etc.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Review adjacent login events (e.g., 4624) in the alert timeframe to identify the account used to perform this action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity can happen legitimately. Consider adding exceptions if it is expected and noisy in your environment.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Review the privileges needed to write to the network share and restrict write access as needed.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.menasec.net/2020/08/new-trick-to-detect-lateral-movement.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.002", + "name": "SMB/Windows Admin Shares", + "reference": "https://attack.mitre.org/techniques/T1021/002/" + } + ] + } + ] + } + ], + "id": "7427d720-5c70-4a66-91b6-46ea59c90cc0", + "rule_id": "ab75c24b-2502-43a0-bf7c-e60e662c811e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.header_bytes", + "type": "unknown", + "ecs": false + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=1m\n [file where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and \n process.pid == 4 and (file.extension : \"exe\" or file.Ext.header_bytes : \"4d5a*\")] by host.id, file.path\n [process where host.os.type == \"windows\" and event.type == \"start\"] by host.id, process.executable\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual AWS Command for a User", + "description": "A machine learning job detected an AWS API command that, while not inherently suspicious or abnormal, is being made by a user context that does not normally use the command. This can be the result of compromised credentials or keys as someone uses a valid account to persist, move laterally, or exfiltrate data.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual AWS Command for a User\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.\n\nThis rule uses a machine learning job to detect an AWS API command that while not inherently suspicious or abnormal, is being made by a user context that does not normally use the command. This can be the result of compromised credentials or keys as someone uses a valid account to persist, move laterally, or exfiltrate data.\n\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the calling IAM user.\n\n#### Possible investigation steps\n\n- Identify the user account involved and the action performed. Verify whether it should perform this kind of action.\n - Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context.\n - The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, or network administrator activity.\n- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Contact the account owner and confirm whether they are aware of this activity if suspicious.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.\n\n### Related Rules\n\n- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276\n- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1\n- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff\n- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-2h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "New or unusual user command activity can be due to manual troubleshooting or reconfiguration; changes in cloud automation scripts or workflows; adoption of new services; or changes in the way services are used." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "5f8c7b70-2c54-4110-a195-56b173f197ad", + "rule_id": "ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "rare_method_for_a_username" + }, + { + "name": "Attempt to Delete an Okta Policy", + "description": "Detects attempts to delete an Okta policy. An adversary may attempt to delete an Okta policy in order to weaken an organization's security controls. For example, an adversary may attempt to delete an Okta multi-factor authentication (MFA) policy in order to weaken the authentication requirements for user accounts.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Delete an Okta Policy\n\nOkta policies are critical to managing user access and enforcing security controls within an organization. The deletion of an Okta policy could drastically weaken an organization's security posture by allowing unrestricted access or facilitating other malicious activities.\n\nThis rule detects attempts to delete an Okta policy, which could be indicative of an adversary's attempt to weaken an organization's security controls. Adversaries may do this to bypass security barriers and enable further malicious activities.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the deletion attempt.\n- Check the `okta.outcome.result` field to confirm the policy deletion attempt.\n- Check if there are multiple policy deletion attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the policy deletion attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the deletion attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the deletion attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the deletion attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized policy deletion is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific deletion technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 206, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if Okta policies are regularly deleted in your organization." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "0235ac26-998d-45c1-bb8b-ac12774a0189", + "rule_id": "b4bb1440-0fcb-4ed1-87e5-b06d58efc5e9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:policy.lifecycle.delete\n", + "language": "kuery" + }, + { + "name": "Attempt to Deactivate an Okta Policy", + "description": "Detects attempts to deactivate an Okta policy. An adversary may attempt to deactivate an Okta policy in order to weaken an organization's security controls. For example, an adversary may attempt to deactivate an Okta multi-factor authentication (MFA) policy in order to weaken the authentication requirements for user accounts.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Deactivate an Okta Policy\n\nOkta policies define rules to manage user access to resources. Policies such as multi-factor authentication (MFA) are critical for enforcing strong security measures. Deactivation of an Okta policy could potentially weaken the security posture, allowing for unauthorized access or facilitating other malicious activities.\n\nThis rule is designed to detect attempts to deactivate an Okta policy, which could be indicative of an adversary's attempt to weaken an organization's security controls. For example, disabling an MFA policy could lower the security of user authentication processes.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the deactivation attempt.\n- Check the `okta.outcome.result` field to confirm the policy deactivation attempt.\n- Check if there are multiple policy deactivation attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the policy deactivation attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the deactivation attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the deactivation attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the deactivation attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized policy deactivation is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific deactivation technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 206, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "If the behavior of deactivating Okta policies is expected, consider adding exceptions to this rule to filter false positives." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "2e7f379b-79a8-4f39-9cff-4ed335177b7b", + "rule_id": "b719a170-3bdb-4141-b0e3-13e3cf627bfe", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:policy.lifecycle.deactivate\n", + "language": "kuery" + }, + { + "name": "Chkconfig Service Add", + "description": "Detects the use of the chkconfig binary to manually add a service for management by chkconfig. Threat actors may utilize this technique to maintain persistence on a system. When a new service is added, chkconfig ensures that the service has either a start or a kill entry in every runlevel and when the system is rebooted the service file added will run providing long-term persistence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Threat: Lightning Framework", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.intezer.com/blog/research/lightning-framework-new-linux-threat/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1037", + "name": "Boot or Logon Initialization Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/", + "subtechnique": [ + { + "id": "T1037.004", + "name": "RC Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/004/" + } + ] + } + ] + } + ], + "id": "26f4f52b-ba36-4d2a-a724-ffd20878a380", + "rule_id": "b910f25a-2d44-47f2-a873-aabdc0d355e6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and\n( \n (process.executable : \"/usr/sbin/chkconfig\" and process.args : \"--add\") or\n (process.args : \"*chkconfig\" and process.args : \"--add\")\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Creation of Hidden Files and Directories via CommandLine", + "description": "Users can mark specific files as hidden simply by putting a \".\" as the first character in the file or folder name. Adversaries can use this to their advantage to hide files and folders on the system for persistence and defense evasion. This rule looks for hidden files or folders in common writable directories.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Certain tools may create hidden temporary files or directories upon installation or as part of their normal behavior. These events can be filtered by the process arguments, username, or process name values." + ], + "references": [], + "max_signals": 33, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1564", + "name": "Hide Artifacts", + "reference": "https://attack.mitre.org/techniques/T1564/", + "subtechnique": [ + { + "id": "T1564.001", + "name": "Hidden Files and Directories", + "reference": "https://attack.mitre.org/techniques/T1564/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "id": "62f1d86b-f89b-4f7c-9995-1d3dcb8bf614", + "rule_id": "b9666521-4742-49ce-9ddc-b8e84c35acae", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.working_directory", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and\nprocess.working_directory in (\"/tmp\", \"/var/tmp\", \"/dev/shm\") and\nprocess.args regex~ \"\"\"\\.[a-z0-9_\\-][a-z0-9_\\-\\.]{1,254}\"\"\" and\nnot process.name in (\"ls\", \"find\", \"grep\", \"git\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious DLL Loaded for Persistence or Privilege Escalation", + "description": "Identifies the loading of a non Microsoft signed DLL that is missing on a default Windows install (phantom DLL) or one that can be loaded from a different location by a native Windows process. This may be abused to persist or elevate privileges via privileged file write vulnerabilities.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious DLL Loaded for Persistence or Privilege Escalation\n\nAttackers can execute malicious code by abusing missing modules that processes try to load, enabling them to escalate privileges or gain persistence. This rule identifies the loading of a non-Microsoft-signed DLL that is missing on a default Windows installation or one that can be loaded from a different location by a native Windows process.\n\n#### Possible investigation steps\n\n- Examine the DLL signature and identify the process that created it.\n - Investigate any abnormal behaviors by the process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve the DLL and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://itm4n.github.io/windows-dll-hijacking-clarified/", + "http://remoteawesomethoughts.blogspot.com/2019/05/windows-10-task-schedulerservice.html", + "https://googleprojectzero.blogspot.com/2018/04/windows-exploitation-tricks-exploiting.html", + "https://shellz.club/2020/10/16/edgegdi-dll-for-persistence-and-lateral-movement.html", + "https://windows-internals.com/faxing-your-way-to-system/", + "http://waleedassar.blogspot.com/2013/01/wow64logdll.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.002", + "name": "DLL Side-Loading", + "reference": "https://attack.mitre.org/techniques/T1574/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.001", + "name": "DLL Search Order Hijacking", + "reference": "https://attack.mitre.org/techniques/T1574/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + } + ] + } + ] + } + ], + "id": "795b6d23-588c-4488-99e4-2ccc7d0ea209", + "rule_id": "bfeaf89b-a2a7-48a3-817f-e41829dc61ee", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dll.code_signature.exists", + "type": "boolean", + "ecs": true + }, + { + "name": "dll.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "file.hash.sha256", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "any where host.os.type == \"windows\" and\n (event.category : (\"driver\", \"library\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (\n /* compatible with Elastic Endpoint Library Events */\n (dll.name : (\"wlbsctrl.dll\", \"wbemcomn.dll\", \"WptsExtensions.dll\", \"Tsmsisrv.dll\", \"TSVIPSrv.dll\", \"Msfte.dll\",\n \"wow64log.dll\", \"WindowsCoreDeviceInfo.dll\", \"Ualapi.dll\", \"wlanhlp.dll\", \"phoneinfo.dll\", \"EdgeGdi.dll\",\n \"cdpsgshims.dll\", \"windowsperformancerecordercontrol.dll\", \"diagtrack_win.dll\", \"oci.dll\", \"TPPCOIPW32.dll\", \n \"tpgenlic.dll\", \"thinmon.dll\", \"fxsst.dll\", \"msTracer.dll\")\n and (dll.code_signature.trusted != true or dll.code_signature.exists != true)) or\n\n /* compatible with Sysmon EventID 7 - Image Load */\n (file.name : (\"wlbsctrl.dll\", \"wbemcomn.dll\", \"WptsExtensions.dll\", \"Tsmsisrv.dll\", \"TSVIPSrv.dll\", \"Msfte.dll\",\n \"wow64log.dll\", \"WindowsCoreDeviceInfo.dll\", \"Ualapi.dll\", \"wlanhlp.dll\", \"phoneinfo.dll\", \"EdgeGdi.dll\",\n \"cdpsgshims.dll\", \"windowsperformancerecordercontrol.dll\", \"diagtrack_win.dll\", \"oci.dll\", \"TPPCOIPW32.dll\", \n \"tpgenlic.dll\", \"thinmon.dll\", \"fxsst.dll\", \"msTracer.dll\") and \n not file.path : (\"?:\\\\Windows\\\\System32\\\\wbemcomn.dll\", \"?:\\\\Windows\\\\SysWOW64\\\\wbemcomn.dll\") and \n not file.hash.sha256 : \n (\"6e837794fc282446906c36d681958f2f6212043fc117c716936920be166a700f\", \n \"b14e4954e8cca060ffeb57f2458b6a3a39c7d2f27e94391cbcea5387652f21a4\", \n \"c258d90acd006fa109dc6b748008edbb196d6168bc75ace0de0de54a4db46662\") and \n not file.code_signature.status == \"Valid\")\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Attempt to Delete an Okta Network Zone", + "description": "Detects attempts to delete an Okta network zone. Okta network zones can be configured to limit or restrict access to a network based on IP addresses or geolocations. An adversary may attempt to modify, delete, or deactivate an Okta network zone in order to remove or weaken an organization's security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Delete an Okta Network Zone\n\nOkta network zones can be configured to limit or restrict access to a network based on IP addresses or geolocations. Deleting a network zone in Okta might remove or weaken the security controls of an organization, which might be an indicator of an adversary's attempt to evade defenses.\n\n#### Possible investigation steps:\n\n- Identify the actor associated with the alert by examining the `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields.\n- Examine the `event.action` field to confirm the deletion of a network zone.\n- Investigate the `okta.target.id`, `okta.target.type`, `okta.target.alternate_id`, or `okta.target.display_name` fields to identify the network zone that was deleted.\n- Review the `event.time` field to understand when the event happened.\n- Check the actor's activities before and after the event to understand the context of this event.\n\n### False positive analysis:\n\n- Verify the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor. If these match the actor's typical behavior, it might be a false positive.\n- Check if the actor is a known administrator or a member of the IT team who might have a legitimate reason to delete a network zone.\n- Cross-verify the actor's actions with any known planned changes or maintenance activities.\n\n### Response and remediation:\n\n- If unauthorized access or actions are confirmed, immediately lock the affected actor's account and require a password change.\n- If a network zone was deleted without authorization, create a new network zone with similar settings as the deleted one.\n- Review and update the privileges of the actor who initiated the deletion.\n- Identify any gaps in the security policies and procedures and update them as necessary.\n- Implement additional monitoring and logging of Okta events to improve visibility of user actions.\n- Communicate and train the employees about the importance of following proper procedures for modifying network zone settings.", + "version": 206, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Use Case: Network Security Monitoring", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if Oyour organization's Okta network zones are regularly deleted." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/network/network-zones.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "62cec8b7-db06-4af2-9d3b-d8c36371f89a", + "rule_id": "c749e367-a069-4a73-b1f2-43a3798153ad", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:zone.delete\n", + "language": "kuery" + }, + { + "name": "Suspicious Startup Shell Folder Modification", + "description": "Identifies suspicious startup shell folder modifications to change the default Startup directory in order to bypass detections monitoring file creation in the Windows Startup folder.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Startup Shell Folder Modification\n\nTechniques used within malware and by adversaries often leverage the Windows registry to store malicious programs for persistence. Startup shell folders are often targeted as they are not as prevalent as normal Startup folder paths so this behavior may evade existing AV/EDR solutions. These programs may also run with higher privileges which can be ideal for an attacker.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Review the source process and related file tied to the Windows Registry entry.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- There is a high possibility of benign legitimate programs being added to shell folders. This activity could be based on new software installations, patches, or other network administrator activity. Before undertaking further investigation, it should be verified that this activity is not benign.\n\n### Related rules\n\n- Startup or Run Key Registry Modification - 97fc44d3-8dae-4019-ae83-298c3015600f\n- Persistent Scripts in the Startup Directory - f7c4dc5a-a58d-491d-9f14-9b66507121c0\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "e50add37-f45a-4c2e-ba1b-e747a22f2abf", + "rule_id": "c8b150f0-0164-475b-a75e-74b47800a9ff", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\User Shell Folders\\\\Common Startup\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders\\\\Common Startup\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\User Shell Folders\\\\Startup\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders\\\\Startup\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\User Shell Folders\\\\Common Startup\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders\\\\Common Startup\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\User Shell Folders\\\\Startup\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders\\\\Startup\"\n ) and\n registry.data.strings != null and\n /* Normal Startup Folder Paths */\n not registry.data.strings : (\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\",\n \"%ProgramData%\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\",\n \"%USERPROFILE%\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\",\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Modification or Removal of an Okta Application Sign-On Policy", + "description": "Detects attempts to modify or delete a sign on policy for an Okta application. An adversary may attempt to modify or delete the sign on policy for an Okta application in order to remove or weaken an organization's security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 206, + "tags": [ + "Tactic: Persistence", + "Use Case: Identity and Access Audit", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if sign on policies for Okta applications are regularly modified or deleted in your organization." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/App_Based_Signon.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1556", + "name": "Modify Authentication Process", + "reference": "https://attack.mitre.org/techniques/T1556/" + } + ] + } + ], + "id": "3d0dd47f-02b5-4242-933e-8e3d698fadd6", + "rule_id": "cd16fb10-0261-46e8-9932-a0336278cdbe", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:(application.policy.sign_on.update or application.policy.sign_on.rule.delete)\n", + "language": "kuery" + }, + { + "name": "Attempt to Deactivate MFA for an Okta User Account", + "description": "Detects attempts to deactivate multi-factor authentication (MFA) for an Okta user. An adversary may deactivate MFA for an Okta user account in order to weaken the authentication requirements for the account.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 206, + "tags": [ + "Tactic: Persistence", + "Use Case: Identity and Access Audit", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "If the behavior of deactivating MFA for Okta user accounts is expected, consider adding exceptions to this rule to filter false positives." + ], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "77379c3e-e63d-4822-94f6-d0891d0f3c30", + "rule_id": "cd89602e-9db0-48e3-9391-ae3bf241acd8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:user.mfa.factor.deactivate\n", + "language": "kuery" + }, + { + "name": "Potential PowerShell HackTool Script by Function Names", + "description": "Detects known PowerShell offensive tooling functions names in PowerShell scripts. Attackers commonly use out-of-the-box offensive tools without modifying the code. This rule aim is to take advantage of that.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md", + "https://github.com/BC-SECURITY/Empire" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "dfedb0a8-3c3f-41e3-8953-8456af5ea7a6", + "rule_id": "cde1bafa-9f01-4f43-a872-605b678968b0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"Add-DomainGroupMember\" or \"Add-DomainObjectAcl\" or\n \"Add-RemoteConnection\" or \"Add-ServiceDacl\" or\n \"Add-Win32Type\" or \"Convert-ADName\" or\n \"Convert-LDAPProperty\" or \"ConvertFrom-LDAPLogonHours\" or\n \"ConvertFrom-UACValue\" or \"Copy-ArrayOfMemAddresses\" or\n \"Create-NamedPipe\" or \"Create-ProcessWithToken\" or\n \"Create-RemoteThread\" or \"Create-SuspendedWinLogon\" or\n \"Create-WinLogonProcess\" or \"Emit-CallThreadStub\" or\n \"Enable-SeAssignPrimaryTokenPrivilege\" or \"Enable-SeDebugPrivilege\" or\n \"Enum-AllTokens\" or \"Export-PowerViewCSV\" or\n \"Find-AVSignature\" or \"Find-AppLockerLog\" or\n \"Find-DomainLocalGroupMember\" or \"Find-DomainObjectPropertyOutlier\" or\n \"Find-DomainProcess\" or \"Find-DomainShare\" or\n \"Find-DomainUserEvent\" or \"Find-DomainUserLocation\" or\n \"Find-InterestingDomainAcl\" or \"Find-InterestingDomainShareFile\" or\n \"Find-InterestingFile\" or \"Find-LocalAdminAccess\" or\n \"Find-PSScriptsInPSAppLog\" or \"Find-PathDLLHijack\" or\n \"Find-ProcessDLLHijack\" or \"Find-RDPClientConnection\" or\n \"Get-AllAttributesForClass\" or \"Get-CachedGPPPassword\" or\n \"Get-DecryptedCpassword\" or \"Get-DecryptedSitelistPassword\" or\n \"Get-DelegateType\" or\n \"Get-DomainDFSShare\" or \"Get-DomainDFSShareV1\" or\n \"Get-DomainDFSShareV2\" or \"Get-DomainDNSRecord\" or\n \"Get-DomainDNSZone\" or \"Get-DomainFileServer\" or\n \"Get-DomainForeignGroupMember\" or \"Get-DomainForeignUser\" or\n \"Get-DomainGPO\" or \"Get-DomainGPOComputerLocalGroupMapping\" or\n \"Get-DomainGPOLocalGroup\" or \"Get-DomainGPOUserLocalGroupMapping\" or\n \"Get-DomainGUIDMap\" or \"Get-DomainGroup\" or\n \"Get-DomainGroupMember\" or \"Get-DomainGroupMemberDeleted\" or\n \"Get-DomainManagedSecurityGroup\" or \"Get-DomainOU\" or\n \"Get-DomainObject\" or \"Get-DomainObjectAcl\" or\n \"Get-DomainObjectAttributeHistory\" or \"Get-DomainObjectLinkedAttributeHistory\" or\n \"Get-DomainPolicyData\" or \"Get-DomainSID\" or\n \"Get-DomainSPNTicket\" or \"Get-DomainSearcher\" or\n \"Get-DomainSite\" or \"Get-DomainSubnet\" or\n \"Get-DomainTrust\" or \"Get-DomainTrustMapping\" or\n \"Get-DomainUser\" or \"Get-DomainUserEvent\" or\n \"Get-Forest\" or \"Get-ForestDomain\" or\n \"Get-ForestGlobalCatalog\" or \"Get-ForestSchemaClass\" or\n \"Get-ForestTrust\" or \"Get-GPODelegation\" or\n \"Get-GPPAutologon\" or \"Get-GPPInnerField\" or\n \"Get-GPPInnerFields\" or \"Get-GPPPassword\" or\n \"Get-GptTmpl\" or \"Get-GroupsXML\" or\n \"Get-HttpStatus\" or \"Get-ImageNtHeaders\" or\n \"Get-Keystrokes\" or\n \"Get-MemoryProcAddress\" or \"Get-MicrophoneAudio\" or\n \"Get-ModifiablePath\" or \"Get-ModifiableRegistryAutoRun\" or\n \"Get-ModifiableScheduledTaskFile\" or \"Get-ModifiableService\" or\n \"Get-ModifiableServiceFile\" or \"Get-Name\" or\n \"Get-NetComputerSiteName\" or \"Get-NetLocalGroup\" or\n \"Get-NetLocalGroupMember\" or \"Get-NetLoggedon\" or\n \"Get-NetRDPSession\" or \"Get-NetSession\" or\n \"Get-NetShare\" or \"Get-PEArchitecture\" or\n \"Get-PEBasicInfo\" or \"Get-PEDetailedInfo\" or\n \"Get-PathAcl\" or \"Get-PrimaryToken\" or\n \"Get-ProcAddress\" or \"Get-ProcessTokenGroup\" or\n \"Get-ProcessTokenPrivilege\" or \"Get-ProcessTokenType\" or\n \"Get-RegLoggedOn\" or \"Get-RegistryAlwaysInstallElevated\" or\n \"Get-RegistryAutoLogon\" or \"Get-RemoteProcAddress\" or\n \"Get-Screenshot\" or \"Get-ServiceDetail\" or\n \"Get-SiteListPassword\" or \"Get-SitelistField\" or\n \"Get-System\" or \"Get-SystemNamedPipe\" or\n \"Get-SystemToken\" or \"Get-ThreadToken\" or\n \"Get-TimedScreenshot\" or \"Get-TokenInformation\" or\n \"Get-TopPort\" or \"Get-UnattendedInstallFile\" or\n \"Get-UniqueTokens\" or \"Get-UnquotedService\" or\n \"Get-VaultCredential\" or \"Get-VaultElementValue\" or\n \"Get-VirtualProtectValue\" or \"Get-VolumeShadowCopy\" or\n \"Get-WMIProcess\" or \"Get-WMIRegCachedRDPConnection\" or\n \"Get-WMIRegLastLoggedOn\" or \"Get-WMIRegMountedDrive\" or\n \"Get-WMIRegProxy\" or \"Get-WebConfig\" or\n \"Get-Win32Constants\" or \"Get-Win32Functions\" or\n \"Get-Win32Types\" or \"Import-DllImports\" or\n \"Import-DllInRemoteProcess\" or \"Inject-LocalShellcode\" or\n \"Inject-RemoteShellcode\" or \"Install-ServiceBinary\" or\n \"Invoke-CompareAttributesForClass\" or \"Invoke-CreateRemoteThread\" or\n \"Invoke-CredentialInjection\" or \"Invoke-DllInjection\" or\n \"Invoke-EventVwrBypass\" or \"Invoke-ImpersonateUser\" or\n \"Invoke-Kerberoast\" or \"Invoke-MemoryFreeLibrary\" or\n \"Invoke-MemoryLoadLibrary\" or \"Invoke-Method\" or\n \"Invoke-Mimikatz\" or \"Invoke-NinjaCopy\" or\n \"Invoke-PatchDll\" or \"Invoke-Portscan\" or\n \"Invoke-PrivescAudit\" or \"Invoke-ReflectivePEInjection\" or\n \"Invoke-ReverseDnsLookup\" or \"Invoke-RevertToSelf\" or\n \"Invoke-ServiceAbuse\" or \"Invoke-Shellcode\" or\n \"Invoke-TokenManipulation\" or \"Invoke-UserImpersonation\" or\n \"Invoke-WmiCommand\" or \"Mount-VolumeShadowCopy\" or\n \"New-ADObjectAccessControlEntry\" or \"New-DomainGroup\" or\n \"New-DomainUser\" or \"New-DynamicParameter\" or\n \"New-InMemoryModule\" or\n \"New-ThreadedFunction\" or \"New-VolumeShadowCopy\" or\n \"Out-CompressedDll\" or \"Out-EncodedCommand\" or\n \"Out-EncryptedScript\" or \"Out-Minidump\" or\n \"PortScan-Alive\" or \"Portscan-Port\" or\n \"Remove-DomainGroupMember\" or \"Remove-DomainObjectAcl\" or\n \"Remove-RemoteConnection\" or \"Remove-VolumeShadowCopy\" or\n \"Restore-ServiceBinary\" or \"Set-DesktopACLToAllowEveryone\" or\n \"Set-DesktopACLs\" or \"Set-DomainObject\" or\n \"Set-DomainObjectOwner\" or \"Set-DomainUserPassword\" or\n \"Set-ServiceBinaryPath\" or \"Sub-SignedIntAsUnsigned\" or\n \"Test-AdminAccess\" or \"Test-MemoryRangeValid\" or\n \"Test-ServiceDaclPermission\" or \"Update-ExeFunctions\" or\n \"Update-MemoryAddresses\" or \"Update-MemoryProtectionFlags\" or\n \"Write-BytesToMemory\" or \"Write-HijackDll\" or\n \"Write-PortscanOut\" or \"Write-ServiceBinary\" or\n \"Write-UserAddMSI\" or \"Invoke-Privesc\" or\n \"func_get_proc_address\" or \"Invoke-BloodHound\" or\n \"Invoke-HostEnum\" or \"Get-BrowserInformation\" or\n \"Get-DomainAccountPolicy\" or \"Get-DomainAdmins\" or\n \"Get-AVProcesses\" or \"Get-AVInfo\" or\n \"Get-RecycleBin\" or \"Invoke-BruteForce\" or\n \"Get-PassHints\" or \"Invoke-SessionGopher\" or\n \"Get-LSASecret\" or \"Get-PassHashes\" or\n \"Invoke-WdigestDowngrade\" or \"Get-ChromeDump\" or\n \"Invoke-DomainPasswordSpray\" or \"Get-FoxDump\" or\n \"New-HoneyHash\" or \"Invoke-DCSync\" or\n \"Invoke-PowerDump\" or \"Invoke-SSIDExfil\" or\n \"Invoke-PowerShellTCP\" or \"Add-Exfiltration\" or\n \"Do-Exfiltration\" or \"Invoke-DropboxUpload\" or\n \"Invoke-ExfilDataToGitHub\" or \"Invoke-EgressCheck\" or\n \"Invoke-PostExfil\" or \"Create-MultipleSessions\" or\n \"Invoke-NetworkRelay\" or \"New-GPOImmediateTask\" or\n \"Invoke-WMIDebugger\" or \"Invoke-SQLOSCMD\" or\n \"Invoke-SMBExec\" or \"Invoke-PSRemoting\" or\n \"Invoke-ExecuteMSBuild\" or \"Invoke-DCOM\" or\n \"Invoke-InveighRelay\" or \"Invoke-PsExec\" or\n \"Invoke-SSHCommand\" or \"Find-ActiveUsersWMI\" or\n \"Get-SystemDrivesWMI\" or \"Get-ActiveNICSWMI\" or\n \"Remove-Persistence\" or \"DNS_TXT_Pwnage\" or\n \"Execute-OnTime\" or \"HTTP-Backdoor\" or\n \"Add-ConstrainedDelegationBackdoor\" or \"Add-RegBackdoor\" or\n \"Add-ScrnSaveBackdoor\" or \"Gupt-Backdoor\" or\n \"Invoke-ADSBackdoor\" or \"Add-Persistence\" or\n \"Invoke-ResolverBackdoor\" or \"Invoke-EventLogBackdoor\" or\n \"Invoke-DeadUserBackdoor\" or \"Invoke-DisableMachineAcctChange\" or\n \"Invoke-AccessBinary\" or \"Add-NetUser\" or\n \"Invoke-Schtasks\" or \"Invoke-JSRatRegsvr\" or\n \"Invoke-JSRatRundll\" or \"Invoke-PoshRatHttps\" or\n \"Invoke-PsGcatAgent\" or \"Remove-PoshRat\" or\n \"Install-SSP\" or \"Invoke-BackdoorLNK\" or\n \"PowerBreach\" or \"InstallEXE-Persistence\" or\n \"RemoveEXE-Persistence\" or \"Install-ServiceLevel-Persistence\" or\n \"Remove-ServiceLevel-Persistence\" or \"Invoke-Prompt\" or\n \"Invoke-PacketCapture\" or \"Start-WebcamRecorder\" or\n \"Get-USBKeyStrokes\" or \"Invoke-KeeThief\" or\n \"Get-Keystrokes\" or \"Invoke-NetRipper\" or\n \"Get-EmailItems\" or \"Invoke-MailSearch\" or\n \"Invoke-SearchGAL\" or \"Get-WebCredentials\" or\n \"Start-CaptureServer\" or \"Invoke-PowerShellIcmp\" or\n \"Invoke-PowerShellTcpOneLine\" or \"Invoke-PowerShellTcpOneLineBind\" or\n \"Invoke-PowerShellUdp\" or \"Invoke-PowerShellUdpOneLine\" or\n \"Run-EXEonRemote\" or \"Download-Execute-PS\" or\n \"Out-RundllCommand\" or \"Set-RemoteWMI\" or\n \"Set-DCShadowPermissions\" or \"Invoke-PowerShellWMI\" or\n \"Invoke-Vnc\" or \"Invoke-LockWorkStation\" or\n \"Invoke-EternalBlue\" or \"Invoke-ShellcodeMSIL\" or\n \"Invoke-MetasploitPayload\" or \"Invoke-DowngradeAccount\" or\n \"Invoke-RunAs\" or \"ExetoText\" or\n \"Disable-SecuritySettings\" or \"Set-MacAttribute\" or\n \"Invoke-MS16032\" or \"Invoke-BypassUACTokenManipulation\" or\n \"Invoke-SDCLTBypass\" or \"Invoke-FodHelperBypass\" or\n \"Invoke-EventVwrBypass\" or \"Invoke-EnvBypass\" or\n \"Get-ServiceUnquoted\" or \"Get-ServiceFilePermission\" or\n \"Get-ServicePermission\" or \"Get-ServicePermission\" or\n \"Enable-DuplicateToken\" or \"Invoke-PsUaCme\" or\n \"Invoke-Tater\" or \"Invoke-WScriptBypassUAC\" or\n \"Invoke-AllChecks\" or \"Find-TrustedDocuments\" or\n \"Invoke-Interceptor\" or \"Invoke-PoshRatHttp\" or\n \"Invoke-ExecCommandWMI\" or \"Invoke-KillProcessWMI\" or\n \"Invoke-CreateShareandExecute\" or \"Invoke-RemoteScriptWithOutput\" or\n \"Invoke-SchedJobManipulation\" or \"Invoke-ServiceManipulation\" or\n \"Invoke-PowerOptionsWMI\" or \"Invoke-DirectoryListing\" or\n \"Invoke-FileTransferOverWMI\" or \"Invoke-WMImplant\" or\n \"Invoke-WMIObfuscatedPSCommand\" or \"Invoke-WMIDuplicateClass\" or\n \"Invoke-WMIUpload\" or \"Invoke-WMIRemoteExtract\" or \"Invoke-winPEAS\"\n ) and\n not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\"\n ) and\n not user.id : (\"S-1-5-18\" or \"S-1-5-19\")\n", + "language": "kuery" + }, + { + "name": "Registry Persistence via AppInit DLL", + "description": "AppInit DLLs are dynamic-link libraries (DLLs) that are loaded into every process that creates a user interface (loads user32.dll) on Microsoft Windows operating systems. The AppInit DLL mechanism is used to load custom code into user-mode processes, allowing for the customization of the user interface and the behavior of Windows-based applications. Attackers who add those DLLs to the registry locations can execute code with elevated privileges, similar to process injection, and provide a solid and constant persistence on the machine.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Registry Persistence via AppInit DLL\n\nAppInit DLLs are dynamic-link libraries (DLLs) that are loaded into every process that creates a user interface (loads `user32.dll`) on Microsoft Windows operating systems. The AppInit DLL mechanism is used to load custom code into user-mode processes, allowing for the customization of the user interface and the behavior of Windows-based applications.\n\nAttackers who add those DLLs to the registry locations can execute code with elevated privileges, similar to process injection, and provide a solid and constant persistence on the machine.\n\nThis rule identifies modifications on the AppInit registry keys.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Review the source process and related DLL file tied to the Windows Registry entry.\n - Check whether the DLL is signed, and tied to a authorized program used on your environment.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Retrieve all DLLs under the AppInit registry keys:\n - !{osquery{\"label\":\"Osquery - Retrieve AppInit Registry Value\",\"query\":\"SELECT * FROM registry r where (r.key == 'HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows' or\\nr.key == 'HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Wow6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows') and r.name ==\\n'AppInit_DLLs'\\n\"}}\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable and the DLLs using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.010", + "name": "AppInit DLLs", + "reference": "https://attack.mitre.org/techniques/T1546/010/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "538b9891-8bfa-431f-b1ce-5cafe0edeb22", + "rule_id": "d0e159cf-73e9-40d1-a9ed-077e3158a855", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\AppInit_Dlls\",\n \"HKLM\\\\SOFTWARE\\\\Wow6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\AppInit_Dlls\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\AppInit_Dlls\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Wow6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\AppInit_Dlls\"\n ) and not process.executable : (\n \"C:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"C:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\",\n \"C:\\\\Program Files\\\\Commvault\\\\ContentStore*\\\\Base\\\\cvd.exe\",\n \"C:\\\\Program Files (x86)\\\\Commvault\\\\ContentStore*\\\\Base\\\\cvd.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Attempt to Delete an Okta Policy Rule", + "description": "Detects attempts to delete a rule within an Okta policy. An adversary may attempt to delete an Okta policy rule in order to weaken an organization's security controls.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Delete an Okta Policy Rule\n\nOkta policy rules are integral components of an organization's security controls, as they define how user access to resources is managed. Deletion of a rule within an Okta policy could potentially weaken the organization's security posture, allowing for unauthorized access or facilitating other malicious activities.\n\nThis rule detects attempts to delete an Okta policy rule, which could indicate an adversary's attempt to weaken an organization's security controls. Adversaries may do this to circumvent security measures and enable further malicious activities.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the deletion attempt.\n- Check the `okta.outcome.result` field to confirm the policy rule deletion attempt.\n- Check if there are multiple policy rule deletion attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the policy rule deletion attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the deletion attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the deletion attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the deletion attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized policy rule deletion is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific deletion technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 206, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if Okta MFA rules are regularly modified in your organization." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "06a4cf1d-d42a-46c7-80ba-3d4abf3926a3", + "rule_id": "d5d86bf5-cf0c-4c06-b688-53fdc072fdfd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:policy.rule.delete\n", + "language": "kuery" + }, + { + "name": "System Information Discovery via Windows Command Shell", + "description": "Identifies the execution of discovery commands to enumerate system information, files, and folders using the Windows Command Shell.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating System Information Discovery via Windows Command Shell\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule identifies commands to enumerate system information, files, and folders using the Windows Command Shell.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "building_block_type": "default", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + }, + { + "id": "T1083", + "name": "File and Directory Discovery", + "reference": "https://attack.mitre.org/techniques/T1083/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + } + ], + "id": "8f121f28-9de9-4ee0-bf59-1dce0348aab7", + "rule_id": "d68e95ad-1c82-4074-a12a-125fe10ac8ba", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"cmd.exe\" and process.args : \"/c\" and process.args : (\"set\", \"dir\") and\n not process.parent.executable : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\", \"?:\\\\PROGRA~1\\\\*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Untrusted Driver Loaded", + "description": "Identifies attempt to load an untrusted driver. Adversaries may modify code signing policies to enable execution of unsigned or self-signed code.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Untrusted Driver Loaded\n\nMicrosoft created the Windows Driver Signature Enforcement (DSE) security feature to prevent drivers with invalid signatures from loading and executing into the kernel (ring 0). DSE aims to protect systems by blocking attackers from loading malicious drivers on targets. \n\nThis protection is essential for maintaining system security. However, attackers or administrators can disable DSE and load untrusted drivers, which can put the system at risk. Therefore, it's important to keep this feature enabled and only load drivers from trusted sources to ensure system integrity and security.\n\nThis rule identifies an attempt to load an untrusted driver, which effectively means that DSE was disabled or bypassed. This can indicate that the system was compromised.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the driver loaded to identify potentially suspicious characteristics. The following actions can help you gain context:\n - Identify the path that the driver was loaded from. If you're using Elastic Defend, path information can be found in the `dll.path` field.\n - Examine the file creation and modification timestamps:\n - On Elastic Defend, those can be found in the `dll.Ext.relative_file_creation_time` and `dll.Ext.relative_file_name_modify_time` fields. The values are in seconds.\n - Search for file creation events sharing the same file name as the `dll.name` field and identify the process responsible for the operation.\n - Investigate any other abnormal behavior by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n - Use the driver SHA-256 (`dll.hash.sha256` field) hash value to search for the existence and reputation in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Use Osquery to investigate the drivers loaded into the system.\n - !{osquery{\"label\":\"Osquery - Retrieve All Non-Microsoft Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE NOT (provider == \\\"Microsoft\\\" AND signed == \\\"1\\\")\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Unsigned Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE signed == \\\"0\\\"\\n\"}}\n- Identify the driver's `Device Name` and `Service Name`.\n- Check for alerts from the rules specified in the `Related Rules` section.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Related Rules\n\n- First Time Seen Driver Loaded - df0fd41e-5590-4965-ad5e-cd079ec22fa9\n- Code Signing Policy Modification Through Registry - da7733b1-fe08-487e-b536-0a04c6d8b0cd\n- Code Signing Policy Modification Through Built-in tools - b43570de-a908-4f7f-8bdb-b2df6ffd8c80\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Disable and uninstall all suspicious drivers found in the system. This can be done via Device Manager. (Note that this step may require you to boot the system into Safe Mode.)\n- Remove the related services and registry keys found in the system. Note that the service will probably not stop if the driver is still installed.\n - This can be done via PowerShell `Remove-Service` cmdlet.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Ensure that the Driver Signature Enforcement is enabled on the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/hfiref0x/TDL", + "https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653559(v=vs.85)?redirectedfrom=MSDN" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + } + ] + } + ] + } + ], + "id": "e6602776-8fc7-49c0-aa48-98240e36adda", + "rule_id": "d8ab1ec1-feeb-48b9-89e7-c12e189448aa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "driver where host.os.type == \"windows\" and process.pid == 4 and\n dll.code_signature.trusted != true and \n not dll.code_signature.status : (\"errorExpired\", \"errorRevoked\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Code Signing Policy Modification Through Registry", + "description": "Identifies attempts to disable/modify the code signing policy through the registry. Code signing provides authenticity on a program, and grants the user with the ability to check whether the program has been tampered with. By allowing the execution of unsigned or self-signed code, threat actors can craft and execute malicious code.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Code Signing Policy Modification Through Registry\n\nMicrosoft created the Windows Driver Signature Enforcement (DSE) security feature to prevent drivers with invalid signatures from loading and executing into the kernel (ring 0). DSE aims to protect systems by blocking attackers from loading malicious drivers on targets. \n\nThis protection is essential for maintaining system security. However, attackers or administrators can disable DSE and load untrusted drivers, which can put the system at risk. Therefore, it's important to keep this feature enabled and only load drivers from trusted sources to ensure system integrity and security.\n\nThis rule identifies registry modifications that can disable DSE.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Use Osquery and endpoint driver events (`event.category = \"driver\"`) to investigate if suspicious drivers were loaded into the system after the registry was modified.\n - !{osquery{\"label\":\"Osquery - Retrieve All Non-Microsoft Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE NOT (provider == \\\"Microsoft\\\" AND signed == \\\"1\\\")\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Unsigned Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE signed == \\\"0\\\"\\n\"}}\n- Identify the driver's `Device Name` and `Service Name`.\n- Check for alerts from the rules specified in the `Related Rules` section.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Related Rules\n\n- First Time Seen Driver Loaded - df0fd41e-5590-4965-ad5e-cd079ec22fa9\n- Untrusted Driver Loaded - d8ab1ec1-feeb-48b9-89e7-c12e189448aa\n- Code Signing Policy Modification Through Built-in tools - b43570de-a908-4f7f-8bdb-b2df6ffd8c80\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Disable and uninstall all suspicious drivers found in the system. This can be done via Device Manager. (Note that this step may require you to boot the system into Safe Mode.)\n- Remove the related services and registry keys found in the system. Note that the service will probably not stop if the driver is still installed.\n - This can be done via PowerShell `Remove-Service` cmdlet.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Remove and block malicious artifacts identified during triage.\n- Ensure that the Driver Signature Enforcement is enabled on the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1553", + "name": "Subvert Trust Controls", + "reference": "https://attack.mitre.org/techniques/T1553/", + "subtechnique": [ + { + "id": "T1553.006", + "name": "Code Signing Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1553/006/" + } + ] + }, + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "f17ccb64-bcb6-4bf8-80b3-16c798c729d2", + "rule_id": "da7733b1-fe08-487e-b536-0a04c6d8b0cd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.value", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type : (\"creation\", \"change\") and\n(\n registry.path : \"HKEY_USERS\\\\*\\\\Software\\\\Policies\\\\Microsoft\\\\Windows NT\\\\Driver Signing\\\\BehaviorOnFailedVerify\" and\n registry.value: \"BehaviorOnFailedVerify\" and\n registry.data.strings : (\"0\", \"0x00000000\", \"1\", \"0x00000001\")\n)\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Service was Installed in the System", + "description": "Identifies the creation of a new Windows service with suspicious Service command values. Windows services typically run as SYSTEM and can be used for privilege escalation and persistence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Service was Installed in the System\n\nAttackers may create new services to execute system shells and other command execution utilities to elevate their privileges from administrator to SYSTEM. They can also configure services to execute these utilities with persistence payloads.\n\nThis rule looks for suspicious services being created with suspicious traits compatible with the above behavior.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify how the service was created or modified. Look for registry changes events or Windows events related to service activities (for example, 4697 and/or 7045).\n - Examine the created and existent services, the executables or drivers referenced, and command line arguments for suspicious entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Non-Microsoft Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE NOT (provider == \\\"Microsoft\\\" AND signed == \\\"1\\\")\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Unsigned Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE signed == \\\"0\\\"\\n\"}}\n - Retrieve the referenced files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n\n### False positive analysis\n\n- Certain services such as PSEXECSVC may happen legitimately. The security team should address any potential benign true positive (B-TP) by excluding the relevant FP by pattern.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the service.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 8, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + } + ], + "id": "8e52b41c-87c4-4d8d-ba0a-356416fb7828", + "rule_id": "da87eee1-129c-4661-a7aa-57d0b9645fad", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.ImagePath", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.ServiceFileName", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "any where\n (event.code : \"4697\" and\n (winlog.event_data.ServiceFileName : \n (\"*COMSPEC*\", \"*\\\\127.0.0.1*\", \"*Admin$*\", \"*powershell*\", \"*rundll32*\", \"*cmd.exe*\", \"*PSEXESVC*\", \n \"*echo*\", \"*RemComSvc*\", \"*.bat*\", \"*.cmd*\", \"*certutil*\", \"*vssadmin*\", \"*certmgr*\", \"*bitsadmin*\", \n \"*\\\\Users\\\\*\", \"*\\\\Windows\\\\Temp\\\\*\", \"*\\\\Windows\\\\Tasks\\\\*\", \"*\\\\PerfLogs\\\\*\", \"*\\\\Windows\\\\Debug\\\\*\",\n \"*regsvr32*\", \"*msbuild*\") or\n winlog.event_data.ServiceFileName regex~ \"\"\"%systemroot%\\\\[a-z0-9]+\\.exe\"\"\")) or\n\n (event.code : \"7045\" and\n winlog.event_data.ImagePath : (\n \"*COMSPEC*\", \"*\\\\127.0.0.1*\", \"*Admin$*\", \"*powershell*\", \"*rundll32*\", \"*cmd.exe*\", \"*PSEXESVC*\",\n \"*echo*\", \"*RemComSvc*\", \"*.bat*\", \"*.cmd*\", \"*certutil*\", \"*vssadmin*\", \"*certmgr*\", \"*bitsadmin*\",\n \"*\\\\Users\\\\*\", \"*\\\\Windows\\\\Temp\\\\*\", \"*\\\\Windows\\\\Tasks\\\\*\", \"*\\\\PerfLogs\\\\*\", \"*\\\\Windows\\\\Debug\\\\*\",\n \"*regsvr32*\", \"*msbuild*\"))\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Unusual Country For an AWS Command", + "description": "A machine learning job detected AWS command activity that, while not inherently suspicious or abnormal, is sourcing from a geolocation (country) that is unusual for the command. This can be the result of compromised credentials or keys being used by a threat actor in a different geography than the authorized user(s).", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Country For an AWS Command\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.\n\nThis rule uses a machine learning job to detect an AWS API command that while not inherently suspicious or abnormal, is sourcing from a geolocation (country) that is unusual for the command. This can be the result of compromised credentials or keys used by a threat actor in a different geography than the authorized user(s).\n\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation of the source IP address.\n\n#### Possible investigation steps\n\n- Identify the user account involved and the action performed. Verify whether it should perform this kind of action.\n - Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context.\n - The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, or network administrator activity.\n- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Contact the account owner and confirm whether they are aware of this activity if suspicious.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False Positive Analysis\n\n- False positives can occur if activity is coming from new employees based in a country with no previous history in AWS.\n- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.\n\n### Related Rules\n\n- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276\n- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1\n- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff\n- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-2h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "New or unusual command and user geolocation activity can be due to manual troubleshooting or reconfiguration; changes in cloud automation scripts or workflows; adoption of new services; expansion into new regions; increased adoption of work from home policies; or users who travel frequently." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "459d3345-4c70-44e0-9e76-e900a09cc65b", + "rule_id": "dca28dee-c999-400f-b640-50a081cc0fd1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": "rare_method_for_a_country" + }, + { + "name": "First Time Seen Driver Loaded", + "description": "Identifies the load of a driver with an original file name and signature values that were observed for the first time during the last 30 days. This rule type can help baseline drivers installation within your environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating First Time Seen Driver Loaded\n\nA driver is a software component that allows the operating system to communicate with hardware devices. It works at a high privilege level, the kernel level, having high control over the system's security and stability.\n\nAttackers may exploit known good but vulnerable drivers to execute code in their context because once an attacker can execute code in the kernel, security tools can no longer effectively protect the host. They can leverage these drivers to tamper, bypass and terminate security software, elevate privileges, create persistence mechanisms, and disable operating system protections and monitoring features. Attackers were seen in the wild conducting these actions before acting on their objectives, such as ransomware.\n\nRead the complete research on \"Stopping Vulnerable Driver Attacks\" done by Elastic Security Labs [here](https://www.elastic.co/kr/security-labs/stopping-vulnerable-driver-attacks).\n\nThis rule identifies the load of a driver with an original file name and signature values observed for the first time during the last 30 days. This rule type can help baseline drivers installation within your environment.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the driver loaded to identify potentially suspicious characteristics. The following actions can help you gain context:\n - Identify the path that the driver was loaded from. If using Elastic Defend, this information can be found in the `dll.path` field.\n - Examine the digital signature of the driver, and check if it's valid.\n - Examine the creation and modification timestamps of the file:\n - On Elastic Defend, those can be found in the `dll.Ext.relative_file_creation_time` and `\"dll.Ext.relative_file_name_modify_time\"` fields, with the values being seconds.\n - Search for file creation events sharing the same file name as the `dll.name` field and identify the process responsible for the operation.\n - Investigate any other abnormal behavior by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n - Use the driver SHA-256 (`dll.hash.sha256` field) hash value to search for the existence and reputation in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Use Osquery to investigate the drivers loaded into the system.\n - !{osquery{\"label\":\"Osquery - Retrieve All Non-Microsoft Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE NOT (provider == \\\"Microsoft\\\" AND signed == \\\"1\\\")\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Unsigned Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE signed == \\\"0\\\"\\n\"}}\n- Identify the driver's `Device Name` and `Service Name`.\n- Check for alerts from the rules specified in the `Related Rules` section.\n\n### False positive analysis\n\n- Matches derived from these rules are not inherently malicious. The security team should investigate them to ensure they are legitimate and needed, then include them in an allowlist only if required. The security team should address any vulnerable driver installation as it can put the user and the domain at risk.\n\n### Related Rules\n\n- Untrusted Driver Loaded - d8ab1ec1-feeb-48b9-89e7-c12e189448aa\n- Code Signing Policy Modification Through Registry - da7733b1-fe08-487e-b536-0a04c6d8b0cd\n- Code Signing Policy Modification Through Built-in tools - b43570de-a908-4f7f-8bdb-b2df6ffd8c80\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Disable and uninstall all suspicious drivers found in the system. This can be done via Device Manager. (Note that this step may require you to boot the system into Safe Mode)\n- Remove the related services and registry keys found in the system. Note that the service will probably not stop if the driver is still installed.\n - This can be done via PowerShell `Remove-Service` cmdlet.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Ensure that the Driver Signature Enforcement is enabled on the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Persistence", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/kr/security-labs/stopping-vulnerable-driver-attacks" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + } + ], + "id": "d9f3b024-e6ef-4dd9-8d86-e0d1c7b0204e", + "rule_id": "df0fd41e-5590-4965-ad5e-cd079ec22fa9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "new_terms", + "query": "event.category:\"driver\" and host.os.type:windows and event.action:\"load\"\n", + "new_terms_fields": [ + "dll.pe.original_file_name", + "dll.code_signature.subject_name" + ], + "history_window_start": "now-30d", + "index": [ + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "Suspicious .NET Reflection via PowerShell", + "description": "Detects the use of Reflection.Assembly to load PEs and DLLs in memory in PowerShell scripts. Attackers use this method to load executables and DLLs without writing to the disk, bypassing security solutions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious .NET Reflection via PowerShell\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can use .NET reflection to load PEs and DLLs in memory. These payloads are commonly embedded in the script, which can circumvent file-based security protections.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the script using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately outside engineering or IT business units. As long as the analyst did not identify malware or suspicious activity related to the user or host, this alert can be dismissed.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n- PowerShell Suspicious Payload Encoded and Compressed - 81fe9dc6-a2d7-4192-a2d8-eed98afc766a\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 109, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assembly.load" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1620", + "name": "Reflective Code Loading", + "reference": "https://attack.mitre.org/techniques/T1620/" + }, + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/", + "subtechnique": [ + { + "id": "T1055.001", + "name": "Dynamic-link Library Injection", + "reference": "https://attack.mitre.org/techniques/T1055/001/" + }, + { + "id": "T1055.002", + "name": "Portable Executable Injection", + "reference": "https://attack.mitre.org/techniques/T1055/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "c492b623-1e97-4096-914b-c7265c90533b", + "rule_id": "e26f042e-c590-4e82-8e05-41e81bd822ad", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"[System.Reflection.Assembly]::Load\" or\n \"[Reflection.Assembly]::Load\"\n ) and not \n powershell.file.script_block_text : (\n (\"CommonWorkflowParameters\" or \"RelatedLinksHelpInfo\") and\n \"HelpDisplayStrings\"\n ) and not \n (powershell.file.script_block_text :\n (\"Get-SolutionFiles\" or \"Get-VisualStudio\" or \"Select-MSBuildPath\") and\n not file.name : \"PathFunctions.ps1\"\n )\n and not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "Suspicious Process Execution via Renamed PsExec Executable", + "description": "Identifies suspicious psexec activity which is executing from the psexec service that has been renamed, possibly to evade detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Process Execution via Renamed PsExec Executable\n\nPsExec is a remote administration tool that enables the execution of commands with both regular and SYSTEM privileges on Windows systems. It operates by executing a service component `Psexecsvc` on a remote system, which then runs a specified process and returns the results to the local system. Microsoft develops PsExec as part of the Sysinternals Suite. Although commonly used by administrators, PsExec is frequently used by attackers to enable lateral movement and execute commands as SYSTEM to disable defenses and bypass security protections.\n\nThis rule identifies instances where the PsExec service component is executed using a custom name. This behavior can indicate an attempt to bypass security controls or detections that look for the default PsExec service component name.\n\n#### Possible investigation steps\n\n- Check if the usage of this tool complies with the organization's administration policy.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Identify the target computer and its role in the IT environment.\n- Investigate what commands were run, and assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. As long as the analyst did not identify suspicious activity related to the user or involved hosts, and the tool is allowed by the organization's policy, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n - Prioritize cases involving critical servers and users.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1569", + "name": "System Services", + "reference": "https://attack.mitre.org/techniques/T1569/", + "subtechnique": [ + { + "id": "T1569.002", + "name": "Service Execution", + "reference": "https://attack.mitre.org/techniques/T1569/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.003", + "name": "Rename System Utilities", + "reference": "https://attack.mitre.org/techniques/T1036/003/" + } + ] + } + ] + } + ], + "id": "cb29a73e-d0a1-45cb-9855-188d0584aaf6", + "rule_id": "e2f9fdf5-8076-45ad-9427-41e0e03dc9c2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name : \"psexesvc.exe\" and not process.name : \"PSEXESVC.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Persistence via KDE AutoStart Script or Desktop File Modification", + "description": "Identifies the creation or modification of a K Desktop Environment (KDE) AutoStart script or desktop file that will execute upon each user logon. Adversaries may abuse this method for persistence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://userbase.kde.org/System_Settings/Autostart", + "https://www.amnesty.org/en/latest/research/2020/09/german-made-finspy-spyware-found-in-egypt-and-mac-and-linux-versions-revealed/", + "https://www.intezer.com/blog/research/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/" + } + ] + } + ], + "id": "33a361e9-429f-4cca-9f13-b5115a2c409d", + "rule_id": "e3e904b3-0a8e-4e68-86a8-977a163e21d3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", + "type": "eql", + "query": "file where host.os.type == \"linux\" and event.type != \"deletion\" and\n file.extension in (\"sh\", \"desktop\") and\n file.path :\n (\n \"/home/*/.config/autostart/*\", \"/root/.config/autostart/*\",\n \"/home/*/.kde/Autostart/*\", \"/root/.kde/Autostart/*\",\n \"/home/*/.kde4/Autostart/*\", \"/root/.kde4/Autostart/*\",\n \"/home/*/.kde/share/autostart/*\", \"/root/.kde/share/autostart/*\",\n \"/home/*/.kde4/share/autostart/*\", \"/root/.kde4/share/autostart/*\",\n \"/home/*/.local/share/autostart/*\", \"/root/.local/share/autostart/*\",\n \"/home/*/.config/autostart-scripts/*\", \"/root/.config/autostart-scripts/*\",\n \"/etc/xdg/autostart/*\", \"/usr/share/autostart/*\"\n ) and\n not process.name in (\"yum\", \"dpkg\", \"install\", \"dnf\", \"teams\", \"yum-cron\", \"dnf-automatic\", \"docker\", \"dockerd\", \n \"rpm\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Attempt to Modify an Okta Network Zone", + "description": "Detects attempts to modify an Okta network zone. Okta network zones can be configured to limit or restrict access to a network based on IP addresses or geolocations. An adversary may attempt to modify, delete, or deactivate an Okta network zone in order to remove or weaken an organization's security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Modify an Okta Network Zone\n\nThe modification of an Okta network zone is a critical event as it could potentially allow an adversary to gain unrestricted access to your network. This rule detects attempts to modify, delete, or deactivate an Okta network zone, which may suggest an attempt to remove or weaken an organization's security controls.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the modification attempt.\n- Check the `okta.outcome.result` field to confirm the network zone modification attempt.\n- Check if there are multiple network zone modification attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the modification attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the modification attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the modification attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the modification attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized modification is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific modification technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 206, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Use Case: Network Security Monitoring", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if Oyour organization's Okta network zones are regularly modified." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/network/network-zones.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "09433b01-dabd-4a10-b453-7100ea215372", + "rule_id": "e48236ca-b67a-4b4e-840c-fdc7782bc0c3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:(zone.update or network_zone.rule.disabled or zone.remove_blacklist)\n", + "language": "kuery" + }, + { + "name": "Potential Linux Credential Dumping via Unshadow", + "description": "Identifies the execution of the unshadow utility which is part of John the Ripper, a password-cracking tool on the host machine. Malicious actors can use the utility to retrieve the combined contents of the '/etc/shadow' and '/etc/password' files. Using the combined file generated from the utility, the malicious threat actors can use them as input for password-cracking utilities or prepare themselves for future operations by gathering credential information of the victim.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Data Source: Elastic Endgame", + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.cyberciti.biz/faq/unix-linux-password-cracking-john-the-ripper/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.008", + "name": "/etc/passwd and /etc/shadow", + "reference": "https://attack.mitre.org/techniques/T1003/008/" + } + ] + } + ] + } + ], + "id": "b9a627eb-6cfb-474f-b82f-3aa2520eddbc", + "rule_id": "e7cb3cfd-aaa3-4d7b-af18-23b89955062c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and process.name == \"unshadow\" and\n event.type == \"start\" and event.action in (\"exec\", \"exec_event\") and process.args_count >= 2\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Service Control Spawned via Script Interpreter", + "description": "Identifies Service Control (sc.exe) spawning from script interpreter processes to create, modify, or start services. This can potentially indicate an attempt to elevate privileges or maintain persistence.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Service Control Spawned via Script Interpreter\n\nWindows services are background processes that run with SYSTEM privileges and provide specific functionality or support to other applications and system components.\n\nThe `sc.exe` command line utility is used to manage and control Windows services on a local or remote computer. Attackers may use `sc.exe` to create, modify, and start services to elevate their privileges from administrator to SYSTEM.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine the command line, registry changes events, and Windows events related to service activities (for example, 4697 and/or 7045) for suspicious characteristics.\n - Examine the created and existent services, the executables or drivers referenced, and command line arguments for suspicious entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the referenced files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This activity is not inherently malicious if it occurs in isolation. As long as the analyst did not identify suspicious activity related to the user, host, and service, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the service or restore it to the original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + }, + { + "id": "T1059.005", + "name": "Visual Basic", + "reference": "https://attack.mitre.org/techniques/T1059/005/" + } + ] + }, + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.010", + "name": "Regsvr32", + "reference": "https://attack.mitre.org/techniques/T1218/010/" + }, + { + "id": "T1218.011", + "name": "Rundll32", + "reference": "https://attack.mitre.org/techniques/T1218/011/" + } + ] + } + ] + } + ], + "id": "9d898be7-41e4-428f-8d9c-b911d1a441a2", + "rule_id": "e8571d5f-bea1-46c2-9f56-998de2d3ed95", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "/* This rule is not compatible with Sysmon due to user.id issues */\n\nprocess where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"sc.exe\" or process.pe.original_file_name == \"sc.exe\") and\n process.parent.name : (\"cmd.exe\", \"wscript.exe\", \"rundll32.exe\", \"regsvr32.exe\",\n \"wmic.exe\", \"mshta.exe\",\"powershell.exe\", \"pwsh.exe\") and\n process.args:(\"config\", \"create\", \"start\", \"delete\", \"stop\", \"pause\") and\n /* exclude SYSTEM SID - look for service creations by non-SYSTEM user */\n not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "logs-system.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Unusual Executable File Creation by a System Critical Process", + "description": "Identifies an unexpected executable file being created or modified by a Windows system critical process, which may indicate activity related to remote code execution or other forms of exploitation.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Executable File Creation by a System Critical Process\n\nWindows internal/system processes have some characteristics that can be used to spot suspicious activities. One of these characteristics is file operations.\n\nThis rule looks for the creation of executable files done by system-critical processes. This can indicate the exploitation of a vulnerability or a malicious process masquerading as a system-critical process.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1211", + "name": "Exploitation for Defense Evasion", + "reference": "https://attack.mitre.org/techniques/T1211/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1203", + "name": "Exploitation for Client Execution", + "reference": "https://attack.mitre.org/techniques/T1203/" + } + ] + } + ], + "id": "9e6439fb-f39f-4651-b703-ffc26f3f06fb", + "rule_id": "e94262f2-c1e9-4d3f-a907-aeab16712e1a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.extension : (\"exe\", \"dll\") and\n process.name : (\"smss.exe\",\n \"autochk.exe\",\n \"csrss.exe\",\n \"wininit.exe\",\n \"services.exe\",\n \"lsass.exe\",\n \"winlogon.exe\",\n \"userinit.exe\",\n \"LogonUI.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Attempt to Deactivate an Okta Application", + "description": "Detects attempts to deactivate an Okta application. An adversary may attempt to modify, deactivate, or delete an Okta application in order to weaken an organization's security controls or disrupt their business operations.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Attempt to Deactivate an Okta Application\n\nThis rule detects attempts to deactivate an Okta application. Unauthorized deactivation could lead to disruption of services and pose a significant risk to the organization.\n\n#### Possible investigation steps:\n- Identify the actor associated with the deactivation attempt by examining the `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, and `okta.actor.display_name` fields.\n- Determine the client used by the actor. Review the `okta.client.ip`, `okta.client.user_agent.raw_user_agent`, `okta.client.zone`, `okta.client.device`, and `okta.client.id` fields.\n- If the client is a device, check the `okta.device.id`, `okta.device.name`, `okta.device.os_platform`, `okta.device.os_version`, and `okta.device.managed` fields.\n- Understand the context of the event from the `okta.debug_context.debug_data` and `okta.authentication_context` fields.\n- Check the `okta.outcome.result` and `okta.outcome.reason` fields to see if the attempt was successful or failed.\n- Review the past activities of the actor involved in this action by checking their previous actions logged in the `okta.target` field.\n- Analyze the `okta.transaction.id` and `okta.transaction.type` fields to understand the context of the transaction.\n- Evaluate the actions that happened just before and after this event in the `okta.event_type` field to help understand the full context of the activity.\n\n### False positive analysis:\n- It might be a false positive if the action was part of a planned activity, performed by an authorized person, or if the `okta.outcome.result` field shows a failure.\n- An unsuccessful attempt might also indicate an authorized user having trouble rather than a malicious activity.\n\n### Response and remediation:\n- If unauthorized deactivation attempts are confirmed, initiate the incident response process.\n- Block the IP address or device used in the attempts if they appear suspicious, using the data from the `okta.client.ip` and `okta.device.id` fields.\n- Reset the user's password and enforce MFA re-enrollment, if applicable.\n- Conduct a review of Okta policies and ensure they are in accordance with security best practices.\n- If the deactivated application was crucial for business operations, coordinate with the relevant team to reactivate it and minimize the impact.", + "version": 206, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if your organization's Okta applications are regularly deactivated and the behavior is expected." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Apps/Apps_Apps.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1489", + "name": "Service Stop", + "reference": "https://attack.mitre.org/techniques/T1489/" + } + ] + } + ], + "id": "bb55a64f-a999-44be-ab40-dd884caf506b", + "rule_id": "edb91186-1c7e-4db8-b53e-bfa33a1a0a8a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:application.lifecycle.deactivate\n", + "language": "kuery" + }, + { + "name": "Potential Remote Code Execution via Web Server", + "description": "Identifies suspicious commands executed via a web server, which may suggest a vulnerability and remote shell access. Attackers may exploit a vulnerability in a web application to execute commands via a web server, or place a backdoor file that can be abused to gain code execution as a mechanism for persistence.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Remote Code Execution via Web Server\n\nAdversaries may backdoor web servers with web shells to establish persistent access to systems. A web shell is a malicious script, often embedded into a compromised web server, that grants an attacker remote access and control over the server. This enables the execution of arbitrary commands, data exfiltration, and further exploitation of the target network.\n\nThis rule detects a web server process spawning script and command line interface programs, potentially indicating attackers executing commands using the web shell.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible investigation steps\n\n- Investigate abnormal behaviors by the subject process such as network connections, file modifications, and any other spawned child processes.\n - Investigate listening ports and open sockets to look for potential reverse shells or data exfiltration.\n - !{osquery{\"label\":\"Osquery - Retrieve Listening Ports\",\"query\":\"SELECT pid, address, port, socket, protocol, path FROM listening_ports\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Open Sockets\",\"query\":\"SELECT pid, family, remote_address, remote_port, socket, state FROM process_open_sockets\"}}\n - Investigate the process information for malicious or uncommon processes/process trees.\n - !{osquery{\"label\":\"Osquery - Retrieve Process Info\",\"query\":\"SELECT name, cmdline, parent, path, uid FROM processes\"}}\n - Investigate the process tree spawned from the user that is used to run the web application service. A user that is running a web application should not spawn other child processes.\n - !{osquery{\"label\":\"Osquery - Retrieve Process Info for Webapp User\",\"query\":\"SELECT name, cmdline, parent, path, uid FROM processes WHERE uid = {{process.user.id}}\"}}\n- Examine the command line to determine which commands or scripts were executed.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Initial Access", + "Data Source: Elastic Endgame", + "Use Case: Vulnerability", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Network monitoring or management products may have a web server component that runs shell commands as part of normal behavior." + ], + "references": [ + "https://pentestlab.blog/tag/web-shell/", + "https://www.elastic.co/security-labs/elastic-response-to-the-the-spring4shell-vulnerability-cve-2022-22965" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1505", + "name": "Server Software Component", + "reference": "https://attack.mitre.org/techniques/T1505/", + "subtechnique": [ + { + "id": "T1505.003", + "name": "Web Shell", + "reference": "https://attack.mitre.org/techniques/T1505/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + } + ], + "id": "e70c2051-812e-4048-a03c-8dc87d5d1f9e", + "rule_id": "f16fca20-4d6c-43f9-aec1-20b6de3b0aeb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and\nevent.action in (\"exec\", \"exec_event\") and process.parent.executable : (\n \"/usr/sbin/nginx\", \"/usr/local/sbin/nginx\",\n \"/usr/sbin/apache\", \"/usr/local/sbin/apache\",\n \"/usr/sbin/apache2\", \"/usr/local/sbin/apache2\",\n \"/usr/sbin/php*\", \"/usr/local/sbin/php*\",\n \"/usr/sbin/lighttpd\", \"/usr/local/sbin/lighttpd\",\n \"/usr/sbin/hiawatha\", \"/usr/local/sbin/hiawatha\",\n \"/usr/local/bin/caddy\", \n \"/usr/local/lsws/bin/lswsctrl\",\n \"*/bin/catalina.sh\"\n) and\nprocess.name : (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"python*\", \"perl\", \"php*\", \"tmux\") and\nprocess.args : (\"whoami\", \"id\", \"uname\", \"cat\", \"hostname\", \"ip\", \"curl\", \"wget\", \"pwd\") and\nnot process.name == \"phpquery\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Potential OpenSSH Backdoor Logging Activity", + "description": "Identifies a Secure Shell (SSH) client or server process creating or writing to a known SSH backdoor log file. Adversaries may modify SSH related binaries for persistence or credential access via patching sensitive functions to enable unauthorized access or to log SSH credentials for exfiltration.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Updates to approved and trusted SSH executables can trigger this rule." + ], + "references": [ + "https://github.com/eset/malware-ioc/tree/master/sshdoor", + "https://www.welivesecurity.com/wp-content/uploads/2021/01/ESET_Kobalos.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1556", + "name": "Modify Authentication Process", + "reference": "https://attack.mitre.org/techniques/T1556/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1554", + "name": "Compromise Client Software Binary", + "reference": "https://attack.mitre.org/techniques/T1554/" + } + ] + } + ], + "id": "dc9c6c43-346e-4c44-9677-7b77aec9bc1d", + "rule_id": "f28e2be4-6eca-4349-bdd9-381573730c22", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", + "type": "eql", + "query": "file where host.os.type == \"linux\" and event.type == \"change\" and process.executable : (\"/usr/sbin/sshd\", \"/usr/bin/ssh\") and\n (\n (file.name : (\".*\", \"~*\", \"*~\") and not file.name : (\".cache\", \".viminfo\", \".bash_history\", \".google_authenticator\",\n \".jelenv\", \".csvignore\", \".rtreport\")) or\n file.extension : (\"in\", \"out\", \"ini\", \"h\", \"gz\", \"so\", \"sock\", \"sync\", \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\") or\n file.path :\n (\n \"/private/etc/*--\",\n \"/usr/share/*\",\n \"/usr/include/*\",\n \"/usr/local/include/*\",\n \"/private/tmp/*\",\n \"/private/var/tmp/*\",\n \"/usr/tmp/*\",\n \"/usr/share/man/*\",\n \"/usr/local/share/*\",\n \"/usr/lib/*.so.*\",\n \"/private/etc/ssh/.sshd_auth\",\n \"/usr/bin/ssd\",\n \"/private/var/opt/power\",\n \"/private/etc/ssh/ssh_known_hosts\",\n \"/private/var/html/lol\",\n \"/private/var/log/utmp\",\n \"/private/var/lib\",\n \"/var/run/sshd/sshd.pid\",\n \"/var/run/nscd/ns.pid\",\n \"/var/run/udev/ud.pid\",\n \"/var/run/udevd.pid\"\n )\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Persistent Scripts in the Startup Directory", + "description": "Identifies script engines creating files in the Startup folder, or the creation of script files in the Startup folder. Adversaries may abuse this technique to maintain persistence in an environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Persistent Scripts in the Startup Directory\n\nThe Windows Startup folder is a special folder in Windows. Programs added to this folder are executed during account logon, without user interaction, providing an excellent way for attackers to maintain persistence.\n\nThis rule looks for shortcuts created by wscript.exe or cscript.exe, or js/vbs scripts created by any process.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- Suspicious Startup Shell Folder Modification - c8b150f0-0164-475b-a75e-74b47800a9ff\n- Startup Folder Persistence via Unsigned Process - 2fba96c0-ade5-4bce-b92f-a5df2509da3f\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + }, + { + "id": "T1547.009", + "name": "Shortcut Modification", + "reference": "https://attack.mitre.org/techniques/T1547/009/" + } + ] + } + ] + } + ], + "id": "9307153b-458d-4572-8a29-ca496ba2ec67", + "rule_id": "f7c4dc5a-a58d-491d-9f14-9b66507121c0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and user.domain != \"NT AUTHORITY\" and\n\n /* detect shortcuts created by wscript.exe or cscript.exe */\n (file.path : \"C:\\\\*\\\\Programs\\\\Startup\\\\*.lnk\" and\n process.name : (\"wscript.exe\", \"cscript.exe\")) or\n\n /* detect vbs or js files created by any process */\n file.path : (\"C:\\\\*\\\\Programs\\\\Startup\\\\*.vbs\",\n \"C:\\\\*\\\\Programs\\\\Startup\\\\*.vbe\",\n \"C:\\\\*\\\\Programs\\\\Startup\\\\*.wsh\",\n \"C:\\\\*\\\\Programs\\\\Startup\\\\*.wsf\",\n \"C:\\\\*\\\\Programs\\\\Startup\\\\*.js\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Reverse Shell via Suspicious Binary", + "description": "This detection rule detects the creation of a shell through a chain consisting of the execution of a suspicious binary (located in a commonly abused location or executed manually) followed by a network event and ending with a shell being spawned. Stageless reverse tcp shells display this behaviour. Attackers may spawn reverse shells to establish persistence onto a target system.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + } + ], + "id": "b117ff56-336a-47d2-b7a9-83c1de5c1bdd", + "rule_id": "fa3a59dc-33c3-43bf-80a9-e8437a922c7f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=1s\n[ process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and\n process.executable : (\n \"./*\", \"/tmp/*\", \"/var/tmp/*\", \"/var/www/*\", \"/dev/shm/*\", \"/etc/init.d/*\", \"/etc/rc*.d/*\",\n \"/etc/crontab\", \"/etc/cron.*\", \"/etc/update-motd.d/*\", \"/usr/lib/update-notifier/*\",\n \"/boot/*\", \"/srv/*\", \"/run/*\", \"/root/*\", \"/etc/rc.local\"\n ) and\n process.parent.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and not\n process.name : (\"curl\", \"wget\", \"ping\", \"apt\", \"dpkg\", \"yum\", \"rpm\", \"dnf\", \"dockerd\") ]\n[ network where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"connection_attempted\", \"connection_accepted\") and\n process.executable : (\n \"./*\", \"/tmp/*\", \"/var/tmp/*\", \"/var/www/*\", \"/dev/shm/*\", \"/etc/init.d/*\", \"/etc/rc*.d/*\",\n \"/etc/crontab\", \"/etc/cron.*\", \"/etc/update-motd.d/*\", \"/usr/lib/update-notifier/*\",\n \"/boot/*\", \"/srv/*\", \"/run/*\", \"/root/*\", \"/etc/rc.local\"\n ) and destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\" ]\n[ process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and \n process.parent.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") ]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Antimalware Scan Interface DLL", + "description": "Identifies the creation of the Antimalware Scan Interface (AMSI) DLL in an unusual location. This may indicate an attempt to bypass AMSI by loading a rogue AMSI module instead of the legit one.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Antimalware Scan Interface DLL\n\nThe Windows Antimalware Scan Interface (AMSI) is a versatile interface standard that allows your applications and services to integrate with any antimalware product on a machine. AMSI integrates with multiple Windows components, ranging from User Account Control (UAC) to VBA macros and PowerShell.\n\nAttackers might copy a rogue AMSI DLL to an unusual location to prevent the process from loading the legitimate module, achieving a bypass to execute malicious code.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the process that created the DLL and which account was used.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the execution of scripts and macros after the registry modification.\n- Investigate other processes launched from the directory that the DLL was created.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe:\n - Observe and collect information about the following activities in the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n\n### False positive analysis\n\n- This modification should not happen legitimately. Any potential benign true positive (B-TP) should be mapped and monitored by the security team as these modifications expose the host to malware infections.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/S3cur3Th1sSh1t/Amsi-Bypass-Powershell" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + }, + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.001", + "name": "DLL Search Order Hijacking", + "reference": "https://attack.mitre.org/techniques/T1574/001/" + } + ] + } + ] + } + ], + "id": "d87bc7a0-2543-4b94-b247-96d8062db862", + "rule_id": "fa488440-04cc-41d7-9279-539387bf2a17", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.action != \"deletion\" and file.path != null and\n file.name : (\"amsi.dll\", \"amsi\") and not file.path : (\"?:\\\\Windows\\\\system32\\\\amsi.dll\", \"?:\\\\Windows\\\\Syswow64\\\\amsi.dll\", \"?:\\\\$WINDOWS.~BT\\\\NewOS\\\\Windows\\\\WinSXS\\\\*\", \"?:\\\\$WINDOWS.~BT\\\\NewOS\\\\Windows\\\\servicing\\\\LCU\\\\*\", \"?:\\\\$WINDOWS.~BT\\\\Work\\\\*\\\\*\", \"?:\\\\Windows\\\\SoftwareDistribution\\\\Download\\\\*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Network Connection via Registration Utility", + "description": "Identifies the native Windows tools regsvr32.exe, regsvr64.exe, RegSvcs.exe, or RegAsm.exe making a network connection. This may be indicative of an attacker bypassing allowlists or running arbitrary scripts via a signed Microsoft binary.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Network Connection via Registration Utility\n\nBy examining the specific traits of Windows binaries -- such as process trees, command lines, network connections, registry modifications, and so on -- it's possible to establish a baseline of normal activity. Deviations from this baseline can indicate malicious activity such as masquerading, and deserve further investigation.\n\nThis rule looks for the execution of `regsvr32.exe`, `RegAsm.exe`, or `RegSvcs.exe` utilities followed by a network connection to an external address. Attackers can abuse utilities to execute malicious files or masquerade as those utilities in order to bypass detections and evade defenses.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n - Investigate the file digital signature and process original filename, if suspicious, treat it as potential malware.\n- Investigate the target host that the signed binary is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of destination IP address and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Security testing may produce events like this. Activity of this kind performed by non-engineers and ordinary users is unusual." + ], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.009", + "name": "Regsvcs/Regasm", + "reference": "https://attack.mitre.org/techniques/T1218/009/" + }, + { + "id": "T1218.010", + "name": "Regsvr32", + "reference": "https://attack.mitre.org/techniques/T1218/010/" + } + ] + } + ] + } + ], + "id": "6304d664-792d-4be3-8d0f-88d9247df5d8", + "rule_id": "fb02b8d3-71ee-4af1-bacd-215d23f17efa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.token.integrity_level_name", + "type": "unknown", + "ecs": false + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.IntegrityLevel", + "type": "keyword", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"regsvr32.exe\", \"RegAsm.exe\", \"RegSvcs.exe\") and\n not (\n (?process.Ext.token.integrity_level_name : \"System\" or ?winlog.event_data.IntegrityLevel : \"System\") and\n (process.parent.name : \"msiexec.exe\" or process.parent.executable : (\"C:\\\\Program Files (x86)\\\\*.exe\", \"C:\\\\Program Files\\\\*.exe\"))\n )\n ]\n [network where host.os.type == \"windows\" and process.name : (\"regsvr32.exe\", \"RegAsm.exe\", \"RegSvcs.exe\") and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\") and network.protocol != \"dns\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Svchost spawning Cmd", + "description": "Identifies a suspicious parent child process relationship with cmd.exe descending from svchost.exe", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "timeline_id": "e70679c2-6cde-4510-9764-4823df18f7db", + "timeline_title": "Comprehensive Process Timeline", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Svchost spawning Cmd\n\nThe Service Host process (SvcHost) is a system process that can host one, or multiple, Windows services in the Windows NT family of operating systems. Note that `Svchost.exe` is reserved for use by the operating system and should not be used by non-Windows services.\n\nThis rule looks for the creation of the `cmd.exe` process with `svchost.exe` as its parent process. This is an unusual behavior that can indicate the masquerading of a malicious process as `svchost.exe` or exploitation for privilege escalation.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 207, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://nasbench.medium.com/demystifying-the-svchost-exe-process-and-its-command-line-options-508e9114e747" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "d2ff29df-7547-4be6-87a8-fa25ae374ce4", + "rule_id": "fd7a6052-58fa-4397-93c3-4795249ccfa2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name.caseless", + "type": "unknown", + "ecs": false + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "new_terms", + "query": "host.os.type:windows and event.category:process and event.type:start and process.parent.name:\"svchost.exe\" and \nprocess.name.caseless:\"cmd.exe\"\n", + "new_terms_fields": [ + "host.id", + "process.command_line", + "user.id" + ], + "history_window_start": "now-14d", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ], + "language": "kuery" + }, + { + "name": "Cron Job Created or Changed by Previously Unknown Process", + "description": "Linux cron jobs are scheduled tasks that can be leveraged by malicious actors for persistence, privilege escalation and command execution. By creating or modifying cron job configurations, attackers can execute malicious commands or scripts at predefined intervals, ensuring their continued presence and enabling unauthorized activities.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.003", + "name": "Cron", + "reference": "https://attack.mitre.org/techniques/T1053/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.003", + "name": "Cron", + "reference": "https://attack.mitre.org/techniques/T1053/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.003", + "name": "Cron", + "reference": "https://attack.mitre.org/techniques/T1053/003/" + } + ] + } + ] + } + ], + "id": "651d95d7-b334-4501-b27a-31f4fcee0002", + "rule_id": "ff10d4d8-fea7-422d-afb1-e5a2702369a9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "host.os.type : \"linux\" and event.action : (\"change\" or \"file_modify_event\" or \"creation\" or \"file_create_event\") and \nfile.path : (/etc/cron.allow or /etc/cron.deny or /etc/cron.d/* or /etc/cron.hourly/* or /etc/cron.daily/* or \n/etc/cron.weekly/* or /etc/cron.monthly/* or /etc/crontab or /usr/sbin/cron or /usr/sbin/anacron) \nand not (process.name : (\"dpkg\" or \"dockerd\" or \"rpm\" or \"snapd\" or \"yum\" or \"exe\" or \"dnf\" or \"5\") or \nfile.extension : (\"swp\" or \"swpx\"))\n", + "new_terms_fields": [ + "host.id", + "file.path", + "process.executable" + ], + "history_window_start": "now-10d", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "AWS Redshift Cluster Creation", + "description": "Identifies the creation of an Amazon Redshift cluster. Unexpected creation of this cluster by a non-administrative user may indicate a permission or role issue with current users. If unexpected, the resource may not properly be configured and could introduce security vulnerabilities.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Valid clusters may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Cluster creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateCluster.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "id": "1cf65ca0-9e98-40d4-837c-2fe1dc5684fa", + "rule_id": "015cca13-8832-49ac-a01b-a396114809f6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:redshift.amazonaws.com and event.action:CreateCluster and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential Network Scan Detected", + "description": "This rule identifies a potential port scan. A port scan is a method utilized by attackers to systematically scan a target system or network for open ports, allowing them to identify available services and potential vulnerabilities. By mapping out the open ports, attackers can gather critical information to plan and execute targeted attacks, gaining unauthorized access, compromising security, and potentially leading to data breaches, unauthorized control, or further exploitation of the targeted system or network. This rule proposes threshold logic to check for connection attempts from one source host to 20 or more destination ports.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Network", + "Tactic: Discovery", + "Tactic: Reconnaissance", + "Use Case: Network Security Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 5, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1046", + "name": "Network Service Discovery", + "reference": "https://attack.mitre.org/techniques/T1046/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0043", + "name": "Reconnaissance", + "reference": "https://attack.mitre.org/tactics/TA0043/" + }, + "technique": [ + { + "id": "T1595", + "name": "Active Scanning", + "reference": "https://attack.mitre.org/techniques/T1595/", + "subtechnique": [ + { + "id": "T1595.001", + "name": "Scanning IP Blocks", + "reference": "https://attack.mitre.org/techniques/T1595/001/" + } + ] + } + ] + } + ], + "id": "d5bb9994-9843-43f2-910e-37ac457fb8c7", + "rule_id": "0171f283-ade7-4f87-9521-ac346c68cc9b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "destination.port : * and event.action : \"network_flow\" and source.ip : (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n", + "threshold": { + "field": [ + "destination.ip", + "source.ip" + ], + "value": 1, + "cardinality": [ + { + "field": "destination.port", + "value": 250 + } + ] + }, + "index": [ + "logs-endpoint.events.network-*", + "logs-network_traffic.*", + "packetbeat-*", + "filebeat-*", + "auditbeat-*" + ], + "language": "kuery" + }, + { + "name": "Potential Credential Access via DuplicateHandle in LSASS", + "description": "Identifies suspicious access to an LSASS handle via DuplicateHandle from an unknown call trace module. This may indicate an attempt to bypass the NtOpenProcess API to evade detection and dump LSASS memory for credential access.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 206, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/CCob/MirrorDump" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "b853cc99-ba41-4990-86fe-3763b94a0c0c", + "rule_id": "02a4576a-7480-4284-9327-548a806b5e48", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.CallTrace", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.GrantedAccess", + "type": "keyword", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.code == \"10\" and\n\n /* LSASS requesting DuplicateHandle access right to another process */\n process.name : \"lsass.exe\" and winlog.event_data.GrantedAccess == \"0x40\" and\n\n /* call is coming from an unknown executable region */\n winlog.event_data.CallTrace : \"*UNKNOWN*\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Modification of OpenSSH Binaries", + "description": "Adversaries may modify SSH related binaries for persistence or credential access by patching sensitive functions to enable unauthorized access or by logging SSH credentials for exfiltration.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Persistence", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trusted OpenSSH executable updates. It's recommended to verify the integrity of OpenSSH binary changes." + ], + "references": [ + "https://blog.angelalonso.es/2016/09/anatomy-of-real-linux-intrusion-part-ii.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1556", + "name": "Modify Authentication Process", + "reference": "https://attack.mitre.org/techniques/T1556/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.004", + "name": "SSH", + "reference": "https://attack.mitre.org/techniques/T1021/004/" + } + ] + }, + { + "id": "T1563", + "name": "Remote Service Session Hijacking", + "reference": "https://attack.mitre.org/techniques/T1563/", + "subtechnique": [ + { + "id": "T1563.001", + "name": "SSH Hijacking", + "reference": "https://attack.mitre.org/techniques/T1563/001/" + } + ] + } + ] + } + ], + "id": "3289f22a-a614-42e6-9657-51bce6600285", + "rule_id": "0415f22a-2336-45fa-ba07-618a5942e22c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ], + "query": "event.category:file and host.os.type:linux and event.type:change and \n process.name:(* and not (dnf or dnf-automatic or dpkg or yum or rpm or yum-cron or anacron)) and \n (file.path:(/usr/bin/scp or \n /usr/bin/sftp or \n /usr/bin/ssh or \n /usr/sbin/sshd) or \n file.name:libkeyutils.so) and\n not process.executable:/usr/share/elasticsearch/*\n", + "language": "kuery" + }, + { + "name": "Potential DLL Side-Loading via Microsoft Antimalware Service Executable", + "description": "Identifies a Windows trusted program that is known to be vulnerable to DLL Search Order Hijacking starting after being renamed or from a non-standard path. This is uncommon behavior and may indicate an attempt to evade defenses via side-loading a malicious DLL within the memory space of one of those processes.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Dennis Perto" + ], + "false_positives": [ + "Microsoft Antimalware Service Executable installed on non default installation path." + ], + "references": [ + "https://news.sophos.com/en-us/2021/07/04/independence-day-revil-uses-supply-chain-exploit-to-attack-hundreds-of-businesses/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.002", + "name": "DLL Side-Loading", + "reference": "https://attack.mitre.org/techniques/T1574/002/" + } + ] + } + ] + } + ], + "id": "e1ea400d-63cf-4dd9-93b9-216343491c1d", + "rule_id": "053a0387-f3b5-4ba5-8245-8002cca2bd08", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (process.pe.original_file_name == \"MsMpEng.exe\" and not process.name : \"MsMpEng.exe\") or\n (process.name : \"MsMpEng.exe\" and not\n process.executable : (\"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files\\\\Microsoft Security Client\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Security Client\\\\*.exe\"))\n)\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Conhost Spawned By Suspicious Parent Process", + "description": "Detects when the Console Window Host (conhost.exe) process is spawned by a suspicious parent process, which could be indicative of code injection.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Conhost Spawned By Suspicious Parent Process\n\nThe Windows Console Host, or `conhost.exe`, is both the server application for all of the Windows Console APIs as well as the classic Windows user interface for working with command-line applications.\n\nAttackers often rely on custom shell implementations to avoid using built-in command interpreters like `cmd.exe` and `PowerShell.exe` and bypass application allowlisting and security features. Attackers commonly inject these implementations into legitimate system processes.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Retrieve the parent process executable and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- Suspicious Process from Conhost - 28896382-7d4f-4d50-9b72-67091901fd26\n- Suspicious PowerShell Engine ImageLoad - 852c1f19-68e8-43a6-9dce-340771fe1be3\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Defense Evasion", + "Tactic: Privilege Escalation", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.fireeye.com/blog/threat-research/2017/08/monitoring-windows-console-activity-part-one.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + } + ], + "id": "9dcb59e5-41a3-46a5-ad15-58af3af4794b", + "rule_id": "05b358de-aa6d-4f6c-89e6-78f74018b43b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"conhost.exe\" and\n process.parent.name : (\"lsass.exe\", \"services.exe\", \"smss.exe\", \"winlogon.exe\", \"explorer.exe\", \"dllhost.exe\", \"rundll32.exe\",\n \"regsvr32.exe\", \"userinit.exe\", \"wininit.exe\", \"spoolsv.exe\", \"ctfmon.exe\") and\n not (process.parent.name : \"rundll32.exe\" and\n process.parent.args : (\"?:\\\\Windows\\\\Installer\\\\MSI*.tmp,zzzzInvokeManagedCustomActionOutOfProc\",\n \"?:\\\\WINDOWS\\\\system32\\\\PcaSvc.dll,PcaPatchSdbTask\",\n \"?:\\\\WINDOWS\\\\system32\\\\davclnt.dll,DavSetCookie\"))\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Interactive Terminal Spawned via Perl", + "description": "Identifies when a terminal (tty) is spawned via Perl. Attackers may upgrade a simple reverse shell to a fully interactive tty after obtaining initial access to a host.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "83d1ddb5-688b-4b85-83f3-b990f714f8e4", + "rule_id": "05e5a668-7b51-4a67-93ab-e9af405c9ef3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ], + "query": "event.category:process and host.os.type:linux and event.type:(start or process_started) and process.name:perl and\n process.args:(\"exec \\\"/bin/sh\\\";\" or \"exec \\\"/bin/dash\\\";\" or \"exec \\\"/bin/bash\\\";\")\n", + "language": "kuery" + }, + { + "name": "System Time Discovery", + "description": "Detects the usage of commonly used system time discovery techniques, which attackers may use during the reconnaissance phase after compromising a system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend", + "Data Source: Elastic Endgame", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1124", + "name": "System Time Discovery", + "reference": "https://attack.mitre.org/techniques/T1124/" + } + ] + } + ], + "id": "7eb9b41c-6665-42d3-abad-1eaf52c9685c", + "rule_id": "06568a02-af29-4f20-929c-f3af281e41aa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n ((process.name: \"net.exe\" or (process.name : \"net1.exe\" and not process.parent.name : \"net.exe\")) and \n process.args : \"time\") or \n (process.name: \"w32tm.exe\" and process.args: \"/tz\") or \n (process.name: \"tzutil.exe\" and process.args: \"/g\")\n) and not user.id : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Enumerating Domain Trusts via DSQUERY.EXE", + "description": "Identifies the use of dsquery.exe for domain trust discovery purposes. Adversaries may use this command-line utility to enumerate trust relationships that may be used for Lateral Movement opportunities in Windows multi-domain forest environments.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Enumerating Domain Trusts via DSQUERY.EXE\n\nActive Directory (AD) domain trusts define relationships between domains within a Windows AD environment. In this setup, a \"trusting\" domain permits users from a \"trusted\" domain to access resources. These trust relationships can be configurable as one-way, two-way, transitive, or non-transitive, enabling controlled access and resource sharing across domains.\n\nThis rule identifies the usage of the `dsquery.exe` utility to enumerate domain trusts. Attackers can use this information to enable the next actions in a target environment, such as lateral movement.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation and are done within the user business context (e.g., an administrator in this context). As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Related rules\n\n- Enumerating Domain Trusts via NLTEST.EXE - 84da2554-e12a-11ec-b896-f661ea17fbcd\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Domain administrators may use this command-line utility for legitimate information gathering purposes." + ], + "references": [ + "https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc732952(v=ws.11)", + "https://posts.specterops.io/a-guide-to-attacking-domain-trusts-971e52cb2944" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1482", + "name": "Domain Trust Discovery", + "reference": "https://attack.mitre.org/techniques/T1482/" + }, + { + "id": "T1018", + "name": "Remote System Discovery", + "reference": "https://attack.mitre.org/techniques/T1018/" + } + ] + } + ], + "id": "462e6a72-b1cf-4804-9056-a4f49bb60b8d", + "rule_id": "06a7a03c-c735-47a6-a313-51c354aef6c3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"dsquery.exe\" or process.pe.original_file_name: \"dsquery.exe\") and \n process.args : \"*objectClass=trustedDomain*\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Evasion via Filter Manager", + "description": "The Filter Manager Control Program (fltMC.exe) binary may be abused by adversaries to unload a filter driver and evade defenses.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Evasion via Filter Manager\n\nA file system filter driver, or minifilter, is a specialized type of filter driver designed to intercept and modify I/O requests sent to a file system or another filter driver. Minifilters are used by a wide range of security software, including EDR, antivirus, backup agents, encryption products, etc.\n\nAttackers may try to unload minifilters to avoid protections such as malware detection, file system monitoring, and behavior-based detections.\n\nThis rule identifies the attempt to unload a minifilter using the `fltmc.exe` command-line utility, a tool used to manage and query the filter drivers loaded on Windows systems.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Examine the command line event to identify the target driver.\n - Identify the minifilter's role in the environment and if it is security-related. Microsoft provides a [list](https://learn.microsoft.com/en-us/windows-hardware/drivers/ifs/allocated-altitudes) of allocated altitudes that may provide more context, such as the manufacturer.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Observe and collect information about the following activities in the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and there are justifications for the action.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "d79f18b2-62e4-42a4-b518-91216979c476", + "rule_id": "06dceabf-adca-48af-ac79-ffdf4c3b1e9a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"fltMC.exe\" and process.args : \"unload\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Proc Pseudo File System Enumeration", + "description": "This rule monitors for a rapid enumeration of 25 different proc cmd, stat, and exe files, which suggests an abnormal activity pattern. Such behavior could be an indicator of a malicious process scanning or gathering information about running processes, potentially for reconnaissance, privilege escalation, or identifying vulnerable targets.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Setup\nThis rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system. \n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from. \n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /proc/ -p r -k audit_proc\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", + "building_block_type": "default", + "version": 4, + "tags": [ + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1057", + "name": "Process Discovery", + "reference": "https://attack.mitre.org/techniques/T1057/" + }, + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "af14ae14-1492-49cd-9a13-3cfcdb6be14e", + "rule_id": "0787daa6-f8c5-453b-a4ec-048037f6c1cd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.pid", + "type": "long", + "ecs": true + } + ], + "setup": "This rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system.\n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /proc/ -p r -k audit_proc\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", + "type": "threshold", + "query": "host.os.type:linux and event.category:file and event.action:\"opened-file\" and \nfile.path : (/proc/*/cmdline or /proc/*/stat or /proc/*/exe) and not process.name : (\n ps or netstat or landscape-sysin or w or pgrep or pidof or needrestart or apparmor_status\n) and not process.parent.pid : 1\n", + "threshold": { + "field": [ + "host.id", + "process.pid", + "process.name" + ], + "value": 1, + "cardinality": [ + { + "field": "file.path", + "value": 100 + } + ] + }, + "index": [ + "auditbeat-*", + "logs-auditd_manager.auditd-*" + ], + "language": "kuery" + }, + { + "name": "Local Account TokenFilter Policy Disabled", + "description": "Identifies registry modification to the LocalAccountTokenFilterPolicy policy. If this value exists (which doesn't by default) and is set to 1, then remote connections from all local members of Administrators are granted full high-integrity tokens during negotiation.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.stigviewer.com/stig/windows_server_2008_r2_member_server/2014-04-02/finding/V-36439", + "https://posts.specterops.io/pass-the-hash-is-dead-long-live-localaccounttokenfilterpolicy-506c25a7c167", + "https://www.welivesecurity.com/wp-content/uploads/2018/01/ESET_Turla_Mosquito.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + }, + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1550", + "name": "Use Alternate Authentication Material", + "reference": "https://attack.mitre.org/techniques/T1550/", + "subtechnique": [ + { + "id": "T1550.002", + "name": "Pass the Hash", + "reference": "https://attack.mitre.org/techniques/T1550/002/" + } + ] + } + ] + } + ], + "id": "736b7cc3-30d5-45b8-ac57-ad5b30504c99", + "rule_id": "07b1ef73-1fde-4a49-a34a-5dd40011b076", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\*\\\\LocalAccountTokenFilterPolicy\",\n \"\\\\REGISTRY\\\\MACHINE\\\\*\\\\LocalAccountTokenFilterPolicy\") and\n registry.data.strings : (\"1\", \"0x00000001\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Anomalous Windows Process Creation", + "description": "Identifies unusual parent-child process relationships that can indicate malware execution or persistence mechanisms. Malicious scripts often call on other applications and processes as part of their exploit payload. For example, when a malicious Office document runs scripts as part of an exploit payload, Excel or Word may start a script interpreter process, which, in turn, runs a script that downloads and executes malware. Another common scenario is Outlook running an unusual process when malware is downloaded in an email. Monitoring and identifying anomalous process relationships is a method of detecting new and emerging malware that is not yet recognized by anti-virus scanners.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Anomalous Windows Process Creation\n\nSearching for abnormal Windows processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.\n\nThis rule uses a machine learning job to detect an anomalous Windows process with an unusual parent-child relationship, which could indicate malware execution or persistence activities on the host machine.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.\n - Investigate the process metadata — such as the digital signature, directory, etc. — to obtain more context that can indicate whether the executable is associated with an expected software vendor or package.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.\n- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Retrieve Service Unisgned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Related Rules\n\n- Unusual Process For a Windows Host - 6d448b96-c922-4adb-b51c-b767f1ea5b76\n- Unusual Windows Path Activity - 445a342e-03fb-42d0-8656-0367eb2dead5\n- Unusual Windows Process Calling the Metadata Service - abae61a8-c560-4dbd-acca-1e1438bff36b\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Users running scripts in the course of technical support operations of software upgrades could trigger this alert. A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/" + } + ] + } + ], + "id": "9d8e27a9-bfce-4cda-a3c2-43e5f398234b", + "rule_id": "0b29cab4-dbbd-4a3f-9e8e-1287c7c11ae5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_windows_anomalous_process_creation" + ] + }, + { + "name": "Nping Process Activity", + "description": "Nping ran on a Linux host. Nping is part of the Nmap tool suite and has the ability to construct raw packets for a wide variety of security testing applications, including denial of service testing.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Some normal use of this command may originate from security engineers and network or server administrators, but this is usually not routine or unannounced. Use of `Nping` by non-engineers or ordinary users is uncommon." + ], + "references": [ + "https://en.wikipedia.org/wiki/Nmap" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1046", + "name": "Network Service Discovery", + "reference": "https://attack.mitre.org/techniques/T1046/" + } + ] + } + ], + "id": "4a319643-a92a-4089-98c5-a692d7099449", + "rule_id": "0d69150b-96f8-467c-a86d-a67a3378ce77", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and process.name == \"nping\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Execution of File Written or Modified by Microsoft Office", + "description": "Identifies an executable created by a Microsoft Office application and subsequently executed. These processes are often launched via scripts inside documents or during exploitation of Microsoft Office applications.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Execution of File Written or Modified by Microsoft Office\n\nMicrosoft Office is a suite of applications designed to help with productivity and completing common tasks on a computer. You can create and edit documents containing text and images, work with data in spreadsheets and databases, and create presentations and posters. As it is some of the most-used software across companies, MS Office is frequently targeted for initial access. It also has a wide variety of capabilities that attackers can take advantage of.\n\nThis rule searches for executable files written by MS Office applications executed in sequence. This is most likely the result of the execution of malicious documents or exploitation for initial access or privilege escalation. This rule can also detect suspicious processes masquerading as the MS Office applications.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve MS Office documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-120m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + }, + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + } + ], + "id": "313ce46c-5f84-4db8-9660-bcf2d25fa9fb", + "rule_id": "0d8ad79f-9025-45d8-80c1-4f0cd3c5e8e5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=2h\n [file where host.os.type == \"windows\" and event.type != \"deletion\" and file.extension : \"exe\" and\n (process.name : \"WINWORD.EXE\" or\n process.name : \"EXCEL.EXE\" or\n process.name : \"OUTLOOK.EXE\" or\n process.name : \"POWERPNT.EXE\" or\n process.name : \"eqnedt32.exe\" or\n process.name : \"fltldr.exe\" or\n process.name : \"MSPUB.EXE\" or\n process.name : \"MSACCESS.EXE\")\n ] by host.id, file.path\n [process where host.os.type == \"windows\" and event.type == \"start\" and \n not (process.name : \"NewOutlookInstaller.exe\" and process.code_signature.subject_name : \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ] by host.id, process.executable\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "MsBuild Making Network Connections", + "description": "Identifies MsBuild.exe making outbound network connections. This may indicate adversarial activity as MsBuild is often leveraged by adversaries to execute code and evade detection.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating MsBuild Making Network Connections\n\nBy examining the specific traits of Windows binaries (such as process trees, command lines, network connections, registry modifications, and so on) it's possible to establish a baseline of normal activity. Deviations from this baseline can indicate malicious activity, such as masquerading and deserve further investigation.\n\nThe Microsoft Build Engine, also known as MSBuild, is a platform for building applications. This engine provides an XML schema for a project file that controls how the build platform processes and builds software, and can be abused to proxy code execution.\n\nThis rule looks for the `Msbuild.exe` utility execution, followed by a network connection to an external address. Attackers can abuse MsBuild to execute malicious files or masquerade as those utilities in order to bypass detections and evade defenses.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n - Investigate the file digital signature and process original filename, if suspicious, treat it as potential malware.\n- Investigate the target host that the signed binary is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of destination IP address and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] + } + ] + } + ], + "id": "543a7be3-a7cd-4cd4-bf67-e9f4cbeed98d", + "rule_id": "0e79980b-4250-4a50-a509-69294c14e84b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"MSBuild.exe\" and event.type == \"start\"]\n [network where host.os.type == \"windows\" and process.name : \"MSBuild.exe\" and\n not cidrmatch(destination.ip, \"127.0.0.1\", \"::1\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Potential LSASS Memory Dump via PssCaptureSnapShot", + "description": "Identifies suspicious access to an LSASS handle via PssCaptureSnapShot where two successive process accesses are performed by the same process and target two different instances of LSASS. This may indicate an attempt to evade detection and dump LSASS memory for credential access.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 206, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.matteomalvica.com/blog/2019/12/02/win-defender-atp-cred-bypass/", + "https://twitter.com/sbousseaden/status/1280619931516747777?lang=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "d418e099-15b4-4b51-bbd6-d9e60d6d3eed", + "rule_id": "0f93cb9a-1931-48c2-8cd0-f173fd3e5283", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.TargetImage", + "type": "keyword", + "ecs": false + } + ], + "setup": "This is meant to run only on datasources using Elastic Agent 7.14+ since versions prior to that will be missing the threshold\nrule cardinality feature.", + "type": "threshold", + "query": "event.category:process and host.os.type:windows and event.code:10 and\n winlog.event_data.TargetImage:(\"C:\\\\Windows\\\\system32\\\\lsass.exe\" or\n \"c:\\\\Windows\\\\system32\\\\lsass.exe\" or\n \"c:\\\\Windows\\\\System32\\\\lsass.exe\")\n", + "threshold": { + "field": [ + "process.entity_id" + ], + "value": 2, + "cardinality": [ + { + "field": "winlog.event_data.TargetProcessId", + "value": 2 + } + ] + }, + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "language": "kuery" + }, + { + "name": "AWS RDS Snapshot Export", + "description": "Identifies the export of an Amazon Relational Database Service (RDS) Aurora database snapshot.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Exporting snapshots may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Snapshot exports from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_StartExportTask.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [] + } + ], + "id": "7848be55-3bb3-4db2-920b-d1260908f250", + "rule_id": "119c8877-8613-416d-a98a-96b6664ee73a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:StartExportTask and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "AWS Route 53 Domain Transfer Lock Disabled", + "description": "Identifies when a transfer lock was removed from a Route 53 domain. It is recommended to refrain from performing this action unless intending to transfer the domain to a different registrar.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "A domain transfer lock may be disabled by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Activity from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/Route53/latest/APIReference/API_Operations_Amazon_Route_53.html", + "https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_DisableDomainTransferLock.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [] + } + ], + "id": "ee2bb706-2f3b-4c81-a26f-bf4911a14ec3", + "rule_id": "12051077-0124-4394-9522-8f4f4db1d674", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:route53.amazonaws.com and event.action:DisableDomainTransferLock and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Suspicious Lsass Process Access", + "description": "Identifies access attempts to LSASS handle, this may indicate an attempt to dump credentials from Lsass memory.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Setup", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.001/T1003.001.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "a162221f-7589-4b50-9ca1-b64b27753825", + "rule_id": "128468bf-cab1-4637-99ea-fdf3780a4609", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.CallTrace", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.GrantedAccess", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetImage", + "type": "keyword", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.code == \"10\" and\n winlog.event_data.TargetImage : \"?:\\\\WINDOWS\\\\system32\\\\lsass.exe\" and\n not winlog.event_data.GrantedAccess :\n (\"0x1000\", \"0x1400\", \"0x101400\", \"0x101000\", \"0x101001\", \"0x100000\", \"0x100040\", \"0x3200\", \"0x40\", \"0x3200\") and\n not process.name : (\"procexp64.exe\", \"procmon.exe\", \"procexp.exe\", \"Microsoft.Identity.AadConnect.Health.AadSync.Host.ex\") and\n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\lsm.exe\",\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\CCM\\\\CcmExec.exe\",\n \"?:\\\\Windows\\\\system32\\\\csrss.exe\",\n \"?:\\\\Windows\\\\system32\\\\wininit.exe\",\n \"?:\\\\Windows\\\\system32\\\\wbem\\\\wmiprvse.exe\",\n \"?:\\\\Windows\\\\system32\\\\MRT.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\platform\\\\*\",\n \"?:\\\\ProgramData\\\\WebEx\\\\webex\\\\*\",\n \"?:\\\\Windows\\\\LTSvc\\\\LTSVC.exe\") and\n not winlog.event_data.CallTrace : (\"*mpengine.dll*\", \"*appresolver.dll*\", \"*sysmain.dll*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Suspicious Cmd Execution via WMI", + "description": "Identifies suspicious command execution (cmd) via Windows Management Instrumentation (WMI) on a remote host. This could be indicative of adversary lateral movement.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + }, + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + } + ], + "id": "c88de52c-ef4c-4f69-9036-d1545bf3d28e", + "rule_id": "12f07955-1674-44f7-86b5-c35da0a6f41a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"WmiPrvSE.exe\" and process.name : \"cmd.exe\" and\n process.args : \"\\\\\\\\127.0.0.1\\\\*\" and process.args : (\"2>&1\", \"1>\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "RPC (Remote Procedure Call) from the Internet", + "description": "This rule detects network events that may indicate the use of RPC traffic from the Internet. RPC is commonly used by system administrators to remotely control a system for maintenance or to use shared resources. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Tactic: Initial Access", + "Domain: Endpoint", + "Use Case: Threat Detection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + } + ], + "id": "c9cfe092-223b-43e9-967c-2ee0271a7d12", + "rule_id": "143cb236-0956-4f42-a706-814bcaa0cf5a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and (destination.port:135 or event.dataset:zeek.dce_rpc) and\n not source.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n ) and\n destination.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n )\n", + "language": "kuery" + }, + { + "name": "Potential Persistence via Time Provider Modification", + "description": "Identifies modification of the Time Provider. Adversaries may establish persistence by registering and enabling a malicious DLL as a time provider. Windows uses the time provider architecture to obtain accurate time stamps from other network devices or clients in the network. Time providers are implemented in the form of a DLL file which resides in the System32 folder. The service W32Time initiates during the startup of Windows and loads w32time.dll.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://pentestlab.blog/2019/10/22/persistence-time-providers/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.003", + "name": "Time Providers", + "reference": "https://attack.mitre.org/techniques/T1547/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.003", + "name": "Time Providers", + "reference": "https://attack.mitre.org/techniques/T1547/003/" + } + ] + } + ] + } + ], + "id": "2343cbee-b044-4c85-85bf-e504fdd54557", + "rule_id": "14ed1aa9-ebfd-4cf9-a463-0ac59ec55204", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type:\"change\" and\n registry.path: (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\W32Time\\\\TimeProviders\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\W32Time\\\\TimeProviders\\\\*\"\n ) and\n registry.data.strings:\"*.dll\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Scheduled Task Execution at Scale via GPO", + "description": "Detects the modification of Group Policy Object attributes to execute a scheduled task in the objects controlled by the GPO.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Scheduled Task Execution at Scale via GPO\n\nGroup Policy Objects (GPOs) can be used by attackers to execute scheduled tasks at scale to compromise objects controlled by a given GPO. This is done by changing the contents of the `\\Machine\\Preferences\\ScheduledTasks\\ScheduledTasks.xml` file.\n\n#### Possible investigation steps\n\n- This attack abuses a legitimate mechanism of Active Directory, so it is important to determine whether the activity is legitimate and the administrator is authorized to perform this operation.\n- Retrieve the contents of the `ScheduledTasks.xml` file, and check the `` and `` XML tags for any potentially malicious commands or binaries.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Scope which objects may be compromised by retrieving information about which objects are controlled by the GPO.\n\n### False positive analysis\n\n- Verify if the execution is allowed and done under change management, and if the execution is legitimate.\n\n### Related rules\n\n- Group Policy Abuse for Privilege Addition - b9554892-5e0e-424b-83a0-5aef95aa43bf\n- Startup/Logon Script added to Group Policy Object - 16fac1a1-21ee-4ca6-b720-458e3855d046\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- The investigation and containment must be performed in every computer controlled by the GPO, where necessary.\n- Remove the script from the GPO.\n- Check if other GPOs have suspicious scheduled tasks attached.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Lateral Movement", + "Data Source: Active Directory", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0025_windows_audit_directory_service_changes.md", + "https://github.com/atc-project/atc-data/blob/f2bbb51ecf68e2c9f488e3c70dcdd3df51d2a46b/docs/Logging_Policies/LP_0029_windows_audit_detailed_file_share.md", + "https://labs.f-secure.com/tools/sharpgpoabuse", + "https://twitter.com/menasec1/status/1106899890377052160", + "https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_gpo_scheduledtasks.yml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + }, + { + "id": "T1484", + "name": "Domain Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1484/", + "subtechnique": [ + { + "id": "T1484.001", + "name": "Group Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1484/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1570", + "name": "Lateral Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1570/" + } + ] + } + ], + "id": "d1f3516b-1399-4f2a-847c-279105dbf87a", + "rule_id": "15a8ba77-1c13-4274-88fe-6bd14133861e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "message", + "type": "match_only_text", + "ecs": true + }, + { + "name": "winlog.event_data.AccessList", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.AttributeLDAPDisplayName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.AttributeValue", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.RelativeTargetName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.ShareName", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'Audit Detailed File Share' audit policy must be configured (Success Failure).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nObject Access >\nAudit Detailed File Share (Success,Failure)\n```\n\nThe 'Audit Directory Service Changes' audit policy must be configured (Success Failure).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "(event.code: \"5136\" and winlog.event_data.AttributeLDAPDisplayName:(\"gPCMachineExtensionNames\" or \"gPCUserExtensionNames\") and\n winlog.event_data.AttributeValue:(*CAB54552-DEEA-4691-817E-ED4A4D1AFC72* and *AADCED64-746C-4633-A97C-D61349046527*))\nor\n(event.code: \"5145\" and winlog.event_data.ShareName: \"\\\\\\\\*\\\\SYSVOL\" and winlog.event_data.RelativeTargetName: *ScheduledTasks.xml and\n (message: WriteData or winlog.event_data.AccessList: *%%4417*))\n", + "language": "kuery" + }, + { + "name": "Remote File Download via Desktopimgdownldr Utility", + "description": "Identifies the desktopimgdownldr utility being used to download a remote file. An adversary may use desktopimgdownldr to download arbitrary files as an alternative to certutil.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remote File Download via Desktopimgdownldr Utility\n\nAttackers commonly transfer tooling or malware from external systems into a compromised environment using the command and control channel. However, they can also abuse signed utilities to drop these files.\n\nThe `Desktopimgdownldr.exe` utility is used to to configure lockscreen/desktop image, and can be abused with the `lockscreenurl` argument to download remote files and tools, this rule looks for this behavior.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Check the reputation of the domain or IP address used to host the downloaded file or if the user downloaded the file from an internal system.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unusual but can be done by administrators. Benign true positives (B-TPs) can be added as exceptions if necessary.\n- Analysts can dismiss the alert if the downloaded file is a legitimate image.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://labs.sentinelone.com/living-off-windows-land-a-new-native-file-downldr/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + } + ], + "id": "ac92c806-dcb3-483f-94d1-55f4afc47177", + "rule_id": "15c0b7a7-9c34-4869-b25b-fa6518414899", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"desktopimgdownldr.exe\" or process.pe.original_file_name == \"desktopimgdownldr.exe\") and\n process.args : \"/lockscreenurl:http*\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS IAM Group Creation", + "description": "Identifies the creation of a group in AWS Identity and Access Management (IAM). Groups specify permissions for multiple users. Any user in a group automatically has the permissions that are assigned to the group.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Group creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/create-group.html", + "https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateGroup.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.003", + "name": "Cloud Account", + "reference": "https://attack.mitre.org/techniques/T1136/003/" + } + ] + } + ] + } + ], + "id": "5f985014-9eaf-432e-a598-93a3ed349919", + "rule_id": "169f3a93-efc7-4df2-94d6-0d9438c310d1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:CreateGroup and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Renamed Utility Executed with Short Program Name", + "description": "Identifies the execution of a process with a single character process name, differing from the original file name. This is often done by adversaries while staging, executing temporary utilities, or trying to bypass security detections based on the process name.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Renamed Utility Executed with Short Program Name\n\nIdentifies the execution of a process with a single character process name, differing from the original file name. This is often done by adversaries while staging, executing temporary utilities, or trying to bypass security detections based on the process name.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, command line and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.003", + "name": "Rename System Utilities", + "reference": "https://attack.mitre.org/techniques/T1036/003/" + } + ] + } + ] + } + ], + "id": "445d780e-49e4-4186-92f3-48c813a75ce4", + "rule_id": "17c7f6a5-5bc9-4e1f-92bf-13632d24384d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and length(process.name) > 0 and\n length(process.name) == 5 and length(process.pe.original_file_name) > 5\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS CloudTrail Log Suspended", + "description": "Identifies suspending the recording of AWS API calls and log file delivery for the specified trail. An adversary may suspend trails in an attempt to evade defenses.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS CloudTrail Log Suspended\n\nAmazon CloudTrail is a service that enables governance, compliance, operational auditing, and risk auditing of your Amazon Web Services account. With CloudTrail, you can log, continuously monitor, and retain account activity related to actions across your Amazon Web Services infrastructure. CloudTrail provides event history of your Amazon Web Services account activity, including actions taken through the Amazon Management Console, Amazon SDKs, command line tools, and other Amazon Web Services services. This event history simplifies security analysis, resource change tracking, and troubleshooting.\n\nThis rule identifies the suspension of an AWS log trail using the API `StopLogging` action. Attackers can do this to cover their tracks and impact security monitoring that relies on this source.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Investigate the deleted log trail's criticality and whether the responsible team is aware of the deletion.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Log Auditing", + "Resources: Investigation Guide", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Suspending the recording of a trail may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Trail suspensions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_StopLogging.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/stop-logging.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "29799629-08cc-4c05-99cd-16f38adddf5f", + "rule_id": "1aa8fa52-44a7-4dae-b058-f3333b91c8d7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:StopLogging and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Connection to Internal Network via Telnet", + "description": "Telnet provides a command line interface for communication with a remote device or server. This rule identifies Telnet network connections to non-publicly routable IP addresses.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Telnet can be used for both benign or malicious purposes. Telnet is included by default in some Linux distributions, so its presence is not inherently suspicious. The use of Telnet to manage devices remotely has declined in recent years in favor of more secure protocols such as SSH. Telnet usage by non-automated tools or frameworks may be suspicious." + ], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + } + ], + "id": "2f7b550c-d85a-4c55-9cf5-165673e3d47b", + "rule_id": "1b21abcc-4d9f-4b08-a7f5-316f5f94b973", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"linux\" and process.name == \"telnet\" and event.type == \"start\"]\n [network where host.os.type == \"linux\" and process.name == \"telnet\" and\n cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\",\n \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\",\n \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "AWS ElastiCache Security Group Modified or Deleted", + "description": "Identifies when an ElastiCache security group has been modified or deleted.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "A ElastiCache security group deletion may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security Group deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/Welcome.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "54b7d487-ca03-42bb-8746-4a4f41d15dd8", + "rule_id": "1ba5160d-f5a2-4624-b0ff-6a1dc55d2516", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:elasticache.amazonaws.com and event.action:(\"Delete Cache Security Group\" or\n\"Authorize Cache Security Group Ingress\" or \"Revoke Cache Security Group Ingress\" or \"AuthorizeCacheSecurityGroupEgress\" or\n\"RevokeCacheSecurityGroupEgress\") and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Incoming Execution via WinRM Remote Shell", + "description": "Identifies remote execution via Windows Remote Management (WinRM) remote shell on a target host. This could be an indication of lateral movement.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "WinRM is a dual-use protocol that can be used for benign or malicious activity. It's important to baseline your environment to determine the amount of noise to expect from this tool." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.006", + "name": "Windows Remote Management", + "reference": "https://attack.mitre.org/techniques/T1021/006/" + } + ] + } + ] + } + ], + "id": "0341afc4-892d-4d40-bb5b-da696dd5a1de", + "rule_id": "1cd01db9-be24-4bef-8e7c-e923f0ff78ab", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=30s\n [network where host.os.type == \"windows\" and process.pid == 4 and network.direction : (\"incoming\", \"ingress\") and\n destination.port in (5985, 5986) and network.protocol == \"http\" and source.ip != \"127.0.0.1\" and source.ip != \"::1\"]\n [process where host.os.type == \"windows\" and \n event.type == \"start\" and process.parent.name : \"winrshost.exe\" and not process.executable : \"?:\\\\Windows\\\\System32\\\\conhost.exe\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "External IP Lookup from Non-Browser Process", + "description": "Identifies domains commonly used by adversaries for post-exploitation IP lookups. It is common for adversaries to test for Internet access and acquire their external IP address after they have gained access to a system. Among others, this has been observed in campaigns leveraging the information stealer, Trickbot.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating External IP Lookup from Non-Browser Process\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for connections to known IP lookup services through non-browser processes or non-installed programs. Using only the IP address of the compromised system, attackers can obtain valuable information such as the system's geographic location, the company that owns the IP, whether the system is cloud-hosted, and more.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Use the data collected through the analysis to investigate other machines affected in the environment.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "building_block_type": "default", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Resources: Investigation Guide", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "If the domains listed in this rule are used as part of an authorized workflow, this rule will be triggered by those events. Validate that this is expected activity and tune the rule to fit your environment variables." + ], + "references": [ + "https://community.jisc.ac.uk/blogs/csirt/article/trickbot-analysis-and-mitigation", + "https://www.cybereason.com/blog/dropping-anchor-from-a-trickbot-infection-to-the-discovery-of-the-anchor-malware" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1016", + "name": "System Network Configuration Discovery", + "reference": "https://attack.mitre.org/techniques/T1016/", + "subtechnique": [ + { + "id": "T1016.001", + "name": "Internet Connection Discovery", + "reference": "https://attack.mitre.org/techniques/T1016/001/" + } + ] + }, + { + "id": "T1614", + "name": "System Location Discovery", + "reference": "https://attack.mitre.org/techniques/T1614/" + } + ] + } + ], + "id": "2fb10292-a5f9-4ca0-9be3-b3ddecb0fa99", + "rule_id": "1d72d014-e2ab-4707-b056-9b96abe7b511", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dns.question.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "network where host.os.type == \"windows\" and network.protocol == \"dns\" and\n process.name != null and user.id not in (\"S-1-5-19\", \"S-1-5-20\") and\n event.action == \"lookup_requested\" and\n /* Add new external IP lookup services here */\n dns.question.name :\n (\n \"*api.ipify.org\",\n \"*freegeoip.app\",\n \"*checkip.amazonaws.com\",\n \"*checkip.dyndns.org\",\n \"*freegeoip.app\",\n \"*icanhazip.com\",\n \"*ifconfig.*\",\n \"*ipecho.net\",\n \"*ipgeoapi.com\",\n \"*ipinfo.io\",\n \"*ip.anysrc.net\",\n \"*myexternalip.com\",\n \"*myipaddress.com\",\n \"*showipaddress.com\",\n \"*whatismyipaddress.com\",\n \"*wtfismyip.com\",\n \"*ipapi.co\",\n \"*ip-lookup.net\",\n \"*ipstack.com\"\n ) and\n /* Insert noisy false positives here */\n not process.executable :\n (\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\WWAHost.exe\",\n \"?:\\\\Windows\\\\System32\\\\smartscreen.exe\",\n \"?:\\\\Windows\\\\System32\\\\MicrosoftEdgeCP.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\*\\\\MsMpEng.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Programs\\\\Fiddler\\\\Fiddler.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\Code.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\OneDrive.exe\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "PowerShell Script with Encryption/Decryption Capabilities", + "description": "Identifies the use of Cmdlets and methods related to encryption/decryption of files in PowerShell scripts, which malware and offensive security tools can abuse to encrypt data or decrypt payloads to bypass security solutions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Script with Encryption/Decryption Capabilities\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks, making it available for use in various environments, creating an attractive way for attackers to execute code.\n\nPowerShell offers encryption and decryption functionalities that attackers can abuse for various purposes, such as concealing payloads, C2 communications, and encrypting data as part of ransomware operations.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n\n### False positive analysis\n\n- This is a dual-use mechanism, meaning its usage is not inherently malicious. Analysts can dismiss the alert if the script doesn't contain malicious functions or potential for abuse, no other suspicious activity was identified, and there are justifications for the execution.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: PowerShell Logs", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate PowerShell Scripts which makes use of encryption." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1027", + "name": "Obfuscated Files or Information", + "reference": "https://attack.mitre.org/techniques/T1027/" + }, + { + "id": "T1140", + "name": "Deobfuscate/Decode Files or Information", + "reference": "https://attack.mitre.org/techniques/T1140/" + } + ] + } + ], + "id": "218809ed-3c95-47fd-9513-b63e742bcb92", + "rule_id": "1d9aeb0b-9549-46f6-a32d-05e2a001b7fd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n (\n \"Cryptography.AESManaged\" or\n \"Cryptography.RijndaelManaged\" or\n \"Cryptography.SHA1Managed\" or\n \"Cryptography.SHA256Managed\" or\n \"Cryptography.SHA384Managed\" or\n \"Cryptography.SHA512Managed\" or\n \"Cryptography.SymmetricAlgorithm\" or\n \"PasswordDeriveBytes\" or\n \"Rfc2898DeriveBytes\"\n ) and\n (\n CipherMode and PaddingMode\n ) and\n (\n \".CreateEncryptor\" or\n \".CreateDecryptor\"\n )\n ) and not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "UAC Bypass via DiskCleanup Scheduled Task Hijack", + "description": "Identifies User Account Control (UAC) bypass via hijacking DiskCleanup Scheduled Task. Attackers bypass UAC to stealthily execute code with elevated permissions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "a356fa74-df16-4bab-99fd-2210cea096eb", + "rule_id": "1dcc51f6-ba26-49e7-9ef4-2655abb2361e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.args : \"/autoclean\" and process.args : \"/d\" and\n not process.executable : (\"C:\\\\Windows\\\\System32\\\\cleanmgr.exe\",\n \"C:\\\\Windows\\\\SysWOW64\\\\cleanmgr.exe\",\n \"C:\\\\Windows\\\\System32\\\\taskhostw.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious .NET Code Compilation", + "description": "Identifies executions of .NET compilers with suspicious parent processes, which can indicate an attacker's attempt to compile code after delivery in order to bypass security mechanisms.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1027", + "name": "Obfuscated Files or Information", + "reference": "https://attack.mitre.org/techniques/T1027/", + "subtechnique": [ + { + "id": "T1027.004", + "name": "Compile After Delivery", + "reference": "https://attack.mitre.org/techniques/T1027/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.005", + "name": "Visual Basic", + "reference": "https://attack.mitre.org/techniques/T1059/005/" + } + ] + } + ] + } + ], + "id": "2c6a2b52-1967-4e3e-8a53-06d39a80bf3f", + "rule_id": "201200f1-a99b-43fb-88ed-f65a45c4972c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"csc.exe\", \"vbc.exe\") and\n process.parent.name : (\"wscript.exe\", \"mshta.exe\", \"cscript.exe\", \"wmic.exe\", \"svchost.exe\", \"rundll32.exe\", \"cmstp.exe\", \"regsvr32.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS Route 53 Domain Transferred to Another Account", + "description": "Identifies when a request has been made to transfer a Route 53 domain to another AWS account.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "A domain may be transferred to another AWS account by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Domain transfers from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/Route53/latest/APIReference/API_Operations_Amazon_Route_53.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [] + } + ], + "id": "175cfaac-bcc7-48fb-8a29-01bcd5c69c8f", + "rule_id": "2045567e-b0af-444a-8c0b-0b6e2dae9e13", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:route53.amazonaws.com and event.action:TransferDomainToAnotherAwsAccount and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "LSASS Memory Dump Handle Access", + "description": "Identifies handle requests for the Local Security Authority Subsystem Service (LSASS) object access with specific access masks that many tools with a capability to dump memory to disk use (0x1fffff, 0x1010, 0x120089). This rule is tool agnostic as it has been validated against a host of various LSASS dump tools such as SharpDump, Procdump, Mimikatz, Comsvcs etc. It detects this behavior at a low level and does not depend on a specific tool or dump file name.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating LSASS Memory Dump Handle Access\n\nLocal Security Authority Server Service (LSASS) is a process in Microsoft Windows operating systems that is responsible for enforcing security policy on the system. It verifies users logging on to a Windows computer or server, handles password changes, and creates access tokens.\n\nAdversaries may attempt to access credential material stored in LSASS process memory. After a user logs on, the system generates and stores a variety of credential materials in LSASS process memory. This is meant to facilitate single sign-on (SSO) ensuring a user isn’t prompted each time resource access is requested. These credential materials can be harvested by an adversary using administrative user or SYSTEM privileges to conduct lateral movement using [alternate authentication material](https://attack.mitre.org/techniques/T1550/).\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- There should be very few or no false positives for this rule. If this activity is expected or noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n- If the process is related to antivirus or endpoint detection and response solutions, validate that it is installed on the correct path and signed with the company's valid digital signature.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Scope compromised credentials and disable the accounts.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nEnsure advanced audit policies for Windows are enabled, specifically:\nObject Access policies [Event ID 4656](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4656) (Handle to an Object was Requested)\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nSystem Audit Policies >\nObject Access >\nAudit File System (Success,Failure)\nAudit Handle Manipulation (Success,Failure)\n```\n\nAlso, this event generates only if the object’s [SACL](https://docs.microsoft.com/en-us/windows/win32/secauthz/access-control-lists) has the required access control entry (ACE) to handle the use of specific access rights.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4656", + "https://twitter.com/jsecurity101/status/1227987828534956033?s=20", + "https://attack.mitre.org/techniques/T1003/001/", + "https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-170105221010.html", + "http://findingbad.blogspot.com/2017/", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "d38196f1-9394-431b-84ce-6cfdf55411aa", + "rule_id": "208dbe77-01ed-4954-8d44-1e5751cb20de", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.AccessMask", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.AccessMaskDescription", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.ObjectName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.ProcessName", + "type": "keyword", + "ecs": false + } + ], + "setup": "Ensure advanced audit policies for Windows are enabled, specifically:\nObject Access policies Event ID 4656 (Handle to an Object was Requested)\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nSystem Audit Policies >\nObject Access >\nAudit File System (Success,Failure)\nAudit Handle Manipulation (Success,Failure)\n```\n\nAlso, this event generates only if the object’s SACL has the required access control entry (ACE) to handle the use of specific access rights.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "any where event.action == \"File System\" and event.code == \"4656\" and\n\n winlog.event_data.ObjectName : (\n \"?:\\\\Windows\\\\System32\\\\lsass.exe\",\n \"\\\\Device\\\\HarddiskVolume?\\\\Windows\\\\System32\\\\lsass.exe\",\n \"\\\\Device\\\\HarddiskVolume??\\\\Windows\\\\System32\\\\lsass.exe\") and\n\n /* The right to perform an operation controlled by an extended access right. */\n\n (winlog.event_data.AccessMask : (\"0x1fffff\" , \"0x1010\", \"0x120089\", \"0x1F3FFF\") or\n winlog.event_data.AccessMaskDescription : (\"READ_CONTROL\", \"Read from process memory\"))\n\n /* Common Noisy False Positives */\n\n and not winlog.event_data.ProcessName : (\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\system32\\\\wbem\\\\WmiPrvSE.exe\",\n \"?:\\\\Windows\\\\System32\\\\dllhost.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Windows\\\\explorer.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "SSH Authorized Keys File Modification", + "description": "The Secure Shell (SSH) authorized_keys file specifies which users are allowed to log into a server using public key authentication. Adversaries may modify it to maintain persistence on a victim host by adding their own public key(s).", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 204, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.004", + "name": "SSH Authorized Keys", + "reference": "https://attack.mitre.org/techniques/T1098/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1563", + "name": "Remote Service Session Hijacking", + "reference": "https://attack.mitre.org/techniques/T1563/", + "subtechnique": [ + { + "id": "T1563.001", + "name": "SSH Hijacking", + "reference": "https://attack.mitre.org/techniques/T1563/001/" + } + ] + }, + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.004", + "name": "SSH", + "reference": "https://attack.mitre.org/techniques/T1021/004/" + } + ] + } + ] + } + ], + "id": "34002828-d58f-4f18-adf7-0c244a3a53b1", + "rule_id": "2215b8bd-1759-4ffa-8ab8-55c8e6b32e7f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "new_terms", + "query": "event.category:file and event.type:(change or creation) and\n file.name:(\"authorized_keys\" or \"authorized_keys2\" or \"/etc/ssh/sshd_config\" or \"/root/.ssh\") and\n not process.executable:\n (/Library/Developer/CommandLineTools/usr/bin/git or\n /usr/local/Cellar/maven/*/libexec/bin/mvn or\n /Library/Java/JavaVirtualMachines/jdk*.jdk/Contents/Home/bin/java or\n /usr/bin/vim or\n /usr/local/Cellar/coreutils/*/bin/gcat or\n /usr/bin/bsdtar or\n /usr/bin/nautilus or\n /usr/bin/scp or\n /usr/bin/touch or\n /var/lib/docker/* or\n /usr/bin/google_guest_agent or \n /opt/jc/bin/jumpcloud-agent)\n", + "new_terms_fields": [ + "host.id", + "process.executable", + "file.path" + ], + "history_window_start": "now-7d", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "SUNBURST Command and Control Activity", + "description": "The malware known as SUNBURST targets the SolarWind's Orion business software for command and control. This rule detects post-exploitation command and control activity of the SUNBURST backdoor.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating SUNBURST Command and Control Activity\n\nSUNBURST is a trojanized version of a digitally signed SolarWinds Orion plugin called SolarWinds.Orion.Core.BusinessLayer.dll. The plugin contains a backdoor that communicates via HTTP to third-party servers. After an initial dormant period of up to two weeks, SUNBURST may retrieve and execute commands that instruct the backdoor to transfer files, execute files, profile the system, reboot the system, and disable system services. The malware's network traffic attempts to blend in with legitimate SolarWinds activity by imitating the Orion Improvement Program (OIP) protocol, and the malware stores persistent state data within legitimate plugin configuration files. The backdoor uses multiple obfuscated blocklists to identify processes, services, and drivers associated with forensic and anti-virus tools.\n\nMore details on SUNBURST can be found on the [Mandiant Report](https://www.mandiant.com/resources/sunburst-additional-technical-details).\n\nThis rule identifies suspicious network connections that attempt to blend in with legitimate SolarWinds activity by imitating the Orion Improvement Program (OIP) protocol behavior.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the executable involved using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the environment at risk.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Reimage the host operating system and restore compromised files to clean versions.\n- Upgrade SolarWinds systems to the latest version to eradicate the chance of reinfection by abusing the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/", + "subtechnique": [ + { + "id": "T1071.001", + "name": "Web Protocols", + "reference": "https://attack.mitre.org/techniques/T1071/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1195", + "name": "Supply Chain Compromise", + "reference": "https://attack.mitre.org/techniques/T1195/", + "subtechnique": [ + { + "id": "T1195.002", + "name": "Compromise Software Supply Chain", + "reference": "https://attack.mitre.org/techniques/T1195/002/" + } + ] + } + ] + } + ], + "id": "1013700a-96d3-4ab2-aae5-0074f43c1ead", + "rule_id": "22599847-5d13-48cb-8872-5796fee8692b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "http.request.body.content", + "type": "wildcard", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "network where host.os.type == \"windows\" and event.type == \"protocol\" and network.protocol == \"http\" and\n process.name : (\"ConfigurationWizard.exe\",\n \"NetFlowService.exe\",\n \"NetflowDatabaseMaintenance.exe\",\n \"SolarWinds.Administration.exe\",\n \"SolarWinds.BusinessLayerHost.exe\",\n \"SolarWinds.BusinessLayerHostx64.exe\",\n \"SolarWinds.Collector.Service.exe\",\n \"SolarwindsDiagnostics.exe\") and\n (\n (\n (http.request.body.content : \"*/swip/Upload.ashx*\" and http.request.body.content : (\"POST*\", \"PUT*\")) or\n (http.request.body.content : (\"*/swip/SystemDescription*\", \"*/swip/Events*\") and http.request.body.content : (\"GET*\", \"HEAD*\"))\n ) and\n not http.request.body.content : \"*solarwinds.com*\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "AWS S3 Bucket Configuration Deletion", + "description": "Identifies the deletion of various Amazon Simple Storage Service (S3) bucket configuration components.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 206, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Bucket components may be deleted by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Bucket component deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketPolicy.html", + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html", + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html", + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html", + "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/" + } + ] + } + ], + "id": "2ba25dec-9c05-4325-bc31-1934718c2548", + "rule_id": "227dc608-e558-43d9-b521-150772250bae", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:s3.amazonaws.com and\n event.action:(DeleteBucketPolicy or DeleteBucketReplication or DeleteBucketCors or\n DeleteBucketEncryption or DeleteBucketLifecycle)\n and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Kernel Module Load via insmod", + "description": "Detects the use of the insmod binary to load a Linux kernel object file. Threat actors can use this binary, given they have root privileges, to load a rootkit on a system providing them with complete control and the ability to hide from security products. Manually loading a kernel module in this manner should not be at all common and can indicate suspcious or malicious behavior.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Threat: Rootkit", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://decoded.avast.io/davidalvarez/linux-threat-hunting-syslogk-a-kernel-rootkit-found-under-development-in-the-wild/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.006", + "name": "Kernel Modules and Extensions", + "reference": "https://attack.mitre.org/techniques/T1547/006/" + } + ] + } + ] + } + ], + "id": "8b4d5c6e-668a-4c83-a8cb-49e29801cdde", + "rule_id": "2339f03c-f53f-40fa-834b-40c5983fc41f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and process.name == \"insmod\" and process.args : \"*.ko\"\nand not process.parent.name in (\"cisco-amp-helper\", \"ksplice-apply\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Lateral Movement via Startup Folder", + "description": "Identifies suspicious file creations in the startup folder of a remote system. An adversary could abuse this to move laterally by dropping a malicious script or executable that will be executed after a reboot or user logon.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.mdsec.co.uk/2017/06/rdpinception/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.001", + "name": "Remote Desktop Protocol", + "reference": "https://attack.mitre.org/techniques/T1021/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + } + ] + } + ] + } + ], + "id": "f9af7b8a-129f-40c1-a062-76955c30286b", + "rule_id": "25224a80-5a4a-4b8a-991e-6ab390465c4f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n\n /* via RDP TSClient mounted share or SMB */\n (process.name : \"mstsc.exe\" or process.pid == 4) and\n\n file.path : (\"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\*\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Account Password Reset Remotely", + "description": "Identifies an attempt to reset a potentially privileged account password remotely. Adversaries may manipulate account passwords to maintain access or evade password duration policies and preserve compromised credentials.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate remote account administration." + ], + "references": [ + "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4724", + "https://stealthbits.com/blog/manipulating-user-passwords-with-mimikatz/", + "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Credential%20Access/remote_pwd_reset_rpc_mimikatz_postzerologon_target_DC.evtx", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1531", + "name": "Account Access Removal", + "reference": "https://attack.mitre.org/techniques/T1531/" + } + ] + } + ], + "id": "6b32b3b4-7f1d-4a8f-93d1-5851fb71f8e3", + "rule_id": "2820c9c2-bcd7-4d6e-9eba-faf3891ba450", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectLogonId", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetLogonId", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetSid", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.TargetUserName", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.logon.type", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "sequence by winlog.computer_name with maxspan=5m\n [authentication where event.action == \"logged-in\" and\n /* event 4624 need to be logged */\n winlog.logon.type : \"Network\" and event.outcome == \"success\" and source.ip != null and\n source.ip != \"127.0.0.1\" and source.ip != \"::1\"] by winlog.event_data.TargetLogonId\n /* event 4724 need to be logged */\n [iam where event.action == \"reset-password\" and\n (\n /*\n This rule is very noisy if not scoped to privileged accounts, duplicate the\n rule and add your own naming convention and accounts of interest here.\n */\n winlog.event_data.TargetUserName: (\"*Admin*\", \"*super*\", \"*SVC*\", \"*DC0*\", \"*service*\", \"*DMZ*\", \"*ADM*\") or\n winlog.event_data.TargetSid : (\"S-1-5-21-*-500\", \"S-1-12-1-*-500\")\n )\n ] by winlog.event_data.SubjectLogonId\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Account Discovery Command via SYSTEM Account", + "description": "Identifies when the SYSTEM account uses an account discovery utility. This could be a sign of discovery activity after an adversary has achieved privilege escalation.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Account Discovery Command via SYSTEM Account\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of account discovery utilities using the SYSTEM account, which is commonly observed after attackers successfully perform privilege escalation or exploit web applications.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - If the process tree includes a web-application server process such as w3wp, httpd.exe, nginx.exe and alike, investigate any suspicious file creation or modification in the last 48 hours to assess the presence of any potential webshell backdoor.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Determine how the SYSTEM account is being used. For example, users with administrator privileges can spawn a system shell using Windows services, scheduled tasks or other third party utilities.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n- Use the data collected through the analysis to investigate other machines affected in the environment.", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Tactic: Privilege Escalation", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1033", + "name": "System Owner/User Discovery", + "reference": "https://attack.mitre.org/techniques/T1033/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.003", + "name": "Local Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/003/" + } + ] + } + ] + } + ], + "id": "e4a2449d-a1a9-49d2-b1fc-2c4d5b70652e", + "rule_id": "2856446a-34e6-435b-9fb5-f8f040bfa7ed", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.token.integrity_level_name", + "type": "unknown", + "ecs": false + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.IntegrityLevel", + "type": "keyword", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (?process.Ext.token.integrity_level_name : \"System\" or\n ?winlog.event_data.IntegrityLevel : \"System\") and\n (process.name : \"whoami.exe\" or\n (process.name : \"net1.exe\" and not process.parent.name : \"net.exe\"))\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "AWS Security Group Configuration Change Detection", + "description": "Identifies a change to an AWS Security Group Configuration. A security group is like a virtual firewall, and modifying configurations may allow unauthorized access. Threat actors may abuse this to establish persistence, exfiltrate data, or pivot in an AWS environment.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Network Security Monitoring", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "A security group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security group creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-security-groups.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "b9df25b1-040e-4d91-a8d6-d649081c16db", + "rule_id": "29052c19-ff3e-42fd-8363-7be14d7c5469", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:(AuthorizeSecurityGroupEgress or\nCreateSecurityGroup or ModifyInstanceAttribute or ModifySecurityGroupRules or RevokeSecurityGroupEgress or\nRevokeSecurityGroupIngress) and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Web Shell Detection: Script Process Child of Common Web Processes", + "description": "Identifies suspicious commands executed via a web server, which may suggest a vulnerability and remote shell access.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Web Shell Detection: Script Process Child of Common Web Processes\n\nAdversaries may backdoor web servers with web shells to establish persistent access to systems. A web shell is a web script that is placed on an openly accessible web server to allow an adversary to use the web server as a gateway into a network. A web shell may provide a set of functions to execute or a command-line interface on the system that hosts the web server.\n\nThis rule detects a web server process spawning script and command-line interface programs, potentially indicating attackers executing commands using the web shell.\n\n#### Possible investigation steps\n\n- Investigate abnormal behaviors observed by the subject process such as network connections, registry or file modifications, and any other spawned child processes.\n- Examine the command line to determine which commands or scripts were executed.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Initial Access", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Security audits, maintenance, and network administrative scripts may trigger this alert when run under web processes." + ], + "references": [ + "https://www.microsoft.com/security/blog/2020/02/04/ghost-in-the-shell-investigating-web-shell-attacks/", + "https://www.elastic.co/security-labs/elastic-response-to-the-the-spring4shell-vulnerability-cve-2022-22965", + "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1505", + "name": "Server Software Component", + "reference": "https://attack.mitre.org/techniques/T1505/", + "subtechnique": [ + { + "id": "T1505.003", + "name": "Web Shell", + "reference": "https://attack.mitre.org/techniques/T1505/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + }, + { + "id": "T1059.005", + "name": "Visual Basic", + "reference": "https://attack.mitre.org/techniques/T1059/005/" + } + ] + }, + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "c3996978-c3ce-4a5b-8401-b527f825e240", + "rule_id": "2917d495-59bd-4250-b395-c29409b76086", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"w3wp.exe\", \"httpd.exe\", \"nginx.exe\", \"php.exe\", \"php-cgi.exe\", \"tomcat.exe\") and\n process.name : (\"cmd.exe\", \"cscript.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\", \"wmic.exe\", \"wscript.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Code Execution via Postgresql", + "description": "This rule monitors for suspicious activities that may indicate an attacker attempting to execute arbitrary code within a PostgreSQL environment. Attackers can execute code via PostgreSQL as a result of gaining unauthorized access to a public facing PostgreSQL database or exploiting vulnerabilities, such as remote command execution and SQL injection attacks, which can result in unauthorized access and malicious actions, and facilitate post-exploitation activities for unauthorized access and malicious actions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "58beac82-514a-497e-a604-dbc51983cff7", + "rule_id": "2a692072-d78d-42f3-a48a-775677d79c4e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\", \"fork\", \"fork_event\") and \nevent.type == \"start\" and user.name == \"postgres\" and (\n (process.parent.args : \"*sh\" and process.parent.args : \"echo*\") or \n (process.args : \"*sh\" and process.args : \"echo*\")\n) and not process.parent.name : \"puppet\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "ESXI Discovery via Grep", + "description": "Identifies instances where a process named 'grep', 'egrep', or 'pgrep' is started on a Linux system with arguments related to virtual machine (VM) files, such as \"vmdk\", \"vmx\", \"vmxf\", \"vmsd\", \"vmsn\", \"vswp\", \"vmss\", \"nvram\", or \"vmem\". These file extensions are associated with VM-related file formats, and their presence in grep command arguments may indicate that a threat actor is attempting to search for, analyze, or manipulate VM files on the system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1518", + "name": "Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/" + } + ] + } + ], + "id": "8d37bbdc-99e4-4fbe-bf19-cfd4e21305d4", + "rule_id": "2b662e21-dc6e-461e-b5cf-a6eb9b235ec4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and\nprocess.name in (\"grep\", \"egrep\", \"pgrep\") and\nprocess.args in (\"vmdk\", \"vmx\", \"vmxf\", \"vmsd\", \"vmsn\", \"vswp\", \"vmss\", \"nvram\", \"vmem\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Wireless Credential Dumping using Netsh Command", + "description": "Identifies attempts to dump Wireless saved access keys in clear text using the Windows built-in utility Netsh.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Wireless Credential Dumping using Netsh Command\n\nNetsh is a Windows command line tool used for network configuration and troubleshooting. It enables the management of network settings and adapters, wireless network profiles, and other network-related tasks.\n\nThis rule looks for patterns used to dump credentials from wireless network profiles using Netsh, which can enable attackers to bring their own devices to the network.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe:\n - Observe and collect information about the following activities in the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Discovery", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-contexts", + "https://www.geeksforgeeks.org/how-to-find-the-wi-fi-password-using-cmd-in-windows/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + }, + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "5c8d961f-e5a1-42cd-b932-124d539e703a", + "rule_id": "2de87d72-ee0c-43e2-b975-5f0b029ac600", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"netsh.exe\" or process.pe.original_file_name == \"netsh.exe\") and\n process.args : \"wlan\" and process.args : \"key*clear\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Renamed AutoIt Scripts Interpreter", + "description": "Identifies a suspicious AutoIt process execution. Malware written as an AutoIt script tends to rename the AutoIt executable to avoid detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Renamed AutoIt Scripts Interpreter\n\nThe OriginalFileName attribute of a PE (Portable Executable) file is a metadata field that contains the original name of the executable file when compiled or linked. By using this attribute, analysts can identify renamed instances that attackers can use with the intent of evading detections, application allowlists, and other security protections.\n\nAutoIt is a scripting language and tool for automating tasks on Microsoft Windows operating systems. Due to its capabilities, malicious threat actors can abuse it to create malicious scripts and distribute malware.\n\nThis rule checks for renamed instances of AutoIt, which can indicate an attempt of evading detections, application allowlists, and other security protections.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.003", + "name": "Rename System Utilities", + "reference": "https://attack.mitre.org/techniques/T1036/003/" + } + ] + } + ] + } + ], + "id": "07db42e0-4a49-4629-b75f-9a8c7aea2252", + "rule_id": "2e1e835d-01e5-48ca-b9fc-7a61f7f11902", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name : \"AutoIt*.exe\" and not process.name : \"AutoIt*.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Process Injection via PowerShell", + "description": "Detects the use of Windows API functions that are commonly abused by malware and security tools to load malicious code or inject it into remote processes.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Process Injection via PowerShell\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nPowerShell also has solid capabilities to make the interaction with the Win32 API in an uncomplicated and reliable way, like the execution of inline C# code, PSReflect, Get-ProcAddress, etc.\n\nRed Team tooling and malware developers take advantage of these capabilities to develop stagers and loaders that inject payloads directly into the memory without touching the disk to circumvent file-based security protections.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Check if the imported function was executed and which process it targeted.\n- Check if the injected code can be retrieved (hardcoded in the script or on command line logs).\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate PowerShell scripts that make use of these functions." + ], + "references": [ + "https://github.com/EmpireProject/Empire/blob/master/data/module_source/management/Invoke-PSInject.ps1", + "https://github.com/EmpireProject/Empire/blob/master/data/module_source/management/Invoke-ReflectivePEInjection.ps1", + "https://github.com/BC-SECURITY/Empire/blob/master/empire/server/data/module_source/credentials/Invoke-Mimikatz.ps1", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/", + "subtechnique": [ + { + "id": "T1055.001", + "name": "Dynamic-link Library Injection", + "reference": "https://attack.mitre.org/techniques/T1055/001/" + }, + { + "id": "T1055.002", + "name": "Portable Executable Injection", + "reference": "https://attack.mitre.org/techniques/T1055/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + }, + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + } + ], + "id": "dd27a06b-69ca-4d8b-90b1-1251a70c41b4", + "rule_id": "2e29e96a-b67c-455a-afe4-de6183431d0d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.directory", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n (VirtualAlloc or VirtualAllocEx or VirtualProtect or LdrLoadDll or LoadLibrary or LoadLibraryA or\n LoadLibraryEx or GetProcAddress or OpenProcess or OpenProcessToken or AdjustTokenPrivileges) and\n (WriteProcessMemory or CreateRemoteThread or NtCreateThreadEx or CreateThread or QueueUserAPC or\n SuspendThread or ResumeThread or GetDelegateForFunctionPointer)\n ) and not \n (user.id:(\"S-1-5-18\" or \"S-1-5-19\") and\n file.directory: \"C:\\\\ProgramData\\\\Microsoft\\\\Windows Defender Advanced Threat Protection\\\\SenseCM\")\n", + "language": "kuery" + }, + { + "name": "Halfbaked Command and Control Beacon", + "description": "Halfbaked is a malware family used to establish persistence in a contested network. This rule detects a network activity algorithm leveraged by Halfbaked implant beacons for command and control.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Threat intel\n\nThis activity has been observed in FIN7 campaigns.", + "version": 104, + "tags": [ + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Domain: Endpoint" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "This rule should be tailored to exclude systems, either as sources or destinations, in which this behavior is expected." + ], + "references": [ + "https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html", + "https://attack.mitre.org/software/S0151/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + }, + { + "id": "T1568", + "name": "Dynamic Resolution", + "reference": "https://attack.mitre.org/techniques/T1568/", + "subtechnique": [ + { + "id": "T1568.002", + "name": "Domain Generation Algorithms", + "reference": "https://attack.mitre.org/techniques/T1568/002/" + } + ] + } + ] + } + ], + "id": "b709add9-8b03-4854-a58c-92ba7e2f0497", + "rule_id": "2e580225-2a58-48ef-938b-572933be06fe", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: (network_traffic.tls OR network_traffic.http) OR\n (event.category: (network OR network_traffic) AND network.protocol: http)) AND\n network.transport:tcp AND url.full:/http:\\/\\/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}\\/cd/ AND\n destination.port:(53 OR 80 OR 8080 OR 443)\n", + "language": "lucene" + }, + { + "name": "PowerShell Suspicious Script with Audio Capture Capabilities", + "description": "Detects PowerShell scripts that can record audio, a common feature in popular post-exploitation tooling.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Suspicious Script with Audio Capture Capabilities\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can use PowerShell to interact with the Windows API with the intent of capturing audio from input devices connected to the victim's computer.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Investigate if the script stores the recorded data locally and determine if anything was recorded.\n- Investigate whether the script contains exfiltration capabilities and identify the exfiltration server.\n- Assess network data to determine if the host communicated with the exfiltration server.\n\n### False positive analysis\n\n- Regular users should not need scripts to capture audio, which makes false positives unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Prioritize the response if this alert involves key executives or potentially valuable targets for espionage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/PowerShellMafia/PowerSploit/blob/master/Exfiltration/Get-MicrophoneAudio.ps1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1123", + "name": "Audio Capture", + "reference": "https://attack.mitre.org/techniques/T1123/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + }, + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + } + ], + "id": "67ab7041-b86a-4924-b82f-7b69ac7e9f33", + "rule_id": "2f2f4939-0b34-40c2-a0a3-844eb7889f43", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"Get-MicrophoneAudio\" or\n \"WindowsAudioDevice-Powershell-Cmdlet\" or\n (waveInGetNumDevs and mciSendStringA)\n )\n and not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n and not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "Windows Defender Disabled via Registry Modification", + "description": "Identifies modifications to the Windows Defender registry settings to disable the service or set the service to be started manually.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Windows Defender Disabled via Registry Modification\n\nMicrosoft Windows Defender is an antivirus product built into Microsoft Windows, which makes it popular across multiple environments. Disabling it is a common step in threat actor playbooks.\n\nThis rule monitors the registry for configurations that disable Windows Defender or the start of its service.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check if this operation was approved and performed according to the organization's change management policy.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity, the configuration is justified (for example, it is being used to deploy other security solutions or troubleshooting), and no other suspicious activity has been observed.\n\n### Related rules\n\n- Disabling Windows Defender Security Settings via PowerShell - c8cccb06-faf2-4cd5-886e-2c9636cfcb87\n- Microsoft Windows Defender Tampering - fe794edd-487f-4a90-b285-3ee54f2af2d3\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Re-enable Windows Defender and restore the service configurations to automatic start.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://thedfirreport.com/2020/12/13/defender-control/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + }, + { + "id": "T1562.006", + "name": "Indicator Blocking", + "reference": "https://attack.mitre.org/techniques/T1562/006/" + } + ] + }, + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "3df3709d-1d13-419a-84f3-935f372bce59", + "rule_id": "2ffa1f1e-b6db-47fa-994b-1512743847eb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n (\n (\n registry.path: (\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\DisableAntiSpyware\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\DisableAntiSpyware\"\n ) and\n registry.data.strings: (\"1\", \"0x00000001\")\n ) or\n (\n registry.path: (\n \"HKLM\\\\System\\\\*ControlSet*\\\\Services\\\\WinDefend\\\\Start\",\n \"\\\\REGISTRY\\\\MACHINE\\\\System\\\\*ControlSet*\\\\Services\\\\WinDefend\\\\Start\"\n ) and\n registry.data.strings in (\"3\", \"4\", \"0x00000003\", \"0x00000004\")\n )\n ) and\n\n not process.executable :\n (\"?:\\\\WINDOWS\\\\system32\\\\services.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Program Files (x86)\\\\Trend Micro\\\\Security Agent\\\\NTRmv.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "ESXI Timestomping using Touch Command", + "description": "Identifies instances where the 'touch' command is executed on a Linux system with the \"-r\" flag, which is used to modify the timestamp of a file based on another file's timestamp. The rule targets specific VM-related paths, such as \"/etc/vmware/\", \"/usr/lib/vmware/\", or \"/vmfs/*\". These paths are associated with VMware virtualization software, and their presence in the touch command arguments may indicate that a threat actor is attempting to tamper with timestamps of VM-related files and configurations on the system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.006", + "name": "Timestomp", + "reference": "https://attack.mitre.org/techniques/T1070/006/" + } + ] + } + ] + } + ], + "id": "f49f4be8-1406-4023-873c-10fc478f9f51", + "rule_id": "30bfddd7-2954-4c9d-bbc6-19a99ca47e23", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and\nprocess.name : \"touch\" and process.args : \"-r\" and process.args : (\"/etc/vmware/*\", \"/usr/lib/vmware/*\", \"/vmfs/*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Inbound Connection to an Unsecure Elasticsearch Node", + "description": "Identifies Elasticsearch nodes that do not have Transport Layer Security (TLS), and/or lack authentication, and are accepting inbound network connections over the default Elasticsearch port.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Domain: Endpoint" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "If you have front-facing proxies that provide authentication and TLS, this rule would need to be tuned to eliminate the source IP address of your reverse-proxy." + ], + "references": [ + "https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-security.html", + "https://www.elastic.co/guide/en/beats/packetbeat/current/packetbeat-http-options.html#_send_all_headers" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + } + ], + "id": "4bb80573-0e6b-4a51-9e74-defd467c35ea", + "rule_id": "31295df3-277b-4c56-a1fb-84e31b4222a9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [], + "setup": "This rule requires the addition of port `9200` and `send_all_headers` to the `HTTP` protocol configuration in `packetbeat.yml`. See the References section for additional configuration documentation.", + "type": "query", + "index": [ + "packetbeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.http OR (event.category: network_traffic AND network.protocol: http)) AND\n status:OK AND destination.port:9200 AND network.direction:inbound AND NOT http.response.headers.content-type:\"image/x-icon\" AND NOT\n _exists_:http.request.headers.authorization\n", + "language": "lucene" + }, + { + "name": "RPC (Remote Procedure Call) to the Internet", + "description": "This rule detects network events that may indicate the use of RPC traffic to the Internet. RPC is commonly used by system administrators to remotely control a system for maintenance or to use shared resources. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Tactic: Initial Access", + "Domain: Endpoint", + "Use Case: Threat Detection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + } + ], + "id": "7764f3b3-53a4-4262-a913-a46d6b8bff18", + "rule_id": "32923416-763a-4531-bb35-f33b9232ecdb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and (destination.port:135 or event.dataset:zeek.dce_rpc) and\n source.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n ) and\n not destination.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n )\n", + "language": "kuery" + }, + { + "name": "Suspicious MS Outlook Child Process", + "description": "Identifies suspicious child processes of Microsoft Outlook. These child processes are often associated with spear phishing activity.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious MS Outlook Child Process\n\nMicrosoft Outlook is an email client that provides contact, email calendar, and task management features. Outlook is widely used, either standalone or as part of the Office suite.\n\nThis rule looks for suspicious processes spawned by MS Outlook, which can be the result of the execution of malicious documents and/or exploitation for initial access.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve recently opened files received via email and opened by the user that could cause this behavior. Common locations include but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "6b5df1e7-8bf3-40c3-9952-65614aabd347", + "rule_id": "32f4675e-6c49-4ace-80f9-97c9259dca2e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"outlook.exe\" and\n process.name : (\"Microsoft.Workflow.Compiler.exe\", \"arp.exe\", \"atbroker.exe\", \"bginfo.exe\", \"bitsadmin.exe\",\n \"cdb.exe\", \"certutil.exe\", \"cmd.exe\", \"cmstp.exe\", \"cscript.exe\", \"csi.exe\", \"dnx.exe\", \"dsget.exe\",\n \"dsquery.exe\", \"forfiles.exe\", \"fsi.exe\", \"ftp.exe\", \"gpresult.exe\", \"hostname.exe\", \"ieexec.exe\",\n \"iexpress.exe\", \"installutil.exe\", \"ipconfig.exe\", \"mshta.exe\", \"msxsl.exe\", \"nbtstat.exe\", \"net.exe\",\n \"net1.exe\", \"netsh.exe\", \"netstat.exe\", \"nltest.exe\", \"odbcconf.exe\", \"ping.exe\", \"powershell.exe\",\n \"pwsh.exe\", \"qprocess.exe\", \"quser.exe\", \"qwinsta.exe\", \"rcsi.exe\", \"reg.exe\", \"regasm.exe\",\n \"regsvcs.exe\", \"regsvr32.exe\", \"sc.exe\", \"schtasks.exe\", \"systeminfo.exe\", \"tasklist.exe\",\n \"tracert.exe\", \"whoami.exe\", \"wmic.exe\", \"wscript.exe\", \"xwizard.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS IAM User Addition to Group", + "description": "Identifies the addition of a user to a specified group in AWS Identity and Access Management (IAM).", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS IAM User Addition to Group\n\nAWS Identity and Access Management (IAM) provides fine-grained access control across all of AWS. With IAM, you can specify who can access which services and resources, and under which conditions. With IAM policies, you manage permissions to your workforce and systems to ensure least-privilege permissions.\n\nThis rule looks for the addition of users to a specified user group.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- False positives may occur due to the intended usage of the service. Tuning is needed in order to have higher confidence. Consider adding exceptions — preferably with a combination of user agent and IP address conditions — to reduce noise from onboarding processes and administrator activities.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Tactic: Credential Access", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Adding users to a specified group may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. User additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/IAM/latest/APIReference/API_AddUserToGroup.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "5be9dc6c-c098-4ba6-837c-64640f10143b", + "rule_id": "333de828-8190-4cf5-8d7c-7575846f6fe0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:AddUserToGroup and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "ESXI Discovery via Find", + "description": "Identifies instances where the 'find' command is started on a Linux system with arguments targeting specific VM-related paths, such as \"/etc/vmware/\", \"/usr/lib/vmware/\", or \"/vmfs/*\". These paths are associated with VMware virtualization software, and their presence in the find command arguments may indicate that a threat actor is attempting to search for, analyze, or manipulate VM-related files and configurations on the system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1518", + "name": "Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/" + } + ] + } + ], + "id": "553328a1-c4d6-4a47-8583-ac698195184d", + "rule_id": "33a6752b-da5e-45f8-b13a-5f094c09522f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and process.name : \"find\" and\nprocess.args : (\"/etc/vmware/*\", \"/usr/lib/vmware/*\", \"/vmfs/*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Remote File Download via PowerShell", + "description": "Identifies powershell.exe being used to download an executable file from an untrusted remote destination.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remote File Download via PowerShell\n\nAttackers commonly transfer tooling or malware from external systems into a compromised environment using the command and control channel. However, they can also abuse signed utilities to drop these files.\n\nPowerShell is one of system administrators' main tools for automation, report routines, and other tasks. This makes it available for use in various environments and creates an attractive way for attackers to execute code and perform actions. This rule correlates network and file events to detect downloads of executable and script files performed using PowerShell.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check the reputation of the domain or IP address used to host the downloaded file.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- Administrators can use PowerShell legitimately to download executable and script files. Analysts can dismiss the alert if the Administrator is aware of the activity and the triage has not identified suspicious or malicious files.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "2b0b0a02-13ce-4847-81ba-08fd883125b1", + "rule_id": "33f306e8-417c-411b-965c-c2812d6d3f4d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dns.question.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=30s\n [network where host.os.type == \"windows\" and process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and network.protocol == \"dns\" and\n not dns.question.name : (\"localhost\", \"*.microsoft.com\", \"*.azureedge.net\", \"*.powershellgallery.com\", \"*.windowsupdate.com\", \"metadata.google.internal\") and\n not user.domain : \"NT AUTHORITY\"]\n [file where host.os.type == \"windows\" and process.name : \"powershell.exe\" and event.type == \"creation\" and file.extension : (\"exe\", \"dll\", \"ps1\", \"bat\") and\n not file.name : \"__PSScriptPolicy*.ps1\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Port Forwarding Rule Addition", + "description": "Identifies the creation of a new port forwarding rule. An adversary may abuse this technique to bypass network segmentation restrictions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Port Forwarding Rule Addition\n\nNetwork port forwarding is a mechanism to redirect incoming TCP connections (IPv4 or IPv6) from the local TCP port to any other port number, or even to a port on a remote computer.\n\nAttackers may configure port forwarding rules to bypass network segmentation restrictions, using the host as a jump box to access previously unreachable systems.\n\nThis rule monitors the modifications to the `HKLM\\SYSTEM\\*ControlSet*\\Services\\PortProxy\\v4tov4\\` subkeys.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Identify the target host IP address, check the connections originating from the host where the modification occurred, and inspect the credentials used.\n - Investigate suspicious login activity, such as unauthorized access and logins from outside working hours and unusual locations.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the Administrator is aware of the activity and there are justifications for this configuration.\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Delete the port forwarding rule.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.fireeye.com/blog/threat-research/2019/01/bypassing-network-restrictions-through-rdp-tunneling.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "3ec9fa3c-5fa4-4ea6-a9ee-6adb122bd45d", + "rule_id": "3535c8bb-3bd5-40f4-ae32-b7cd589d5372", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\PortProxy\\\\v4tov4\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\PortProxy\\\\v4tov4\\\\*\"\n)\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Unusual Parent-Child Relationship", + "description": "Identifies Windows programs run from unexpected parent processes. This could indicate masquerading or other strange activity on a system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Parent-Child Relationship\n\nWindows internal/system processes have some characteristics that can be used to spot suspicious activities. One of these characteristics is parent-child relationships. These relationships can be used to baseline the typical behavior of the system and then alert on occurrences that don't comply with the baseline.\n\nThis rule uses this information to spot suspicious parent and child processes.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/sbousseaden/Slides/blob/master/Hunting%20MindMaps/PNG/Windows%20Processes%20TH.map.png", + "https://www.andreafortuna.org/2017/06/15/standard-windows-processes-a-brief-reference/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/", + "subtechnique": [ + { + "id": "T1055.012", + "name": "Process Hollowing", + "reference": "https://attack.mitre.org/techniques/T1055/012/" + } + ] + } + ] + } + ], + "id": "1a022e5f-8840-4345-94be-ab68d2c98e2a", + "rule_id": "35df0dd8-092d-4a83-88c1-5151a804f31b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\nprocess.parent.name != null and\n (\n /* suspicious parent processes */\n (process.name:\"autochk.exe\" and not process.parent.name:\"smss.exe\") or\n (process.name:(\"fontdrvhost.exe\", \"dwm.exe\") and not process.parent.name:(\"wininit.exe\", \"winlogon.exe\")) or\n (process.name:(\"consent.exe\", \"RuntimeBroker.exe\", \"TiWorker.exe\") and not process.parent.name:\"svchost.exe\") or\n (process.name:\"SearchIndexer.exe\" and not process.parent.name:\"services.exe\") or\n (process.name:\"SearchProtocolHost.exe\" and not process.parent.name:(\"SearchIndexer.exe\", \"dllhost.exe\")) or\n (process.name:\"dllhost.exe\" and not process.parent.name:(\"services.exe\", \"svchost.exe\")) or\n (process.name:\"smss.exe\" and not process.parent.name:(\"System\", \"smss.exe\")) or\n (process.name:\"csrss.exe\" and not process.parent.name:(\"smss.exe\", \"svchost.exe\")) or\n (process.name:\"wininit.exe\" and not process.parent.name:\"smss.exe\") or\n (process.name:\"winlogon.exe\" and not process.parent.name:\"smss.exe\") or\n (process.name:(\"lsass.exe\", \"LsaIso.exe\") and not process.parent.name:\"wininit.exe\") or\n (process.name:\"LogonUI.exe\" and not process.parent.name:(\"wininit.exe\", \"winlogon.exe\")) or\n (process.name:\"services.exe\" and not process.parent.name:\"wininit.exe\") or\n (process.name:\"svchost.exe\" and not process.parent.name:(\"MsMpEng.exe\", \"services.exe\")) or\n (process.name:\"spoolsv.exe\" and not process.parent.name:\"services.exe\") or\n (process.name:\"taskhost.exe\" and not process.parent.name:(\"services.exe\", \"svchost.exe\")) or\n (process.name:\"taskhostw.exe\" and not process.parent.name:(\"services.exe\", \"svchost.exe\")) or\n (process.name:\"userinit.exe\" and not process.parent.name:(\"dwm.exe\", \"winlogon.exe\")) or\n (process.name:(\"wmiprvse.exe\", \"wsmprovhost.exe\", \"winrshost.exe\") and not process.parent.name:\"svchost.exe\") or\n /* suspicious child processes */\n (process.parent.name:(\"SearchProtocolHost.exe\", \"taskhost.exe\", \"csrss.exe\") and not process.name:(\"werfault.exe\", \"wermgr.exe\", \"WerFaultSecure.exe\")) or\n (process.parent.name:\"autochk.exe\" and not process.name:(\"chkdsk.exe\", \"doskey.exe\", \"WerFault.exe\")) or\n (process.parent.name:\"smss.exe\" and not process.name:(\"autochk.exe\", \"smss.exe\", \"csrss.exe\", \"wininit.exe\", \"winlogon.exe\", \"setupcl.exe\", \"WerFault.exe\")) or\n (process.parent.name:\"wermgr.exe\" and not process.name:(\"WerFaultSecure.exe\", \"wermgr.exe\", \"WerFault.exe\")) or\n (process.parent.name:\"conhost.exe\" and not process.name:(\"mscorsvw.exe\", \"wermgr.exe\", \"WerFault.exe\", \"WerFaultSecure.exe\"))\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Process Started from Process ID (PID) File", + "description": "Identifies a new process starting from a process ID (PID), lock or reboot file within the temporary file storage paradigm (tmpfs) directory /var/run directory. On Linux, the PID files typically hold the process ID to track previous copies running and manage other tasks. Certain Linux malware use the /var/run directory for holding data, executables and other tasks, disguising itself or these files as legitimate PID files.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Process Started from Process ID (PID) File\nDetection alerts from this rule indicate a process spawned from an executable masqueraded as a legitimate PID file which is very unusual and should not occur. Here are some possible avenues of investigation:\n- Examine parent and child process relationships of the new process to determine if other processes are running.\n- Examine the /var/run directory using Osquery to determine other potential PID files with unsually large file sizes, indicative of it being an executable: \"SELECT f.size, f.uid, f.type, f.path from file f WHERE path like '/var/run/%%';\"\n- Examine the reputation of the SHA256 hash from the PID file in a database like VirusTotal to identify additional pivots and artifacts for investigation.\n\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Threat: BPFDoor", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "False-Positives (FP) should be at a minimum with this detection as PID files are meant to hold process IDs, not inherently be executables that spawn processes." + ], + "references": [ + "https://www.sandflysecurity.com/blog/linux-file-masquerading-and-malicious-pids-sandfly-1-2-6-update/", + "https://twitter.com/GossiTheDog/status/1522964028284411907", + "https://exatrack.com/public/Tricephalic_Hellkeeper.pdf", + "https://www.elastic.co/security-labs/a-peek-behind-the-bpfdoor" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "c1603ac5-ed49-4005-99f7-7152ceb45302", + "rule_id": "3688577a-d196-11ec-90b0-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and user.id == \"0\" and\n process.executable regex~ \"\"\"/var/run/\\w+\\.(pid|lock|reboot)\"\"\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Suspicious ImagePath Service Creation", + "description": "Identifies the creation of a suspicious ImagePath value. This could be an indication of an adversary attempting to stealthily persist or escalate privileges through abnormal service creation.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "70cfd3a2-3528-45bc-a3e7-b97c0fc503ca", + "rule_id": "36a8e048-d888-4f61-a8b9-0f9e2e40f317", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ImagePath\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ImagePath\"\n ) and\n /* add suspicious registry ImagePath values here */\n registry.data.strings : (\"%COMSPEC%*\", \"*\\\\.\\\\pipe\\\\*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "AWS RDS Security Group Creation", + "description": "Identifies the creation of an Amazon Relational Database Service (RDS) Security group.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "An RDS security group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security group creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBSecurityGroup.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.003", + "name": "Cloud Account", + "reference": "https://attack.mitre.org/techniques/T1136/003/" + } + ] + } + ] + } + ], + "id": "0363f16f-4151-4332-b9ba-ad83604c27ca", + "rule_id": "378f9024-8a0c-46a5-aa08-ce147ac73a4e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:CreateDBSecurityGroup and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "AWS Execution via System Manager", + "description": "Identifies the execution of commands and scripts via System Manager. Execution methods such as RunShellScript, RunPowerShellScript, and alike can be abused by an authenticated attacker to install a backdoor or to interact with a compromised instance via reverse-shell using system only commands.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS Execution via System Manager\n\nAmazon EC2 Systems Manager is a management service designed to help users automatically collect software inventory, apply operating system patches, create system images, and configure Windows and Linux operating systems.\n\nThis rule looks for the execution of commands and scripts using System Manager. Note that the actual contents of these scripts and commands are not included in the event, so analysts must gain visibility using an host-level security product.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate that the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Investigate the commands or scripts using host-level visibility.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences involving other users.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Log Auditing", + "Tactic: Initial Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Suspicious commands from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-plugins.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + } + ], + "id": "4e67408f-dff8-4226-b51d-5c7376f33826", + "rule_id": "37b211e8-4e2f-440f-86d8-06cc8f158cfa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:ssm.amazonaws.com and event.action:SendCommand and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Network Connection via Certutil", + "description": "Identifies certutil.exe making a network connection. Adversaries could abuse certutil.exe to download a certificate, or malware, from a remote URL.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Network Connection via Certutil\n\nAttackers can abuse `certutil.exe` to download malware, offensive security tools, and certificates from external sources in order to take the next steps in a compromised environment.\n\nThis rule looks for network events where `certutil.exe` contacts IP ranges other than the ones specified in [IANA IPv4 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml)\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate if the downloaded file was executed.\n- Determine the context in which `certutil.exe` and the file were run.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the downloaded file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. If trusted software uses this command and the triage has not identified anything suspicious, this alert can be closed as a false positive.\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml", + "https://frsecure.com/malware-incident-response-playbook/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + } + ], + "id": "e3b8080a-9767-417f-8ccc-421ab050aad1", + "rule_id": "3838e0e3-1850-4850-a411-2e8c5ba40ba8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"certutil.exe\" and event.type == \"start\"]\n [network where host.os.type == \"windows\" and process.name : \"certutil.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\",\n \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\",\n \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "AWS EC2 Network Access Control List Creation", + "description": "Identifies the creation of an AWS Elastic Compute Cloud (EC2) network access control list (ACL) or an entry in a network ACL with a specified rule number.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Network Security Monitoring", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Network ACL's may be created by a network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Network ACL creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/create-network-acl.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkAcl.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/create-network-acl-entry.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkAclEntry.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1133", + "name": "External Remote Services", + "reference": "https://attack.mitre.org/techniques/T1133/" + } + ] + } + ], + "id": "be5fa359-1488-4c83-8ab7-e3ff051f1b53", + "rule_id": "39144f38-5284-4f8e-a2ae-e3fd628d90b0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:(CreateNetworkAcl or CreateNetworkAclEntry) and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential DNS Tunneling via NsLookup", + "description": "This rule identifies a large number (15) of nslookup.exe executions with an explicit query type from the same host. This may indicate command and control activity utilizing the DNS protocol.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential DNS Tunneling via NsLookup\n\nAttackers can abuse existing network rules that allow DNS communication with external resources to use the protocol as their command and control and/or exfiltration channel.\n\nDNS queries can be used to infiltrate data such as commands to be run, malicious files, etc., and also for exfiltration, since queries can be used to send data to the attacker-controlled DNS server. This process is commonly known as DNS tunneling.\n\nMore information on how tunneling works and how it can be abused can be found on [Palo Alto Unit42 Research](https://unit42.paloaltonetworks.com/dns-tunneling-how-dns-can-be-abused-by-malicious-actors).\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the DNS query and identify the information sent.\n- Extract this communication's indicators of compromise (IoCs) and use traffic logs to search for other potentially compromised hosts.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. If the parent process is trusted and the data sent is not sensitive nor command and control related, this alert can be closed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Immediately block the identified indicators of compromise (IoCs).\n- Implement any temporary network rules, procedures, and segmentation required to contain the attack.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Update firewall rules to be more restrictive.\n- Reimage the host operating system or restore the compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://unit42.paloaltonetworks.com/dns-tunneling-in-the-wild-overview-of-oilrigs-dns-tunneling/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/", + "subtechnique": [ + { + "id": "T1071.004", + "name": "DNS", + "reference": "https://attack.mitre.org/techniques/T1071/004/" + } + ] + }, + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + } + ], + "id": "4cc5f31b-3b8a-4467-a761-5e7e5acf247f", + "rule_id": "3a59fc81-99d3-47ea-8cd6-d48d561fca20", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "event.category:process and host.os.type:windows and event.type:start and process.name:nslookup.exe and process.args:(-querytype=* or -qt=* or -q=* or -type=*)\n", + "threshold": { + "field": [ + "host.id" + ], + "value": 15 + }, + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "VNC (Virtual Network Computing) to the Internet", + "description": "This rule detects network events that may indicate the use of VNC traffic to the Internet. VNC is commonly used by system administrators to remotely control a system for maintenance or to use shared resources. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Tactic: Command and Control", + "Domain: Endpoint", + "Use Case: Threat Detection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "VNC connections may be made directly to Linux cloud server instances but such connections are usually made only by engineers. VNC is less common than SSH or RDP but may be required by some work flows such as remote access and support for specialized software products or servers. Such work-flows are usually known and not unexpected. Usage that is unfamiliar to server or network owners can be unexpected and suspicious." + ], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1219", + "name": "Remote Access Software", + "reference": "https://attack.mitre.org/techniques/T1219/" + } + ] + } + ], + "id": "7965ed9b-7262-4031-8efd-40afb01bb9e6", + "rule_id": "3ad49c61-7adc-42c1-b788-732eda2f5abf", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and destination.port >= 5800 and destination.port <= 5810 and\n source.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n ) and\n not destination.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n )\n", + "language": "kuery" + }, + { + "name": "Unusual Parent Process for cmd.exe", + "description": "Identifies a suspicious parent child process relationship with cmd.exe descending from an unusual process.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "25b6146a-2439-44d2-86ba-900c1fec4510", + "rule_id": "3b47900d-e793-49e8-968f-c90dc3526aa1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"cmd.exe\" and\n process.parent.name : (\"lsass.exe\",\n \"csrss.exe\",\n \"epad.exe\",\n \"regsvr32.exe\",\n \"dllhost.exe\",\n \"LogonUI.exe\",\n \"wermgr.exe\",\n \"spoolsv.exe\",\n \"jucheck.exe\",\n \"jusched.exe\",\n \"ctfmon.exe\",\n \"taskhostw.exe\",\n \"GoogleUpdate.exe\",\n \"sppsvc.exe\",\n \"sihost.exe\",\n \"slui.exe\",\n \"SIHClient.exe\",\n \"SearchIndexer.exe\",\n \"SearchProtocolHost.exe\",\n \"FlashPlayerUpdateService.exe\",\n \"WerFault.exe\",\n \"WUDFHost.exe\",\n \"unsecapp.exe\",\n \"wlanext.exe\" ) and\n not (process.parent.name : \"dllhost.exe\" and process.parent.args : \"/Processid:{CA8C87C1-929D-45BA-94DB-EF8E6CB346AD}\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "NTDS or SAM Database File Copied", + "description": "Identifies a copy operation of the Active Directory Domain Database (ntds.dit) or Security Account Manager (SAM) files. Those files contain sensitive information including hashed domain and/or local credentials.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://thedfirreport.com/2020/11/23/pysa-mespinoza-ransomware/", + "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.002/T1003.002.md#atomic-test-3---esentutlexe-sam-copy", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 33, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.002", + "name": "Security Account Manager", + "reference": "https://attack.mitre.org/techniques/T1003/002/" + }, + { + "id": "T1003.003", + "name": "NTDS", + "reference": "https://attack.mitre.org/techniques/T1003/003/" + } + ] + } + ] + } + ], + "id": "c493a6c4-57bc-4f02-b206-8dc3cca37f6a", + "rule_id": "3bc6deaa-fbd4-433a-ae21-3e892f95624f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n (process.pe.original_file_name in (\"Cmd.Exe\", \"PowerShell.EXE\", \"XCOPY.EXE\") and\n process.args : (\"copy\", \"xcopy\", \"Copy-Item\", \"move\", \"cp\", \"mv\")\n ) or\n (process.pe.original_file_name : \"esentutl.exe\" and process.args : (\"*/y*\", \"*/vss*\", \"*/d*\"))\n ) and\n process.args : (\"*\\\\ntds.dit\", \"*\\\\config\\\\SAM\", \"\\\\*\\\\GLOBALROOT\\\\Device\\\\HarddiskVolumeShadowCopy*\\\\*\", \"*/system32/config/SAM*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS CloudTrail Log Updated", + "description": "Identifies an update to an AWS log trail setting that specifies the delivery of log files.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS CloudTrail Log Updated\n\nAmazon CloudTrail is a service that enables governance, compliance, operational auditing, and risk auditing of your Amazon Web Services account. With CloudTrail, you can log, continuously monitor, and retain account activity related to actions across your Amazon Web Services infrastructure. CloudTrail provides event history of your Amazon Web Services account activity, including actions taken through the Amazon Management Console, Amazon SDKs, command line tools, and other Amazon Web Services services. This event history simplifies security analysis, resource change tracking, and troubleshooting.\n\nThis rule identifies a modification on CloudTrail settings using the API `UpdateTrail` action. Attackers can do this to cover their tracks and impact security monitoring that relies on this source.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Examine the response elements of the event to determine the scope of the changes.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Log Auditing", + "Resources: Investigation Guide", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trail updates may be made by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Trail updates from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_UpdateTrail.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/update-trail.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1565", + "name": "Data Manipulation", + "reference": "https://attack.mitre.org/techniques/T1565/", + "subtechnique": [ + { + "id": "T1565.001", + "name": "Stored Data Manipulation", + "reference": "https://attack.mitre.org/techniques/T1565/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1530", + "name": "Data from Cloud Storage", + "reference": "https://attack.mitre.org/techniques/T1530/" + } + ] + } + ], + "id": "5759c9a2-7b15-4d95-b154-89ef4c303696", + "rule_id": "3e002465-876f-4f04-b016-84ef48ce7e5d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:UpdateTrail and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Privilege Escalation via Named Pipe Impersonation", + "description": "Identifies a privilege escalation attempt via named pipe impersonation. An adversary may abuse this technique by utilizing a framework such Metasploit's meterpreter getsystem command.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Privilege Escalation via Named Pipe Impersonation\n\nA named pipe is a type of inter-process communication (IPC) mechanism used in operating systems like Windows, which allows two or more processes to communicate with each other by sending and receiving data through a well-known point.\n\nAttackers can abuse named pipes to elevate their privileges by impersonating the security context in which they execute code. Metasploit, for example, creates a service and a random pipe, and then uses the service to connect to the pipe and impersonate the service security context, which is SYSTEM.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - If any suspicious processes were found, examine the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.ired.team/offensive-security/privilege-escalation/windows-namedpipes-privilege-escalation", + "https://www.cobaltstrike.com/blog/what-happens-when-i-type-getsystem/", + "https://redcanary.com/blog/getsystem-offsec/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/" + } + ] + } + ], + "id": "f62a471c-ec1d-4aca-94fd-cdab91e6b2b6", + "rule_id": "3ecbdc9e-e4f2-43fa-8cca-63802125e582", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name in (\"Cmd.Exe\", \"PowerShell.EXE\") and\n process.args : \"echo\" and process.args : \">\" and process.args : \"\\\\\\\\.\\\\pipe\\\\*\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Process Creation CallTrace", + "description": "Identifies when a process is created and immediately accessed from an unknown memory code region and by the same parent process. This may indicate a code injection attempt.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Process Creation CallTrace\n\nAttackers may inject code into child processes' memory to hide their actual activity, evade detection mechanisms, and decrease discoverability during forensics. This rule looks for a spawned process by Microsoft Office, scripting, and command line applications, followed by a process access event for an unknown memory region by the parent process, which can indicate a code injection attempt.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Create a memory dump of the child process for analysis.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 207, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + } + ], + "id": "ab9afe25-bbf6-45be-aa23-70f5fd737f90", + "rule_id": "3ed032b2-45d8-4406-bc79-7ad1eabb2c72", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.CallTrace", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetProcessGUID", + "type": "keyword", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=1m\n [process where host.os.type == \"windows\" and event.code == \"1\" and\n /* sysmon process creation */\n process.parent.name : (\"winword.exe\", \"excel.exe\", \"outlook.exe\", \"powerpnt.exe\", \"eqnedt32.exe\", \"fltldr.exe\",\n \"mspub.exe\", \"msaccess.exe\",\"cscript.exe\", \"wscript.exe\", \"rundll32.exe\", \"regsvr32.exe\",\n \"mshta.exe\", \"wmic.exe\", \"cmstp.exe\", \"msxsl.exe\") and\n\n /* noisy FP patterns */\n not (process.parent.name : \"EXCEL.EXE\" and process.executable : \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\Office*\\\\ADDINS\\\\*.exe\") and\n not (process.executable : \"?:\\\\Windows\\\\splwow64.exe\" and process.args in (\"8192\", \"12288\") and process.parent.name : (\"winword.exe\", \"excel.exe\", \"outlook.exe\", \"powerpnt.exe\")) and\n not (process.parent.name : \"rundll32.exe\" and process.parent.args : (\"?:\\\\WINDOWS\\\\Installer\\\\MSI*.tmp,zzzzInvokeManagedCustomActionOutOfProc\", \"--no-sandbox\")) and\n not (process.executable :\n (\"?:\\\\Program Files (x86)\\\\Microsoft\\\\EdgeWebView\\\\Application\\\\*\\\\msedgewebview2.exe\",\n \"?:\\\\Program Files\\\\Adobe\\\\Acrobat DC\\\\Acrobat\\\\Acrobat.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\DWWIN.EXE\") and\n process.parent.name : (\"winword.exe\", \"excel.exe\", \"outlook.exe\", \"powerpnt.exe\")) and\n not (process.parent.name : \"regsvr32.exe\" and process.parent.args : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\"))\n ] by process.parent.entity_id, process.entity_id\n [process where host.os.type == \"windows\" and event.code == \"10\" and\n /* Sysmon process access event from unknown module */\n winlog.event_data.CallTrace : \"*UNKNOWN*\"] by process.entity_id, winlog.event_data.TargetProcessGUID\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Binary Executed from Shared Memory Directory", + "description": "Identifies the execution of a binary by root in Linux shared memory directories: (/dev/shm/, /run/shm/, /var/run/, /var/lock/). This activity is to be considered highly abnormal and should be investigated. Threat actors have placed executables used for persistence on high-uptime servers in these directories as system backdoors.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Threat: BPFDoor", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Directories /dev/shm and /run/shm are temporary file storage directories in Linux. They are intended to appear as a mounted file system, but uses virtual memory instead of a persistent storage device and thus are used for mounting file systems in legitimate purposes." + ], + "references": [ + "https://linuxsecurity.com/features/fileless-malware-on-linux", + "https://twitter.com/GossiTheDog/status/1522964028284411907", + "https://www.elastic.co/security-labs/a-peek-behind-the-bpfdoor" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "ee83fa54-bcfa-468e-bb02-aa8073b05a1b", + "rule_id": "3f3f9fe2-d095-11ec-95dc-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"exec\", \"exec_event\") and\nprocess.executable : (\"/dev/shm/*\", \"/run/shm/*\", \"/var/run/*\", \"/var/lock/*\") and\nnot process.executable : (\"/var/run/docker/*\", \"/var/run/utsns/*\", \"/var/run/s6/*\", \"/var/run/cloudera-scm-agent/*\") and\nuser.id == \"0\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Unusual Persistence via Services Registry", + "description": "Identifies processes modifying the services registry key directly, instead of through the expected Windows APIs. This could be an indication of an adversary attempting to stealthily persist through abnormal service creation or modification of an existing service.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "28cbd55f-e79a-4c9b-9ba7-54f8011b6e9b", + "rule_id": "403ef0d3-8259-40c9-a5b6-d48354712e49", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ServiceDLL\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ImagePath\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ServiceDLL\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ImagePath\"\n ) and not registry.data.strings : (\n \"?:\\\\windows\\\\system32\\\\Drivers\\\\*.sys\",\n \"\\\\SystemRoot\\\\System32\\\\drivers\\\\*.sys\",\n \"\\\\??\\\\?:\\\\Windows\\\\system32\\\\Drivers\\\\*.SYS\",\n \"system32\\\\DRIVERS\\\\USBSTOR\") and\n not (process.name : \"procexp??.exe\" and registry.data.strings : \"?:\\\\*\\\\procexp*.sys\") and\n not process.executable : (\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Windows\\\\winsxs\\\\*\\\\TiWorker.exe\",\n \"?:\\\\Windows\\\\System32\\\\drvinst.exe\",\n \"?:\\\\Windows\\\\System32\\\\services.exe\",\n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\regsvr32.exe\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Modprobe File Event", + "description": "Detects file events involving kernel modules in modprobe configuration files, which may indicate unauthorized access or manipulation of critical kernel modules. Attackers may tamper with the modprobe files to load malicious or unauthorized kernel modules, potentially bypassing security measures, escalating privileges, or hiding their activities within the system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Setup\nThis rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system. \n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from. \n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /etc/modprobe.conf -p wa -k modprobe\n-w /etc/modprobe.d -p wa -k modprobe\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", + "building_block_type": "default", + "version": 103, + "tags": [ + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "d92cb607-6ed9-4aec-9717-d7be4228c4d1", + "rule_id": "40ddbcc8-6561-44d9-afc8-eefdbfe0cccd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "This rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system.\n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /etc/modprobe.conf -p wa -k modprobe\n-w /etc/modprobe.d -p wa -k modprobe\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", + "type": "new_terms", + "query": "host.os.type:linux and event.category:file and event.action:\"opened-file\" and\nfile.path : (\"/etc/modprobe.conf\" or \"/etc/modprobe.d\" or /etc/modprobe.d/*)\n", + "new_terms_fields": [ + "host.id", + "process.executable", + "file.path" + ], + "history_window_start": "now-7d", + "index": [ + "auditbeat-*", + "logs-auditd_manager.auditd-*" + ], + "language": "kuery" + }, + { + "name": "Control Panel Process with Unusual Arguments", + "description": "Identifies unusual instances of Control Panel with suspicious keywords or paths in the process command line value. Adversaries may abuse control.exe to proxy execution of malicious code.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.joesandbox.com/analysis/476188/1/html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.002", + "name": "Control Panel", + "reference": "https://attack.mitre.org/techniques/T1218/002/" + } + ] + } + ] + } + ], + "id": "364a567c-89be-4a9f-acc3-7f50deefb602", + "rule_id": "416697ae-e468-4093-a93d-59661fa619ec", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.executable : (\"?:\\\\Windows\\\\SysWOW64\\\\control.exe\", \"?:\\\\Windows\\\\System32\\\\control.exe\") and\n process.command_line :\n (\"*.jpg*\",\n \"*.png*\",\n \"*.gif*\",\n \"*.bmp*\",\n \"*.jpeg*\",\n \"*.TIFF*\",\n \"*.inf*\",\n \"*.cpl:*/*\",\n \"*../../..*\",\n \"*/AppData/Local/*\",\n \"*:\\\\Users\\\\Public\\\\*\",\n \"*\\\\AppData\\\\Local\\\\*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Linux User Added to Privileged Group", + "description": "Identifies attempts to add a user to a privileged group. Attackers may add users to a privileged group in order to establish persistence on a system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Linux User User Added to Privileged Group\n\nThe `usermod`, `adduser`, and `gpasswd` commands can be used to assign user accounts to new groups in Linux-based operating systems.\n\nAttackers may add users to a privileged group in order to escalate privileges or establish persistence on a system or domain.\n\nThis rule identifies the usages of `usermod`, `adduser` and `gpasswd` to assign user accounts to a privileged group.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible investigation steps\n\n- Investigate whether the user was succesfully added to the privileged group.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific User\",\"query\":\"SELECT * FROM users WHERE username = {{user.name}}\"}}\n- Investigate whether the user is currently logged in and active.\n - !{osquery{\"label\":\"Osquery - Investigate the Account Authentication Status\",\"query\":\"SELECT * FROM logged_in_users WHERE user = {{user.name}}\"}}\n- Retrieve information about the privileged group to which the user was added.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific Group\",\"query\":\"SELECT * FROM groups WHERE groupname = {{group.name}}\"}}\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Adding accounts to a group is a common administrative task, so there is a high chance of the activity being legitimate. Before investigating further, verify that this activity is not benign.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Delete the account that seems to be involved in malicious activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1136/001/" + } + ] + } + ] + } + ], + "id": "f628cbab-7a65-42b9-a829-f105d56a21fc", + "rule_id": "43d6ec12-2b1c-47b5-8f35-e9de65551d3b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and\nprocess.parent.name == \"sudo\" and\nprocess.args in (\"root\", \"admin\", \"wheel\", \"staff\", \"sudo\",\n \"disk\", \"video\", \"shadow\", \"lxc\", \"lxd\") and\n(\n process.name in (\"usermod\", \"adduser\") or\n process.name == \"gpasswd\" and \n process.args in (\"-a\", \"--add\", \"-M\", \"--members\") \n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Startup Persistence by a Suspicious Process", + "description": "Identifies files written to or modified in the startup folder by commonly abused processes. Adversaries may use this technique to maintain persistence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Startup Persistence by a Suspicious Process\n\nThe Windows Startup folder is a special folder in Windows. Programs added to this folder are executed during account logon, without user interaction, providing an excellent way for attackers to maintain persistence.\n\nThis rule monitors for commonly abused processes writing to the Startup folder locations.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- Administrators may add programs to this mechanism via command-line shells. Before the further investigation, verify that this activity is not benign.\n\n### Related rules\n\n- Suspicious Startup Shell Folder Modification - c8b150f0-0164-475b-a75e-74b47800a9ff\n- Persistent Scripts in the Startup Directory - f7c4dc5a-a58d-491d-9f14-9b66507121c0\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + } + ] + } + ] + } + ], + "id": "b0fb92fd-48ce-418a-8bd6-5085b6f8c53b", + "rule_id": "440e2db4-bc7f-4c96-a068-65b78da59bde", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n user.domain != \"NT AUTHORITY\" and\n file.path : (\"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\*\",\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\StartUp\\\\*\") and\n process.name : (\"cmd.exe\",\n \"powershell.exe\",\n \"wmic.exe\",\n \"mshta.exe\",\n \"pwsh.exe\",\n \"cscript.exe\",\n \"wscript.exe\",\n \"regsvr32.exe\",\n \"RegAsm.exe\",\n \"rundll32.exe\",\n \"EQNEDT32.EXE\",\n \"WINWORD.EXE\",\n \"EXCEL.EXE\",\n \"POWERPNT.EXE\",\n \"MSPUB.EXE\",\n \"MSACCESS.EXE\",\n \"iexplore.exe\",\n \"InstallUtil.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Multiple Vault Web Credentials Read", + "description": "Windows Credential Manager allows you to create, view, or delete saved credentials for signing into websites, connected applications, and networks. An adversary may abuse this to list or dump credentials stored in the Credential Manager for saved usernames and passwords. This may also be performed in preparation of lateral movement.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "", + "version": 8, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=5382", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + }, + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/", + "subtechnique": [ + { + "id": "T1555.004", + "name": "Windows Credential Manager", + "reference": "https://attack.mitre.org/techniques/T1555/004/" + } + ] + } + ] + } + ], + "id": "061a8dd9-fafa-4d36-bd5f-54cfc8f924a9", + "rule_id": "44fc462c-1159-4fa8-b1b7-9b6296ab4f96", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.Resource", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.SchemaFriendlyName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectLogonId", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.process.pid", + "type": "long", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "sequence by winlog.computer_name, winlog.process.pid with maxspan=1s\n\n /* 2 consecutive vault reads from same pid for web creds */\n\n [any where event.code : \"5382\" and\n (winlog.event_data.SchemaFriendlyName : \"Windows Web Password Credential\" and winlog.event_data.Resource : \"http*\") and\n not winlog.event_data.SubjectLogonId : \"0x3e7\" and \n not winlog.event_data.Resource : \"http://localhost/\"]\n\n [any where event.code : \"5382\" and\n (winlog.event_data.SchemaFriendlyName : \"Windows Web Password Credential\" and winlog.event_data.Resource : \"http*\") and\n not winlog.event_data.SubjectLogonId : \"0x3e7\" and \n not winlog.event_data.Resource : \"http://localhost/\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Encrypting Files with WinRar or 7z", + "description": "Identifies use of WinRar or 7z to create an encrypted files. Adversaries will often compress and encrypt data in preparation for exfiltration.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Encrypting Files with WinRar or 7z\n\nAttackers may compress and/or encrypt data collected before exfiltration. Compressing the data can help obfuscate the collected data and minimize the amount of data sent over the network. Encryption can be used to hide information that is being exfiltrated from detection or make exfiltration less apparent upon inspection by a defender.\n\nThese steps are usually done in preparation for exfiltration, meaning the attack may be in its final stages.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Retrieve the encrypted file.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check if the password used in the encryption was included in the command line.\n- Decrypt the `.rar`/`.zip` and check if the information is sensitive.\n- If the password is not available, and the format is `.zip` or the option used in WinRAR is not the `-hp`, list the file names included in the encrypted file.\n- Investigate if the file was transferred to an attacker-controlled server.\n\n### False positive analysis\n\n- Backup software can use these utilities. Check the `process.parent.executable` and `process.parent.command_line` fields to determine what triggered the encryption.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Prioritize cases that involve personally identifiable information (PII) or other classified data.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.welivesecurity.com/2020/12/02/turla-crutch-keeping-back-door-open/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1560", + "name": "Archive Collected Data", + "reference": "https://attack.mitre.org/techniques/T1560/", + "subtechnique": [ + { + "id": "T1560.001", + "name": "Archive via Utility", + "reference": "https://attack.mitre.org/techniques/T1560/001/" + } + ] + }, + { + "id": "T1005", + "name": "Data from Local System", + "reference": "https://attack.mitre.org/techniques/T1005/" + } + ] + } + ], + "id": "1344a997-bf10-4eca-beda-ec2ac69311e5", + "rule_id": "45d273fb-1dca-457d-9855-bcb302180c21", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n ((process.name:\"rar.exe\" or process.code_signature.subject_name == \"win.rar GmbH\" or\n process.pe.original_file_name == \"Command line RAR\") and\n process.args == \"a\" and process.args : (\"-hp*\", \"-p*\", \"-dw\", \"-tb\", \"-ta\", \"/hp*\", \"/p*\", \"/dw\", \"/tb\", \"/ta\"))\n\n or\n (process.pe.original_file_name in (\"7z.exe\", \"7za.exe\") and\n process.args == \"a\" and process.args : (\"-p*\", \"-sdel\"))\n\n /* uncomment if noisy for backup software related FPs */\n /* not process.parent.executable : (\"C:\\\\Program Files\\\\*.exe\", \"C:\\\\Program Files (x86)\\\\*.exe\") */\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Local NTLM Relay via HTTP", + "description": "Identifies attempt to coerce a local NTLM authentication via HTTP using the Windows Printer Spooler service as a target. An adversary may use this primitive in combination with other techniques to elevate privileges on a compromised system.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/med0x2e/NTLMRelay2Self", + "https://github.com/topotam/PetitPotam", + "https://github.com/dirkjanm/krbrelayx/blob/master/printerbug.py" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1212", + "name": "Exploitation for Credential Access", + "reference": "https://attack.mitre.org/techniques/T1212/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.011", + "name": "Rundll32", + "reference": "https://attack.mitre.org/techniques/T1218/011/" + } + ] + } + ] + } + ], + "id": "a2eb0fdd-e3c7-4282-a201-e9a8e5eb2711", + "rule_id": "4682fd2c-cfae-47ed-a543-9bed37657aa6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"rundll32.exe\" and\n\n /* Rundll32 WbeDav Client */\n process.args : (\"?:\\\\Windows\\\\System32\\\\davclnt.dll,DavSetCookie\", \"?:\\\\Windows\\\\SysWOW64\\\\davclnt.dll,DavSetCookie\") and\n\n /* Access to named pipe via http */\n process.args : (\"http*/print/pipe/*\", \"http*/pipe/spoolss\", \"http*/pipe/srvsvc\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Remote Registry Access via SeBackupPrivilege", + "description": "Identifies remote access to the registry using an account with Backup Operators group membership. This may indicate an attempt to exfiltrate credentials by dumping the Security Account Manager (SAM) registry hive in preparation for credential access and privileges elevation.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Remote Registry Access via SeBackupPrivilege\n\nSeBackupPrivilege is a privilege that allows file content retrieval, designed to enable users to create backup copies of the system. Since it is impossible to make a backup of something you cannot read, this privilege comes at the cost of providing the user with full read access to the file system. This privilege must bypass any access control list (ACL) placed in the system.\n\nThis rule identifies remote access to the registry using an account with Backup Operators group membership. This may indicate an attempt to exfiltrate credentials by dumping the Security Account Manager (SAM) registry hive in preparation for credential access and privileges elevation.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the activities done by the subject user the login session. The field `winlog.event_data.SubjectLogonId` can be used to get this data.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate abnormal behaviors observed by the subject user such as network connections, registry or file modifications, and processes created.\n- Investigate if the registry file was retrieved or exfiltrated.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Limit or disable the involved user account to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring", + "Data Source: Active Directory" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/mpgn/BackupOperatorToDA", + "https://raw.githubusercontent.com/Wh04m1001/Random/main/BackupOperators.cpp", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.002", + "name": "Security Account Manager", + "reference": "https://attack.mitre.org/techniques/T1003/002/" + }, + { + "id": "T1003.004", + "name": "LSA Secrets", + "reference": "https://attack.mitre.org/techniques/T1003/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + } + ], + "id": "ab76129b-2529-4288-b804-942c49c4753e", + "rule_id": "47e22836-4a16-4b35-beee-98f6c4ee9bf2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.PrivilegeList", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.RelativeTargetName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectLogonId", + "type": "keyword", + "ecs": false + } + ], + "setup": "The 'Audit Detailed File Share' audit policy is required be configured (Success) on Domain Controllers and Sensitive Windows Servers.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nObject Access >\nAudit Detailed File Share (Success)\n```\n\nThe 'Special Logon' audit policy must be configured (Success).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nLogon/Logoff >\nSpecial Logon (Success)\n```", + "type": "eql", + "query": "sequence by winlog.computer_name, winlog.event_data.SubjectLogonId with maxspan=1m\n [iam where event.action == \"logged-in-special\" and\n winlog.event_data.PrivilegeList : \"SeBackupPrivilege\" and\n\n /* excluding accounts with existing privileged access */\n not winlog.event_data.PrivilegeList : \"SeDebugPrivilege\"]\n [any where event.action == \"Detailed File Share\" and winlog.event_data.RelativeTargetName : \"winreg\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Microsoft Exchange Server UM Spawning Suspicious Processes", + "description": "Identifies suspicious processes being spawned by the Microsoft Exchange Server Unified Messaging (UM) service. This activity has been observed exploiting CVE-2021-26857.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Legitimate processes may be spawned from the Microsoft Exchange Server Unified Messaging (UM) service. If known processes are causing false positives, they can be exempted from the rule." + ], + "references": [ + "https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers", + "https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "ad3c300e-a931-44ba-828d-fa3d9c499aaf", + "rule_id": "483c4daf-b0c6-49e0-adf3-0bfa93231d6b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"UMService.exe\", \"UMWorkerProcess.exe\") and\n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\werfault.exe\",\n \"?:\\\\Windows\\\\System32\\\\wermgr.exe\",\n \"?:\\\\Program Files\\\\Microsoft\\\\Exchange Server\\\\V??\\\\Bin\\\\UMWorkerProcess.exe\",\n \"D:\\\\Exchange 2016\\\\Bin\\\\UMWorkerProcess.exe\",\n \"E:\\\\ExchangeServer\\\\Bin\\\\UMWorkerProcess.exe\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Multiple Logon Failure from the same Source Address", + "description": "Identifies multiple consecutive logon failures from the same source address and within a short time interval. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to accounts.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Multiple Logon Failure from the same Source Address\n\nAdversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to guess the password using a repetitive or iterative mechanism systematically. More details can be found [here](https://attack.mitre.org/techniques/T1110/001/).\n\nThis rule identifies potential password guessing/brute force activity from a single address.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the logon failure reason code and the targeted user names.\n - Prioritize the investigation if the account is critical or has administrative privileges over the domain.\n- Investigate the source IP address of the failed Network Logon attempts.\n - Identify whether these attempts are coming from the internet or are internal.\n- Investigate other alerts associated with the involved users and source host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Examine the source host for derived artifacts that indicate compromise:\n - Observe and collect information about the following activities in the alert source host:\n - Attempts to contact external domains and addresses.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the host which is the source of this activity\n\n### False positive analysis\n\n- Understand the context of the authentications by contacting the asset owners. This activity can be related to a new or existing automation or business process that is in a failing state.\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Domain trust relationship issues.\n- Infrastructure or availability issues.\n\n### Related rules\n\n- Multiple Logon Failure Followed by Logon Success - 4e85dc8a-3e41-40d8-bc28-91af7ac6cf60\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the source host to prevent further post-compromise behavior.\n- If the asset is exposed to the internet with RDP or other remote services available, take the necessary measures to restrict access to the asset. If not possible, limit the access via the firewall to only the needed IP addresses. Also, ensure the system uses robust authentication mechanisms and is patched regularly.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n-", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625", + "https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4624", + "https://social.technet.microsoft.com/Forums/ie/en-US/c82ac4f3-a235-472c-9fd3-53aa646cfcfd/network-information-missing-in-event-id-4624?forum=winserversecurity", + "https://serverfault.com/questions/379092/remote-desktop-failed-logon-event-4625-not-logging-ip-address-on-2008-terminal-s/403638#403638" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/", + "subtechnique": [ + { + "id": "T1110.001", + "name": "Password Guessing", + "reference": "https://attack.mitre.org/techniques/T1110/001/" + }, + { + "id": "T1110.003", + "name": "Password Spraying", + "reference": "https://attack.mitre.org/techniques/T1110/003/" + } + ] + } + ] + } + ], + "id": "365daa9e-557a-4b8e-a2c3-522d08535990", + "rule_id": "48b6edfc-079d-4907-b43c-baffa243270d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.Status", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.logon.type", + "type": "unknown", + "ecs": false + } + ], + "setup": "In some cases the source network address in Windows events 4625/4624 is not populated due to Microsoft logging limitations (examples in the references links). This edge case will break the rule condition and it won't trigger an alert.", + "type": "eql", + "query": "sequence by winlog.computer_name, source.ip with maxspan=10s\n [authentication where event.action == \"logon-failed\" and\n /* event 4625 need to be logged */\n winlog.logon.type : \"Network\" and\n source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and\n not user.name : (\"ANONYMOUS LOGON\", \"-\", \"*$\") and not user.domain == \"NT AUTHORITY\" and\n\n /*\n noisy failure status codes often associated to authentication misconfiguration :\n 0xC000015B - The user has not been granted the requested logon type (also called the logon right) at this machine.\n 0XC000005E\t- There are currently no logon servers available to service the logon request.\n 0XC0000133\t- Clocks between DC and other computer too far out of sync.\n 0XC0000192\tAn attempt was made to logon, but the Netlogon service was not started.\n */\n not winlog.event_data.Status : (\"0xC000015B\", \"0XC000005E\", \"0XC0000133\", \"0XC0000192\")] with runs=10\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Potential Linux Backdoor User Account Creation", + "description": "Identifies the attempt to create a new backdoor user by setting the user's UID to 0. Attackers may alter a user's UID to 0 to establish persistence on a system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Linux Backdoor User Account Creation\n\nThe `usermod` command is used to modify user account attributes and settings in Linux-based operating systems.\n\nAttackers may create new accounts with a UID of 0 to maintain root access to target systems without leveraging the root user account.\n\nThis rule identifies the usage of the `usermod` command to set a user's UID to 0, indicating that the user becomes a root account. \n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible investigation steps\n- Investigate the user account that got assigned a uid of 0, and analyze its corresponding attributes.\n - !{osquery{\"label\":\"Osquery - Retrieve User Accounts with a UID of 0\",\"query\":\"SELECT description, gid, gid_signed, shell, uid, uid_signed, username FROM users WHERE username != 'root' AND uid LIKE '0'\"}}\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Identify the user account that performed the action, analyze it, and check whether it should perform this kind of action.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific User\",\"query\":\"SELECT * FROM users WHERE username = {{user.name}}\"}}\n- Investigate whether the user is currently logged in and active.\n - !{osquery{\"label\":\"Osquery - Investigate the Account Authentication Status\",\"query\":\"SELECT * FROM logged_in_users WHERE user = {{user.name}}\"}}\n- Identify if the account was added to privileged groups or assigned special privileges after creation.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific Group\",\"query\":\"SELECT * FROM groups WHERE groupname = {{group.name}}\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Delete the created account.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1136/001/" + } + ] + } + ] + } + ], + "id": "31c5c7a8-8026-4110-b6eb-3c16f66b6583", + "rule_id": "494ebba4-ecb7-4be4-8c6f-654c686549ad", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and\nevent.action in (\"exec\", \"exec_event\") and process.name == \"usermod\" and\nprocess.args : \"-u\" and process.args : \"0\" and process.args : \"-o\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Possible FIN7 DGA Command and Control Behavior", + "description": "This rule detects a known command and control pattern in network events. The FIN7 threat group is known to use this command and control technique, while maintaining persistence in their target's network.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\nIn the event this rule identifies benign domains in your environment, the `destination.domain` field in the rule can be modified to include those domains. Example: `...AND NOT destination.domain:(zoom.us OR benign.domain1 OR benign.domain2)`.", + "version": 104, + "tags": [ + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Domain: Endpoint" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "This rule could identify benign domains that are formatted similarly to FIN7's command and control algorithm. Alerts should be investigated by an analyst to assess the validity of the individual observations." + ], + "references": [ + "https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + }, + { + "id": "T1568", + "name": "Dynamic Resolution", + "reference": "https://attack.mitre.org/techniques/T1568/", + "subtechnique": [ + { + "id": "T1568.002", + "name": "Domain Generation Algorithms", + "reference": "https://attack.mitre.org/techniques/T1568/002/" + } + ] + } + ] + } + ], + "id": "7d847d49-a1a2-44c6-b197-e659c43b136c", + "rule_id": "4a4e23cf-78a2-449c-bac3-701924c269d3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: (network_traffic.tls OR network_traffic.http) or\n (event.category: (network OR network_traffic) AND type: (tls OR http) AND network.transport: tcp)) AND\ndestination.domain:/[a-zA-Z]{4,5}\\.(pw|us|club|info|site|top)/ AND NOT destination.domain:zoom.us\n", + "language": "lucene" + }, + { + "name": "Kernel Load or Unload via Kexec Detected", + "description": "This detection rule identifies the usage of kexec, helping to uncover unauthorized kernel replacements and potential compromise of the system's integrity. Kexec is a Linux feature that enables the loading and execution of a different kernel without going through the typical boot process. Malicious actors can abuse kexec to bypass security measures, escalate privileges, establish persistence or hide their activities by loading a malicious kernel, enabling them to tamper with the system's trusted state, allowing e.g. a VM Escape.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.crowdstrike.com/blog/venom-vulnerability-details/", + "https://www.makeuseof.com/what-is-venom-vulnerability/", + "https://madaidans-insecurities.github.io/guides/linux-hardening.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1611", + "name": "Escape to Host", + "reference": "https://attack.mitre.org/techniques/T1611/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.006", + "name": "Kernel Modules and Extensions", + "reference": "https://attack.mitre.org/techniques/T1547/006/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1601", + "name": "Modify System Image", + "reference": "https://attack.mitre.org/techniques/T1601/", + "subtechnique": [ + { + "id": "T1601.001", + "name": "Patch System Image", + "reference": "https://attack.mitre.org/techniques/T1601/001/" + } + ] + } + ] + } + ], + "id": "d27c06f6-5e30-4175-9c32-e6cc7a2bbef2", + "rule_id": "4d4c35f4-414e-4d0c-bb7e-6db7c80a6957", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and process.name == \"kexec\" and \nprocess.args in (\"--exec\", \"-e\", \"--load\", \"-l\", \"--unload\", \"-u\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "AWS Management Console Brute Force of Root User Identity", + "description": "Identifies a high number of failed authentication attempts to the AWS management console for the Root user identity. An adversary may attempt to brute force the password for the Root user identity, as it has complete access to all services and resources for the AWS account.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-20m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false positives." + ], + "references": [ + "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "6b8edb3d-de77-41c7-86b3-58481c6b603d", + "rule_id": "4d50a94f-2844-43fa-8395-6afbd5e1c5ef", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "aws.cloudtrail.user_identity.type", + "type": "keyword", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "threshold", + "query": "event.dataset:aws.cloudtrail and event.provider:signin.amazonaws.com and event.action:ConsoleLogin and aws.cloudtrail.user_identity.type:Root and event.outcome:failure\n", + "threshold": { + "field": [ + "cloud.account.id" + ], + "value": 10 + }, + "index": [ + "filebeat-*", + "logs-aws*" + ], + "language": "kuery" + }, + { + "name": "Disable Windows Event and Security Logs Using Built-in Tools", + "description": "Identifies attempts to disable EventLog via the logman Windows utility, PowerShell, or auditpol. This is often done by attackers in an attempt to evade detection on a system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Disable Windows Event and Security Logs Using Built-in Tools\n\nWindows event logs are a fundamental data source for security monitoring, forensics, and incident response. Adversaries can tamper, clear, and delete this data to break SIEM detections, cover their tracks, and slow down incident response.\n\nThis rule looks for the usage of different utilities to disable the EventLog service or specific event logs.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Investigate the event logs prior to the action for suspicious behaviors that an attacker may be trying to cover up.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Re-enable affected logging components, services, and security monitoring.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Ivan Ninichuck", + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/logman", + "https://medium.com/palantir/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.001", + "name": "Clear Windows Event Logs", + "reference": "https://attack.mitre.org/techniques/T1070/001/" + } + ] + }, + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.002", + "name": "Disable Windows Event Logging", + "reference": "https://attack.mitre.org/techniques/T1562/002/" + }, + { + "id": "T1562.006", + "name": "Indicator Blocking", + "reference": "https://attack.mitre.org/techniques/T1562/006/" + } + ] + } + ] + } + ], + "id": "e89951c6-3d4a-45e9-ac6e-7eca2bfe927c", + "rule_id": "4de76544-f0e5-486a-8f84-eae0b6063cdc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n ((process.name:\"logman.exe\" or process.pe.original_file_name == \"Logman.exe\") and\n process.args : \"EventLog-*\" and process.args : (\"stop\", \"delete\")) or\n\n ((process.name : (\"pwsh.exe\", \"powershell.exe\", \"powershell_ise.exe\") or process.pe.original_file_name in\n (\"pwsh.exe\", \"powershell.exe\", \"powershell_ise.exe\")) and\n\tprocess.args : \"Set-Service\" and process.args: \"EventLog\" and process.args : \"Disabled\") or\n\n ((process.name:\"auditpol.exe\" or process.pe.original_file_name == \"AUDITPOL.EXE\") and process.args : \"/success:disable\")\n)\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Multiple Logon Failure Followed by Logon Success", + "description": "Identifies multiple logon failures followed by a successful one from the same source address. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to accounts.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Multiple Logon Failure Followed by Logon Success\n\nAdversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to guess the password using a repetitive or iterative mechanism systematically. More details can be found [here](https://attack.mitre.org/techniques/T1110/001/).\n\nThis rule identifies potential password guessing/brute force activity from a single address, followed by a successful logon, indicating that an attacker potentially successfully compromised the account.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the logon failure reason code and the targeted user name.\n - Prioritize the investigation if the account is critical or has administrative privileges over the domain.\n- Investigate the source IP address of the failed Network Logon attempts.\n - Identify whether these attempts are coming from the internet or are internal.\n- Investigate other alerts associated with the involved users and source host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Examine the source host for derived artifacts that indicate compromise:\n - Observe and collect information about the following activities in the alert source host:\n - Attempts to contact external domains and addresses.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the host which is the source of this activity.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Domain trust relationship issues.\n- Infrastructure or availability issues.\n\n### Related rules\n\n- Multiple Logon Failure from the same Source Address - 48b6edfc-079d-4907-b43c-baffa243270d\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the source host to prevent further post-compromise behavior.\n- If the asset is exposed to the internet with RDP or other remote services available, take the necessary measures to restrict access to the asset. If not possible, limit the access via the firewall to only the needed IP addresses. Also, ensure the system uses robust authentication mechanisms and is patched regularly.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/", + "subtechnique": [ + { + "id": "T1110.001", + "name": "Password Guessing", + "reference": "https://attack.mitre.org/techniques/T1110/001/" + }, + { + "id": "T1110.003", + "name": "Password Spraying", + "reference": "https://attack.mitre.org/techniques/T1110/003/" + } + ] + } + ] + } + ], + "id": "c04339dc-21d5-4f19-ad3f-a62b95330a3b", + "rule_id": "4e85dc8a-3e41-40d8-bc28-91af7ac6cf60", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.Status", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.logon.type", + "type": "unknown", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "sequence by winlog.computer_name, source.ip with maxspan=5s\n [authentication where event.action == \"logon-failed\" and\n /* event 4625 need to be logged */\n winlog.logon.type : \"Network\" and\n source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and\n not user.name : (\"ANONYMOUS LOGON\", \"-\", \"*$\") and not user.domain == \"NT AUTHORITY\" and\n\n /* noisy failure status codes often associated to authentication misconfiguration */\n not winlog.event_data.Status : (\"0xC000015B\", \"0XC000005E\", \"0XC0000133\", \"0XC0000192\")] with runs=5\n [authentication where event.action == \"logged-in\" and\n /* event 4624 need to be logged */\n winlog.logon.type : \"Network\" and\n source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and\n not user.name : (\"ANONYMOUS LOGON\", \"-\", \"*$\") and not user.domain == \"NT AUTHORITY\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Execution via MSSQL xp_cmdshell Stored Procedure", + "description": "Identifies execution via MSSQL xp_cmdshell stored procedure. Malicious users may attempt to elevate their privileges by using xp_cmdshell, which is disabled by default, thus, it's important to review the context of it's use.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Execution via MSSQL xp_cmdshell Stored Procedure\n\nMicrosoft SQL Server (MSSQL) has procedures meant to extend its functionality, the Extended Stored Procedures. These procedures are external functions written in C/C++; some provide interfaces for external programs. This is the case for xp_cmdshell, which spawns a Windows command shell and passes in a string for execution. Attackers can use this to execute commands on the system running the SQL server, commonly to escalate their privileges and establish persistence.\n\nThe xp_cmdshell procedure is disabled by default, but when used, it has the same security context as the MSSQL Server service account, which is often privileged.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the command line to determine if the command executed is potentially harmful or malicious.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n\n### False positive analysis\n\n- This mechanism can be used legitimately, but it brings inherent risk. The security team must monitor any activity of it. If recurrent tasks are being executed using this mechanism, consider adding exceptions — preferably with a full command line.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Ensure that SQL servers are not directly exposed to the internet. If there is a business justification for such, use an allowlist to allow only connections from known legitimate sources.\n- Disable the xp_cmdshell stored procedure.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1505", + "name": "Server Software Component", + "reference": "https://attack.mitre.org/techniques/T1505/", + "subtechnique": [ + { + "id": "T1505.001", + "name": "SQL Stored Procedures", + "reference": "https://attack.mitre.org/techniques/T1505/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + } + ], + "id": "8d657d1e-537f-49a2-ab7d-e95c5c3e7f02", + "rule_id": "4ed493fc-d637-4a36-80ff-ac84937e5461", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"sqlservr.exe\" and \n (\n (process.name : \"cmd.exe\" and \n not process.args : (\"\\\\\\\\*\", \"diskfree\", \"rmdir\", \"mkdir\", \"dir\", \"del\", \"rename\", \"bcp\", \"*XMLNAMESPACES*\", \n \"?:\\\\MSSQL\\\\Backup\\\\Jobs\\\\sql_agent_backup_job.ps1\", \"K:\\\\MSSQL\\\\Backup\\\\msdb\", \"K:\\\\MSSQL\\\\Backup\\\\Logins\")) or \n \n (process.name : \"vpnbridge.exe\" or process.pe.original_file_name : \"vpnbridge.exe\") or \n\n (process.name : \"certutil.exe\" or process.pe.original_file_name == \"CertUtil.exe\") or \n\n (process.name : \"bitsadmin.exe\" or process.pe.original_file_name == \"bitsadmin.exe\")\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Script Object Execution", + "description": "Identifies scrobj.dll loaded into unusual Microsoft processes. This usually means a malicious scriptlet is being executed in the target process.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.010", + "name": "Regsvr32", + "reference": "https://attack.mitre.org/techniques/T1218/010/" + } + ] + } + ] + } + ], + "id": "13c17606-823b-4b55-8547-8aa0ba2fa5e1", + "rule_id": "4ed678a9-3a4f-41fb-9fea-f85a6e0a0dff", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id with maxspan=2m\n [process where host.os.type == \"windows\" and event.type == \"start\"\n and (process.code_signature.subject_name in (\"Microsoft Corporation\", \"Microsoft Windows\") and\n process.code_signature.trusted == true) and\n not process.executable : (\n \"?:\\\\Windows\\\\System32\\\\cscript.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\cscript.exe\",\n \"?:\\\\Program Files (x86)\\\\Internet Explorer\\\\iexplore.exe\",\n \"?:\\\\Program Files\\\\Internet Explorer\\\\iexplore.exe\",\n \"?:\\\\Windows\\\\SystemApps\\\\Microsoft.MicrosoftEdge_*\\\\MicrosoftEdge.exe\",\n \"?:\\\\Windows\\\\system32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\smartscreen.exe\",\n \"?:\\\\Windows\\\\system32\\\\taskhostw.exe\",\n \"?:\\\\windows\\\\system32\\\\inetsrv\\\\w3wp.exe\",\n \"?:\\\\windows\\\\SysWOW64\\\\inetsrv\\\\w3wp.exe\",\n \"?:\\\\Windows\\\\system32\\\\wscript.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\wscript.exe\",\n \"?:\\\\Windows\\\\system32\\\\mobsync.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\mobsync.exe\",\n \"?:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\cmd.exe\")]\n [library where host.os.type == \"windows\" and event.type == \"start\" and dll.name : \"scrobj.dll\"]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Execution via TSClient Mountpoint", + "description": "Identifies execution from the Remote Desktop Protocol (RDP) shared mountpoint tsclient on the target host. This may indicate a lateral movement attempt.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://posts.specterops.io/revisiting-remote-desktop-lateral-movement-8fb905cb46c3" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.001", + "name": "Remote Desktop Protocol", + "reference": "https://attack.mitre.org/techniques/T1021/001/" + } + ] + } + ] + } + ], + "id": "a7ea98bc-d0f8-44c9-9795-a363c220e7ef", + "rule_id": "4fe9d835-40e1-452d-8230-17c147cafad8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.executable : \"\\\\Device\\\\Mup\\\\tsclient\\\\*.exe\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Registry Persistence via AppCert DLL", + "description": "Detects attempts to maintain persistence by creating registry keys using AppCert DLLs. AppCert DLLs are loaded by every process using the common API functions to create processes.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.009", + "name": "AppCert DLLs", + "reference": "https://attack.mitre.org/techniques/T1546/009/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.009", + "name": "AppCert DLLs", + "reference": "https://attack.mitre.org/techniques/T1546/009/" + } + ] + } + ] + } + ], + "id": "6a69eaca-0b68-4c1a-bb57-ba0ce9f64816", + "rule_id": "513f0ffd-b317-4b9c-9494-92ce861f22c7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n/* uncomment once stable length(bytes_written_string) > 0 and */\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Session Manager\\\\AppCertDLLs\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Session Manager\\\\AppCertDLLs\\\\*\"\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Incoming DCOM Lateral Movement with MMC", + "description": "Identifies the use of Distributed Component Object Model (DCOM) to run commands from a remote host, which are launched via the MMC20 Application COM Object. This behavior may indicate an attacker abusing a DCOM application to move laterally.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.003", + "name": "Distributed Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1021/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.014", + "name": "MMC", + "reference": "https://attack.mitre.org/techniques/T1218/014/" + } + ] + } + ] + } + ], + "id": "2973a8d8-0d0b-4207-bfd8-714b0dd6d64d", + "rule_id": "51ce96fb-9e52-4dad-b0ba-99b54440fc9a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "source.port", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=1m\n [network where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"mmc.exe\" and source.port >= 49152 and\n destination.port >= 49152 and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\"\n ] by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"mmc.exe\"\n ] by process.parent.entity_id\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "AWS GuardDuty Detector Deletion", + "description": "Identifies the deletion of an Amazon GuardDuty detector. Upon deletion, GuardDuty stops monitoring the environment and all existing findings are lost.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "The GuardDuty detector may be deleted by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Detector deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/guardduty/delete-detector.html", + "https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DeleteDetector.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "212fb504-849d-4786-ae10-6dc03fd2f6ed", + "rule_id": "523116c0-d89d-4d7c-82c2-39e6845a78ef", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:guardduty.amazonaws.com and event.action:DeleteDetector and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Suspicious Network Activity to the Internet by Previously Unknown Executable", + "description": "This rule monitors for network connectivity to the internet from a previously unknown executable located in a suspicious directory to a previously unknown destination ip. An alert from this rule can indicate the presence of potentially malicious activity, such as the execution of unauthorized or suspicious processes attempting to establish connections to unknown or suspicious destinations such as a command and control server. Detecting and investigating such behavior can help identify and mitigate potential security threats, protecting the system and its data from potential compromise.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-59m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + } + ], + "id": "fa788af4-7309-42ec-aaad-9e502f4c87d4", + "rule_id": "53617418-17b4-4e9c-8a2c-8deb8086ca4b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type:linux and event.category:network and event.action:(connection_attempted or ipv4_connection_attempt_event) and \nprocess.executable:(\n (/etc/crontab or /etc/rc.local or ./* or /boot/* or /dev/shm/* or /etc/cron.*/* or /etc/init.d/* or /etc/rc*.d/* or \n /etc/update-motd.d/* or /home/*/.* or /run/* or /srv/* or /tmp/* or /usr/lib/update-notifier/* or /var/tmp/*\n ) and not (/tmp/newroot/* or /tmp/snap.rootfs*)\n ) and \nsource.ip:(10.0.0.0/8 or 127.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and \nnot process.name:(\n apt or chrome or curl or dnf or dockerd or dpkg or firefox-bin or java or kite-update or kited or node or rpm or\n saml2aws or wget or yum or ansible* or aws* or php* or pip* or python* or steam* or terraform*\n) and \nnot destination.ip:(\n 10.0.0.0/8 or 100.64.0.0/10 or 127.0.0.0/8 or 169.254.0.0/16 or 172.16.0.0/12 or 192.0.0.0/24 or 192.0.0.0/29 or \n 192.0.0.10/32 or 192.0.0.170/32 or 192.0.0.171/32 or 192.0.0.8/32 or 192.0.0.9/32 or 192.0.2.0/24 or \n 192.168.0.0/16 or 192.175.48.0/24 or 192.31.196.0/24 or 192.52.193.0/24 or 192.88.99.0/24 or 198.18.0.0/15 or \n 198.51.100.0/24 or 203.0.113.0/24 or 224.0.0.0/4 or 240.0.0.0/4 or \"::1\" or \"FE80::/10\" or \"FF00::/8\"\n)\n", + "new_terms_fields": [ + "host.id", + "destination.ip", + "process.executable" + ], + "history_window_start": "now-14d", + "index": [ + "auditbeat-*", + "filebeat-*", + "packetbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "AWS EFS File System or Mount Deleted", + "description": "Detects when an EFS File System or Mount is deleted. An adversary could break any file system using the mount target that is being deleted, which might disrupt instances or applications using those mounts. The mount must be deleted prior to deleting the File System, or the adversary will be unable to delete the File System.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "File System or Mount being deleted may be performed by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. File System Mount deletion by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/efs/latest/ug/API_DeleteFileSystem.html", + "https://docs.aws.amazon.com/efs/latest/ug/API_DeleteMountTarget.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + } + ], + "id": "f88d5583-9a3e-4ec1-ac87-3382de3705a1", + "rule_id": "536997f7-ae73-447d-a12d-bff1e8f5f0a0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:elasticfilesystem.amazonaws.com and\nevent.action:(DeleteMountTarget or DeleteFileSystem) and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Suspicious PDF Reader Child Process", + "description": "Identifies suspicious child processes of PDF reader applications. These child processes are often launched via exploitation of PDF applications or social engineering.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious PDF Reader Child Process\n\nPDF is a common file type used in corporate environments and most machines have software to handle these files. This creates a vector where attackers can exploit the engines and technology behind this class of software for initial access or privilege escalation.\n\nThis rule looks for commonly abused built-in utilities spawned by a PDF reader process, which is likely a malicious behavior.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve PDF documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Initial Access", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1203", + "name": "Exploitation for Client Execution", + "reference": "https://attack.mitre.org/techniques/T1203/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + } + ] + } + ] + } + ], + "id": "36bf8c36-3801-475d-a29f-07933c6d5f7d", + "rule_id": "53a26770-9cbd-40c5-8b57-61d01a325e14", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"AcroRd32.exe\",\n \"Acrobat.exe\",\n \"FoxitPhantomPDF.exe\",\n \"FoxitReader.exe\") and\n process.name : (\"arp.exe\", \"dsquery.exe\", \"dsget.exe\", \"gpresult.exe\", \"hostname.exe\", \"ipconfig.exe\", \"nbtstat.exe\",\n \"net.exe\", \"net1.exe\", \"netsh.exe\", \"netstat.exe\", \"nltest.exe\", \"ping.exe\", \"qprocess.exe\",\n \"quser.exe\", \"qwinsta.exe\", \"reg.exe\", \"sc.exe\", \"systeminfo.exe\", \"tasklist.exe\", \"tracert.exe\",\n \"whoami.exe\", \"bginfo.exe\", \"cdb.exe\", \"cmstp.exe\", \"csi.exe\", \"dnx.exe\", \"fsi.exe\", \"ieexec.exe\",\n \"iexpress.exe\", \"installutil.exe\", \"Microsoft.Workflow.Compiler.exe\", \"msbuild.exe\", \"mshta.exe\",\n \"msxsl.exe\", \"odbcconf.exe\", \"rcsi.exe\", \"regsvr32.exe\", \"xwizard.exe\", \"atbroker.exe\",\n \"forfiles.exe\", \"schtasks.exe\", \"regasm.exe\", \"regsvcs.exe\", \"cmd.exe\", \"cscript.exe\",\n \"powershell.exe\", \"pwsh.exe\", \"wmic.exe\", \"wscript.exe\", \"bitsadmin.exe\", \"certutil.exe\", \"ftp.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Uncommon Registry Persistence Change", + "description": "Detects changes to registry persistence keys that are not commonly used or modified by legitimate programs. This could be an indication of an adversary's attempt to persist in a stealthy manner.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "timeline_id": "3e47ef71-ebfc-4520-975c-cb27fc090799", + "timeline_title": "Comprehensive Registry Timeline", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.microsoftpressstore.com/articles/article.aspx?p=2762082&seqNum=2" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + } + ] + }, + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.002", + "name": "Screensaver", + "reference": "https://attack.mitre.org/techniques/T1546/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "189355a5-e010-4eaf-9738-69a8648e9858", + "rule_id": "54902e45-3467-49a4-8abc-529f2c8cfb80", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n /* uncomment once stable length(registry.data.strings) > 0 and */\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Terminal Server\\\\Install\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Terminal Server\\\\Install\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Runonce\\\\*\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\Load\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\Run\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\IconServiceLib\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\AppSetup\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Taskman\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Userinit\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\VmApplet\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\Shell\",\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logoff\\\\Script\",\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logon\\\\Script\",\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Shutdown\\\\Script\",\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Startup\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\Shell\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logoff\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logon\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Shutdown\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Startup\\\\Script\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Active Setup\\\\Installed Components\\\\*\\\\ShellComponent\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows CE Services\\\\AutoStartOnConnect\\\\MicrosoftActiveSync\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows CE Services\\\\AutoStartOnDisconnect\\\\MicrosoftActiveSync\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Ctf\\\\LangBarAddin\\\\*\\\\FilePath\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Exec\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Script\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Command Processor\\\\Autorun\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Ctf\\\\LangBarAddin\\\\*\\\\FilePath\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Exec\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Command Processor\\\\Autorun\",\n \"HKEY_USERS\\\\*\\\\Control Panel\\\\Desktop\\\\scrnsave.exe\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Image File Execution Options\\\\*\\\\VerifierDlls\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\GpExtensions\\\\*\\\\DllName\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\SafeBoot\\\\AlternateShell\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Terminal Server\\\\Wds\\\\rdpwd\\\\StartupPrograms\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Terminal Server\\\\WinStations\\\\RDP-Tcp\\\\InitialProgram\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Session Manager\\\\BootExecute\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Session Manager\\\\SetupExecute\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Session Manager\\\\Execute\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Session Manager\\\\S0InitialCommand\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\ServiceControlManagerExtension\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\BootVerificationProgram\\\\ImagePath\",\n \"HKLM\\\\SYSTEM\\\\Setup\\\\CmdLine\",\n \"HKEY_USERS\\\\*\\\\Environment\\\\UserInitMprLogonScript\") and\n\n not registry.data.strings : (\"C:\\\\Windows\\\\system32\\\\userinit.exe\", \"cmd.exe\", \"C:\\\\Program Files (x86)\\\\*.exe\",\n \"C:\\\\Program Files\\\\*.exe\") and\n not (process.name : \"rundll32.exe\" and registry.path : \"*\\\\Software\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Script\") and\n not process.executable : (\"C:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"C:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\",\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\*\\\\MsMpEng.exe\",\n \"C:\\\\Program Files\\\\*.exe\",\n \"C:\\\\Program Files (x86)\\\\*.exe\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "PsExec Network Connection", + "description": "Identifies use of the SysInternals tool PsExec.exe making a network connection. This could be an indication of lateral movement.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PsExec Network Connection\n\nPsExec is a remote administration tool that enables the execution of commands with both regular and SYSTEM privileges on Windows systems. Microsoft develops it as part of the Sysinternals Suite. Although commonly used by administrators, PsExec is frequently used by attackers to enable lateral movement and execute commands as SYSTEM to disable defenses and bypass security protections.\n\nThis rule identifies PsExec execution by looking for the creation of `PsExec.exe`, the default name for the utility, followed by a network connection done by the process.\n\n#### Possible investigation steps\n\n- Check if the usage of this tool complies with the organization's administration policy.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Identify the target computer and its role in the IT environment.\n- Investigate what commands were run, and assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. As long as the analyst did not identify suspicious activity related to the user or involved hosts, and the tool is allowed by the organization's policy, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n - Prioritize cases involving critical servers and users.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Lateral Movement", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "PsExec is a dual-use tool that can be used for benign or malicious activity. It's important to baseline your environment to determine the amount of noise to expect from this tool." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1569", + "name": "System Services", + "reference": "https://attack.mitre.org/techniques/T1569/", + "subtechnique": [ + { + "id": "T1569.002", + "name": "Service Execution", + "reference": "https://attack.mitre.org/techniques/T1569/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.002", + "name": "SMB/Windows Admin Shares", + "reference": "https://attack.mitre.org/techniques/T1021/002/" + } + ] + }, + { + "id": "T1570", + "name": "Lateral Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1570/" + } + ] + } + ], + "id": "8f995afc-9d54-4114-bc48-3e0122bd6f2d", + "rule_id": "55d551c6-333b-4665-ab7e-5d14a59715ce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"PsExec.exe\" and event.type == \"start\" and\n\n /* This flag suppresses the display of the license dialog and may\n indicate that psexec executed for the first time in the machine */\n process.args : \"-accepteula\" and\n\n not process.executable : (\"?:\\\\ProgramData\\\\Docusnap\\\\Discovery\\\\discovery\\\\plugins\\\\17\\\\Bin\\\\psexec.exe\",\n \"?:\\\\Docusnap 11\\\\Bin\\\\psexec.exe\",\n \"?:\\\\Program Files\\\\Docusnap X\\\\Bin\\\\psexec.exe\",\n \"?:\\\\Program Files\\\\Docusnap X\\\\Tools\\\\dsDNS.exe\") and\n not process.parent.executable : \"?:\\\\Program Files (x86)\\\\Cynet\\\\Cynet Scanner\\\\CynetScanner.exe\"]\n [network where host.os.type == \"windows\" and process.name : \"PsExec.exe\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "PowerShell PSReflect Script", + "description": "Detects the use of PSReflect in PowerShell scripts. Attackers leverage PSReflect as a library that enables PowerShell to access win32 API functions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell PSReflect Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nPSReflect is a library that enables PowerShell to access win32 API functions in an uncomplicated way. It also helps to create enums and structs easily—all without touching the disk.\n\nAlthough this is an interesting project for every developer and admin out there, it is mainly used in the red team and malware tooling for its capabilities.\n\nDetecting the core implementation of PSReflect means detecting most of the tooling that uses Windows API through PowerShell, enabling defenders to discover tools being dropped in the environment.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics. The script content that may be split into multiple script blocks (you can use the field `powershell.file.script_block_id` for filtering).\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Check for additional PowerShell and command-line logs that indicate that imported functions were run.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the script using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- PowerShell Suspicious Discovery Related Windows API Functions - 61ac3638-40a3-44b2-855a-985636ca985e\n- PowerShell Keylogging Script - bd2c86a0-8b61-4457-ab38-96943984e889\n- PowerShell Suspicious Script with Audio Capture Capabilities - 2f2f4939-0b34-40c2-a0a3-844eb7889f43\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n- Suspicious .NET Reflection via PowerShell - e26f042e-c590-4e82-8e05-41e81bd822ad\n- PowerShell Suspicious Payload Encoded and Compressed - 81fe9dc6-a2d7-4192-a2d8-eed98afc766a\n- PowerShell Suspicious Script with Screenshot Capabilities - 959a7353-1129-4aa7-9084-30746b256a70\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate PowerShell scripts that make use of PSReflect to access the win32 API" + ], + "references": [ + "https://github.com/mattifestation/PSReflect/blob/master/PSReflect.psm1", + "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + }, + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + } + ], + "id": "a5bf6198-b9bb-4377-aa80-e265fe1936e2", + "rule_id": "56f2e9b5-4803-4e44-a0a4-a52dc79d57fe", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be configured (Enable).\n\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text:(\n \"New-InMemoryModule\" or\n \"Add-Win32Type\" or\n psenum or\n DefineDynamicAssembly or\n DefineDynamicModule or\n \"Reflection.TypeAttributes\" or\n \"Reflection.Emit.OpCodes\" or\n \"Reflection.Emit.CustomAttributeBuilder\" or\n \"Runtime.InteropServices.DllImportAttribute\"\n ) and\n not user.id : \"S-1-5-18\" and\n not file.path : ?\\:\\\\\\\\ProgramData\\\\\\\\MaaS360\\\\\\\\Cloud?Extender\\\\\\\\AR\\\\\\\\Scripts\\\\\\\\ASModuleCommon.ps1*\n", + "language": "kuery" + }, + { + "name": "Execution of an Unsigned Service", + "description": "This rule identifies the execution of unsigned executables via service control manager (SCM). Adversaries may abuse SCM to execute malware or escalate privileges.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1569", + "name": "System Services", + "reference": "https://attack.mitre.org/techniques/T1569/", + "subtechnique": [ + { + "id": "T1569.002", + "name": "Service Execution", + "reference": "https://attack.mitre.org/techniques/T1569/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + } + ] + } + ] + } + ], + "id": "ff9dd57f-9932-4241-80f4-513092d99b52", + "rule_id": "56fdfcf1-ca7c-4fd9-951d-e215ee26e404", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.exists", + "type": "boolean", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type:windows and event.category:process and event.type:start and \nprocess.parent.executable:\"C:\\\\Windows\\\\System32\\\\services.exe\" and \n(process.code_signature.exists:false or process.code_signature.trusted:false)\n", + "new_terms_fields": [ + "host.id", + "process.executable", + "user.id" + ], + "history_window_start": "now-14d", + "index": [ + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "VNC (Virtual Network Computing) from the Internet", + "description": "This rule detects network events that may indicate the use of VNC traffic from the Internet. VNC is commonly used by system administrators to remotely control a system for maintenance or to use shared resources. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Tactic: Command and Control", + "Domain: Endpoint", + "Use Case: Threat Detection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "VNC connections may be received directly to Linux cloud server instances but such connections are usually made only by engineers. VNC is less common than SSH or RDP but may be required by some work-flows such as remote access and support for specialized software products or servers. Such work-flows are usually known and not unexpected. Usage that is unfamiliar to server or network owners can be unexpected and suspicious." + ], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1219", + "name": "Remote Access Software", + "reference": "https://attack.mitre.org/techniques/T1219/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + } + ], + "id": "10cadfee-c1f7-438b-941c-7ddcb5f59ecb", + "rule_id": "5700cb81-df44-46aa-a5d7-337798f53eb8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and destination.port >= 5800 and destination.port <= 5810 and\n not source.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n ) and\n destination.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n )\n", + "language": "kuery" + }, + { + "name": "Deleting Backup Catalogs with Wbadmin", + "description": "Identifies use of the wbadmin.exe to delete the backup catalog. Ransomware and other malware may do this to prevent system recovery.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Deleting Backup Catalogs with Wbadmin\n\nWindows Server Backup stores the details about your backups (what volumes are backed up and where the backups are located) in a file called a backup catalog, which ransomware victims can use to recover corrupted backup files. Deleting these files is a common step in threat actor playbooks.\n\nThis rule identifies the deletion of the backup catalog using the `wbadmin.exe` utility.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Check if any files on the host machine have been encrypted.\n\n### False positive analysis\n\n- Administrators can use this command to delete corrupted catalogs, but overall the activity is unlikely to be legitimate.\n\n### Related rules\n\n- Third-party Backup Files Deleted via Unexpected Process - 11ea6bec-ebde-4d71-a8e9-784948f8e3e9\n- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921\n- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4\n- Volume Shadow Copy Deletion via WMIC - dc9c1f74-dac3-48e3-b47f-eb79db358f57\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.\n- If any backups were affected:\n - Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Impact", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" + }, + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + } + ], + "id": "64dac267-1bea-4080-8f8d-eee15c0d2746", + "rule_id": "581add16-df76-42bb-af8e-c979bfb39a59", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"wbadmin.exe\" or process.pe.original_file_name == \"WBADMIN.EXE\") and\n process.args : \"catalog\" and process.args : \"delete\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Lateral Tool Transfer via SMB Share", + "description": "Identifies the creation or change of a Windows executable file over network shares. Adversaries may transfer tools or other files between systems in a compromised environment.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Lateral Tool Transfer via SMB Share\n\nAdversaries can use network shares to host tooling to support the compromise of other hosts in the environment. These tools can include discovery utilities, credential dumpers, malware, etc. Attackers can also leverage file shares that employees frequently access to host malicious files to gain a foothold in other machines.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve the created file and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity can happen legitimately. Consider adding exceptions if it is expected and noisy in your environment.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Review the privileges needed to write to the network share and restrict write access as needed.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.002", + "name": "SMB/Windows Admin Shares", + "reference": "https://attack.mitre.org/techniques/T1021/002/" + } + ] + }, + { + "id": "T1570", + "name": "Lateral Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1570/" + } + ] + } + ], + "id": "de1d4257-3ab1-4030-9776-01e9206b4d67", + "rule_id": "58bc134c-e8d2-4291-a552-b4b3e537c60b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.header_bytes", + "type": "unknown", + "ecs": false + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=30s\n [network where host.os.type == \"windows\" and event.type == \"start\" and process.pid == 4 and destination.port == 445 and\n network.direction : (\"incoming\", \"ingress\") and\n network.transport == \"tcp\" and source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ] by process.entity_id\n /* add more executable extensions here if they are not noisy in your environment */\n [file where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and process.pid == 4 and \n (file.Ext.header_bytes : \"4d5a*\" or file.extension : (\"exe\", \"scr\", \"pif\", \"com\", \"dll\"))] by process.entity_id\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "AWS CloudTrail Log Created", + "description": "Identifies the creation of an AWS log trail that specifies the settings for delivery of log data.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 206, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Log Auditing", + "Tactic: Collection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trail creations may be made by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Trail creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_CreateTrail.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/create-trail.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1530", + "name": "Data from Cloud Storage", + "reference": "https://attack.mitre.org/techniques/T1530/" + } + ] + } + ], + "id": "a1953b39-cb8f-4843-9481-b1f81806e74b", + "rule_id": "594e0cbf-86cc-45aa-9ff7-ff27db27d3ed", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:CreateTrail and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Unusual Linux User Discovery Activity", + "description": "Looks for commands related to system user or owner discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used to engage in system owner or user discovery in order to identify currently active or primary users of a system. This may be a precursor to additional discovery, credential dumping or privilege elevation activity.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Discovery" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon user command activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1033", + "name": "System Owner/User Discovery", + "reference": "https://attack.mitre.org/techniques/T1033/" + } + ] + } + ], + "id": "7b7f4401-25f6-4c7d-b216-2613be7c72c3", + "rule_id": "59756272-1998-4b8c-be14-e287035c4d10", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": [ + "v3_linux_system_user_discovery" + ] + }, + { + "name": "UAC Bypass Attempt via Privileged IFileOperation COM Interface", + "description": "Identifies attempts to bypass User Account Control (UAC) via DLL side-loading. Attackers may attempt to bypass UAC to stealthily execute code with elevated permissions.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/hfiref0x/UACME", + "https://www.elastic.co/security-labs/exploring-windows-uac-bypasses-techniques-and-detection-strategies" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + }, + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.002", + "name": "DLL Side-Loading", + "reference": "https://attack.mitre.org/techniques/T1574/002/" + } + ] + } + ] + } + ], + "id": "5921753f-4b94-4334-b239-adfe2e420a2a", + "rule_id": "5a14d01d-7ac8-4545-914c-b687c2cf66b3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type : \"change\" and process.name : \"dllhost.exe\" and\n /* Known modules names side loaded into process running with high or system integrity level for UAC Bypass, update here for new modules */\n file.name : (\"wow64log.dll\", \"comctl32.dll\", \"DismCore.dll\", \"OskSupport.dll\", \"duser.dll\", \"Accessibility.ni.dll\") and\n /* has no impact on rule logic just to avoid OS install related FPs */\n not file.path : (\"C:\\\\Windows\\\\SoftwareDistribution\\\\*\", \"C:\\\\Windows\\\\WinSxS\\\\*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Reverse Shell via Java", + "description": "This detection rule identifies the execution of a Linux shell process from a Java JAR application post an incoming network connection. This behavior may indicate reverse shell activity via a Java application.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + } + ], + "id": "9488557c-da57-415d-965c-21c9293492d3", + "rule_id": "5a3d5447-31c9-409a-aed1-72f9921594fd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id with maxspan=5s\n [network where host.os.type == \"linux\" and event.action in (\"connection_accepted\", \"connection_attempted\") and \n process.executable : (\"/usr/bin/java\", \"/bin/java\", \"/usr/lib/jvm/*\", \"/usr/java/*\") and\n destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\"\n ] by process.entity_id\n [process where host.os.type == \"linux\" and event.action == \"exec\" and \n process.parent.executable : (\"/usr/bin/java\", \"/bin/java\", \"/usr/lib/jvm/*\", \"/usr/java/*\") and\n process.parent.args : \"-jar\" and process.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n ] by process.parent.entity_id\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Virtual Machine Fingerprinting", + "description": "An adversary may attempt to get detailed information about the operating system and hardware. This rule identifies common locations used to discover virtual machine hardware by a non-root user. This technique has been used by the Pupy RAT and other malware.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Certain tools or automated software may enumerate hardware information. These tools can be exempted via user name or process arguments to eliminate potential noise." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "a1671f10-7bb2-47e6-aeaa-b190aa7600fb", + "rule_id": "5b03c9fb-9945-4d2f-9568-fd690fee3fba", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ], + "query": "event.category:process and host.os.type:linux and event.type:(start or process_started) and\n process.args:(\"/sys/class/dmi/id/bios_version\" or\n \"/sys/class/dmi/id/product_name\" or\n \"/sys/class/dmi/id/chassis_vendor\" or\n \"/proc/scsi/scsi\" or\n \"/proc/ide/hd0/model\") and\n not user.name:root\n", + "language": "kuery" + }, + { + "name": "AWS WAF Rule or Rule Group Deletion", + "description": "Identifies the deletion of a specified AWS Web Application Firewall (WAF) rule or rule group.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Network Security Monitoring", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "WAF rules or rule groups may be deleted by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Rule deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/waf/delete-rule-group.html", + "https://docs.aws.amazon.com/waf/latest/APIReference/API_waf_DeleteRuleGroup.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "1e054b99-f836-4f55-8642-403da8e48689", + "rule_id": "5beaebc1-cc13-4bfc-9949-776f9e0dc318", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:(waf.amazonaws.com or waf-regional.amazonaws.com or wafv2.amazonaws.com) and event.action:(DeleteRule or DeleteRuleGroup) and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential Defense Evasion via PRoot", + "description": "Identifies the execution of the PRoot utility, an open-source tool for user-space implementation of chroot, mount --bind, and binfmt_misc. Adversaries can leverage an open-source tool PRoot to expand the scope of their operations to multiple Linux distributions and simplify their necessary efforts. In a normal threat scenario, the scope of an attack is limited by the varying configurations of each Linux distribution. With PRoot, it provides an attacker with a consistent operational environment across different Linux distributions, such as Ubuntu, Fedora, and Alpine. PRoot also provides emulation capabilities that allow for malware built on other architectures, such as ARM, to be run.The post-exploitation technique called bring your own filesystem (BYOF), can be used by the threat actors to execute malicious payload or elevate privileges or perform network scans or orchestrate another attack on the environment. Although PRoot was originally not developed with malicious intent it can be easily tuned to work for one.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://proot-me.github.io/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1211", + "name": "Exploitation for Defense Evasion", + "reference": "https://attack.mitre.org/techniques/T1211/" + } + ] + } + ], + "id": "7dcf6899-a28f-4e99-ba9b-75644ed63565", + "rule_id": "5c9ec990-37fa-4d5c-abfc-8d432f3dedd0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where event.action == \"exec\" and process.parent.name ==\"proot\" and host.os.type == \"linux\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Outbound Scheduled Task Activity via PowerShell", + "description": "Identifies the PowerShell process loading the Task Scheduler COM DLL followed by an outbound RPC network connection within a short time period. This may indicate lateral movement or remote discovery via scheduled tasks.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate scheduled tasks may be created during installation of new software." + ], + "references": [ + "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + }, + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "9a17f698-0cfc-4448-a035-7cdb4f547c3d", + "rule_id": "5cd55388-a19c-47c7-8ec4-f41656c2fded", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.address", + "type": "keyword", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan = 5s\n [any where host.os.type == \"windows\" and (event.category == \"library\" or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : \"taskschd.dll\" or file.name : \"taskschd.dll\") and process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\")]\n [network where host.os.type == \"windows\" and process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and destination.port == 135 and not destination.address in (\"127.0.0.1\", \"::1\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Persistence via PowerShell profile", + "description": "Identifies the creation or modification of a PowerShell profile. PowerShell profile is a script that is executed when PowerShell starts to customize the user environment, which can be abused by attackers to persist in a environment where PowerShell is common.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles", + "https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.013", + "name": "PowerShell Profile", + "reference": "https://attack.mitre.org/techniques/T1546/013/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.013", + "name": "PowerShell Profile", + "reference": "https://attack.mitre.org/techniques/T1546/013/" + } + ] + } + ] + } + ], + "id": "26ac4c53-825e-4a7a-9929-f611e91b116b", + "rule_id": "5cf6397e-eb91-4f31-8951-9f0eaa755a31", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.path : (\"?:\\\\Users\\\\*\\\\Documents\\\\WindowsPowerShell\\\\*\",\n \"?:\\\\Users\\\\*\\\\Documents\\\\PowerShell\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\*\") and\n file.name : (\"profile.ps1\", \"Microsoft.Powershell_profile.ps1\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Execution via Scheduled Task", + "description": "Identifies execution of a suspicious program via scheduled tasks by looking at process lineage and command line usage.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate scheduled tasks running third party software." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "78a01253-8859-4e31-8c2b-0786536ea3c2", + "rule_id": "5d1d6907-0747-4d5d-9b24-e4a18853dc0a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.working_directory", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n /* Schedule service cmdline on Win10+ */\n process.parent.name : \"svchost.exe\" and process.parent.args : \"Schedule\" and\n /* add suspicious programs here */\n process.pe.original_file_name in\n (\n \"cscript.exe\",\n \"wscript.exe\",\n \"PowerShell.EXE\",\n \"Cmd.Exe\",\n \"MSHTA.EXE\",\n \"RUNDLL32.EXE\",\n \"REGSVR32.EXE\",\n \"MSBuild.exe\",\n \"InstallUtil.exe\",\n \"RegAsm.exe\",\n \"RegSvcs.exe\",\n \"msxsl.exe\",\n \"CONTROL.EXE\",\n \"EXPLORER.EXE\",\n \"Microsoft.Workflow.Compiler.exe\",\n \"msiexec.exe\"\n ) and\n /* add suspicious paths here */\n process.args : (\n \"C:\\\\Users\\\\*\",\n \"C:\\\\ProgramData\\\\*\",\n \"C:\\\\Windows\\\\Temp\\\\*\",\n \"C:\\\\Windows\\\\Tasks\\\\*\",\n \"C:\\\\PerfLogs\\\\*\",\n \"C:\\\\Intel\\\\*\",\n \"C:\\\\Windows\\\\Debug\\\\*\",\n \"C:\\\\HP\\\\*\") and\n\n not (process.name : \"cmd.exe\" and process.args : \"?:\\\\*.bat\" and process.working_directory : \"?:\\\\Windows\\\\System32\\\\\") and\n not (process.name : \"cscript.exe\" and process.args : \"?:\\\\Windows\\\\system32\\\\calluxxprovider.vbs\") and\n not (process.name : \"powershell.exe\" and process.args : (\"-File\", \"-PSConsoleFile\") and user.id : \"S-1-5-18\") and\n not (process.name : \"msiexec.exe\" and user.id : \"S-1-5-18\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "AdminSDHolder SDProp Exclusion Added", + "description": "Identifies a modification on the dsHeuristics attribute on the bit that holds the configuration of groups excluded from the SDProp process. The SDProp compares the permissions on protected objects with those defined on the AdminSDHolder object. If the permissions on any of the protected accounts and groups do not match, the permissions on the protected accounts and groups are reset to match those of the domain's AdminSDHolder object, meaning that groups excluded will remain unchanged. Attackers can abuse this misconfiguration to maintain long-term access to privileged accounts in these groups.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AdminSDHolder SDProp Exclusion Added\n\nThe SDProp process compares the permissions on protected objects with those defined on the AdminSDHolder object. If the permissions on any of the protected accounts and groups do not match, it resets the permissions on the protected accounts and groups to match those defined in the domain AdminSDHolder object.\n\nThe dSHeuristics is a Unicode string attribute, in which each character in the string represents a heuristic that is used to determine the behavior of Active Directory.\n\nAdministrators can use the dSHeuristics attribute to exclude privilege groups from the SDProp process by setting the 16th bit (dwAdminSDExMask) of the string to a certain value, which represents the group(s):\n\n- For example, to exclude the Account Operators group, an administrator would modify the string, so the 16th character is set to 1 (i.e., 0000000001000001).\n\nThe usage of this exclusion can leave the accounts unprotected and facilitate the misconfiguration of privileges for the excluded groups, enabling attackers to add accounts to these groups to maintain long-term persistence with high privileges.\n\nThis rule matches changes of the dsHeuristics object where the 16th bit is set to a value other than zero.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check the value assigned to the 16th bit of the string on the `winlog.event_data.AttributeValue` field:\n - Account Operators eq 1\n - Server Operators eq 2\n - Print Operators eq 4\n - Backup Operators eq 8\n The field value can range from 0 to f (15). If more than one group is specified, the values will be summed together; for example, Backup Operators and Print Operators will set the `c` value on the bit.\n\n### False positive analysis\n\n- While this modification can be done legitimately, it is not a best practice. Any potential benign true positive (B-TP) should be mapped and reviewed by the security team for alternatives as this weakens the security of the privileged group.\n\n### Response and remediation\n\n- The change can be reverted by setting the dwAdminSDExMask (16th bit) to 0 in dSHeuristics.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Active Directory", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.cert.ssi.gouv.fr/uploads/guide-ad.html#dsheuristics_bad", + "https://petri.com/active-directory-security-understanding-adminsdholder-object" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + } + ] + }, + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "8532de60-3525-46c5-afb9-30bc0ae95151", + "rule_id": "61d29caf-6c15-4d1e-9ccb-7ad12ccc0bc7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.AttributeLDAPDisplayName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.AttributeValue", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'Audit Directory Service Changes' logging policy must be configured for (Success).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success)\n```\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "any where event.action == \"Directory Service Changes\" and\n event.code == \"5136\" and\n winlog.event_data.AttributeLDAPDisplayName : \"dSHeuristics\" and\n length(winlog.event_data.AttributeValue) > 15 and\n winlog.event_data.AttributeValue regex~ \"[0-9]{15}([1-9a-f]).*\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Suspicious Termination of ESXI Process", + "description": "Identifies instances where VMware processes, such as \"vmware-vmx\" or \"vmx,\" are terminated on a Linux system by a \"kill\" command. The rule monitors for the \"end\" event type, which signifies the termination of a process. The presence of a \"kill\" command as the parent process for terminating VMware processes may indicate that a threat actor is attempting to interfere with the virtualized environment on the targeted system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Impact", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1489", + "name": "Service Stop", + "reference": "https://attack.mitre.org/techniques/T1489/" + } + ] + } + ], + "id": "662c613b-9211-42da-a02d-66ea2fae17bb", + "rule_id": "6641a5af-fb7e-487a-adc4-9e6503365318", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"end\" and process.name : (\"vmware-vmx\", \"vmx\")\nand process.parent.name : \"kill\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Modification of the msPKIAccountCredentials", + "description": "Identify the modification of the msPKIAccountCredentials attribute in an Active Directory User Object. Attackers can abuse the credentials roaming feature to overwrite an arbitrary file for privilege escalation. ms-PKI-AccountCredentials contains binary large objects (BLOBs) of encrypted credential objects from the credential manager store, private keys, certificates, and certificate requests.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Data Source: Active Directory", + "Tactic: Privilege Escalation", + "Use Case: Active Directory Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.mandiant.com/resources/blog/apt29-windows-credential-roaming", + "https://social.technet.microsoft.com/wiki/contents/articles/11483.windows-credential-roaming.aspx", + "https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5136" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "d729f7ba-02ee-4d85-bec4-d48c287c2418", + "rule_id": "670b3b5a-35e5-42db-bd36-6c5b9b4b7313", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.AttributeLDAPDisplayName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.OperationType", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectUserSid", + "type": "keyword", + "ecs": false + } + ], + "setup": "The 'Audit Directory Service Changes' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.action:\"Directory Service Changes\" and event.code:\"5136\" and\n winlog.event_data.AttributeLDAPDisplayName:\"msPKIAccountCredentials\" and winlog.event_data.OperationType:\"%%14674\" and\n not winlog.event_data.SubjectUserSid : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "Image File Execution Options Injection", + "description": "The Debugger and SilentProcessExit registry keys can allow an adversary to intercept the execution of files, causing a different process to be executed. This functionality can be abused by an adversary to establish persistence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://oddvar.moe/2018/04/10/persistence-using-globalflags-in-image-file-execution-options-hidden-from-autoruns-exe/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.012", + "name": "Image File Execution Options Injection", + "reference": "https://attack.mitre.org/techniques/T1546/012/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "e53165f4-38fc-4c43-a5ce-f457f5615461", + "rule_id": "6839c821-011d-43bd-bd5b-acff00257226", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and length(registry.data.strings) > 0 and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Image File Execution Options\\\\*.exe\\\\Debugger\",\n \"HKLM\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Image File Execution Options\\\\*\\\\Debugger\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\SilentProcessExit\\\\*\\\\MonitorProcess\",\n \"HKLM\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\SilentProcessExit\\\\*\\\\MonitorProcess\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Image File Execution Options\\\\*.exe\\\\Debugger\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Image File Execution Options\\\\*\\\\Debugger\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\SilentProcessExit\\\\*\\\\MonitorProcess\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\SilentProcessExit\\\\*\\\\MonitorProcess\"\n ) and\n /* add FPs here */\n not registry.data.strings regex~ (\"\"\"C:\\\\Program Files( \\(x86\\))?\\\\ThinKiosk\\\\thinkiosk\\.exe\"\"\", \"\"\".*\\\\PSAppDeployToolkit\\\\.*\"\"\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Okta ThreatInsight Threat Suspected Promotion", + "description": "Okta ThreatInsight is a feature that provides valuable debug data regarding authentication and authorization processes, which is logged in the system. Within this data, there is a specific field called threat_suspected, which represents Okta's internal evaluation of the authentication or authorization workflow. When this field is set to True, it suggests the presence of potential credential access techniques, such as password-spraying, brute-forcing, replay attacks, and other similar threats.", + "risk_score": 47, + "severity": "medium", + "rule_name_override": "okta.display_message", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\nThis is a promotion rule for Okta ThreatInsight suspected threat events, which are alertable events per the vendor.\nConsult vendor documentation on interpreting specific events.", + "version": 205, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [ + { + "field": "okta.debug_context.debug_data.risk_level", + "operator": "equals", + "severity": "low", + "value": "LOW" + }, + { + "field": "okta.debug_context.debug_data.risk_level", + "operator": "equals", + "severity": "medium", + "value": "MEDIUM" + }, + { + "field": "okta.debug_context.debug_data.risk_level", + "operator": "equals", + "severity": "high", + "value": "HIGH" + } + ], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://help.okta.com/en-us/Content/Topics/Security/threat-insight/configure-threatinsight-system-log.html", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [], + "id": "8071bdac-fe04-4ec6-8842-628d6bab4a06", + "rule_id": "6885d2ae-e008-4762-b98a-e8e1cd3a81e9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "okta.debug_context.debug_data.threat_suspected", + "type": "keyword", + "ecs": false + } + ], + "setup": "", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and (event.action:security.threat.detected or okta.debug_context.debug_data.threat_suspected: true)\n", + "language": "kuery" + }, + { + "name": "Persistence via TelemetryController Scheduled Task Hijack", + "description": "Detects the successful hijack of Microsoft Compatibility Appraiser scheduled task to establish persistence with an integrity level of system.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.trustedsec.com/blog/abusing-windows-telemetry-for-persistence" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + }, + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + }, + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/" + } + ] + } + ], + "id": "5364f77b-5c2e-4165-bc07-7e90194c366b", + "rule_id": "68921d85-d0dc-48b3-865f-43291ca2c4f2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"CompatTelRunner.exe\" and process.args : \"-cv*\" and\n not process.name : (\"conhost.exe\",\n \"DeviceCensus.exe\",\n \"CompatTelRunner.exe\",\n \"DismHost.exe\",\n \"rundll32.exe\",\n \"powershell.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Scheduled Task Created by a Windows Script", + "description": "A scheduled task was created by a Windows script via cscript.exe, wscript.exe or powershell.exe. This can be abused by an adversary to establish persistence.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\nDecode the base64 encoded Tasks Actions registry value to investigate the task's configured action.", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate scheduled tasks may be created during installation of new software." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.005", + "name": "Visual Basic", + "reference": "https://attack.mitre.org/techniques/T1059/005/" + } + ] + } + ] + } + ], + "id": "029a078f-9aad-4dcb-a7bb-619b41581eb3", + "rule_id": "689b9d57-e4d5-4357-ad17-9c334609d79a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan = 30s\n [any where host.os.type == \"windows\" and \n (event.category : (\"library\", \"driver\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : \"taskschd.dll\" or file.name : \"taskschd.dll\") and\n process.name : (\"cscript.exe\", \"wscript.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\")]\n [registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\TaskCache\\\\Tasks\\\\*\\\\Actions\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\TaskCache\\\\Tasks\\\\*\\\\Actions\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS CloudWatch Log Group Deletion", + "description": "Identifies the deletion of a specified AWS CloudWatch log group. When a log group is deleted, all the archived log events associated with the log group are also permanently deleted.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS CloudWatch Log Group Deletion\n\nAmazon CloudWatch is a monitoring and observability service that collects monitoring and operational data in the form of logs, metrics, and events for resources and applications. This data can be used to detect anomalous behavior in your environments, set alarms, visualize logs and metrics side by side, take automated actions, troubleshoot issues, and discover insights to keep your applications running smoothly.\n\nA log group is a group of log streams that share the same retention, monitoring, and access control settings. You can define log groups and specify which streams to put into each group. There is no limit on the number of log streams that can belong to one log group.\n\nThis rule looks for the deletion of a log group using the API `DeleteLogGroup` action. Attackers can do this to cover their tracks and impact security monitoring that relies on these sources.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Investigate the deleted log group's criticality and whether the responsible team is aware of the deletion.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Log Auditing", + "Resources: Investigation Guide", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Log group deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/logs/delete-log-group.html", + "https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteLogGroup.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "e2560a61-d574-4f08-ad04-48223aeb9661", + "rule_id": "68a7a5a5-a2fc-4a76-ba9f-26849de881b4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:logs.amazonaws.com and event.action:DeleteLogGroup and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "UAC Bypass via ICMLuaUtil Elevated COM Interface", + "description": "Identifies User Account Control (UAC) bypass attempts via the ICMLuaUtil Elevated COM interface. Attackers may attempt to bypass UAC to stealthily execute code with elevated permissions.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1559", + "name": "Inter-Process Communication", + "reference": "https://attack.mitre.org/techniques/T1559/", + "subtechnique": [ + { + "id": "T1559.001", + "name": "Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1559/001/" + } + ] + } + ] + } + ], + "id": "b1fe693d-b394-4c17-9e91-ecea975acac7", + "rule_id": "68d56fdc-7ffa-4419-8e95-81641bd6f845", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name == \"dllhost.exe\" and\n process.parent.args in (\"/Processid:{3E5FC7F9-9A51-4367-9063-A120244FBEC7}\", \"/Processid:{D2E7041B-2927-42FB-8E9F-7CE93B6DC937}\") and\n process.pe.original_file_name != \"WerFault.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS KMS Customer Managed Key Disabled or Scheduled for Deletion", + "description": "Identifies attempts to disable or schedule the deletion of an AWS KMS Customer Managed Key (CMK). Deleting an AWS KMS key is destructive and potentially dangerous. It deletes the key material and all metadata associated with the KMS key and is irreversible. After a KMS key is deleted, the data that was encrypted under that KMS key can no longer be decrypted, which means that data becomes unrecoverable.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Log Auditing", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Xavier Pich" + ], + "false_positives": [ + "A KMS customer managed key may be disabled or scheduled for deletion by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Key deletions by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/cli/latest/reference/kms/disable-key.html", + "https://docs.aws.amazon.com/cli/latest/reference/kms/schedule-key-deletion.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + } + ], + "id": "bd4e873e-fc69-4e6b-abc3-87f5cee14a57", + "rule_id": "6951f15e-533c-4a60-8014-a3c3ab851a1b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:kms.amazonaws.com and event.action:(\"DisableKey\" or \"ScheduleKeyDeletion\") and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "AWS IAM Password Recovery Requested", + "description": "Identifies AWS IAM password recovery requests. An adversary may attempt to gain unauthorized AWS access by abusing password recovery mechanisms.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Verify whether the user identity, user agent, and/or hostname should be requesting changes in your environment. Password reset attempts from unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://www.cadosecurity.com/an-ongoing-aws-phishing-campaign/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "9c800924-20cd-4bdb-b9ef-dfd711dabd70", + "rule_id": "69c420e8-6c9e-4d28-86c0-8a2be2d1e78c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:signin.amazonaws.com and event.action:PasswordRecoveryRequested and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Unusual Service Host Child Process - Childless Service", + "description": "Identifies unusual child processes of Service Host (svchost.exe) that traditionally do not spawn any child processes. This may indicate a code injection or an equivalent form of exploitation.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Changes to Windows services or a rarely executed child process." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/", + "subtechnique": [ + { + "id": "T1055.012", + "name": "Process Hollowing", + "reference": "https://attack.mitre.org/techniques/T1055/012/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/", + "subtechnique": [ + { + "id": "T1055.012", + "name": "Process Hollowing", + "reference": "https://attack.mitre.org/techniques/T1055/012/" + } + ] + } + ] + } + ], + "id": "832b2257-805c-4b03-bec1-1267ca1eff3c", + "rule_id": "6a8ab9cc-4023-4d17-b5df-1a3e16882ce7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"svchost.exe\" and\n\n /* based on svchost service arguments -s svcname where the service is known to be childless */\n\n process.parent.args : (\"WdiSystemHost\",\"LicenseManager\",\n \"StorSvc\",\"CDPSvc\",\"cdbhsvc\",\"BthAvctpSvc\",\"SstpSvc\",\"WdiServiceHost\",\n \"imgsvc\",\"TrkWks\",\"WpnService\",\"IKEEXT\",\"PolicyAgent\",\"CryptSvc\",\n \"netprofm\",\"ProfSvc\",\"StateRepository\",\"camsvc\",\"LanmanWorkstation\",\n \"NlaSvc\",\"EventLog\",\"hidserv\",\"DisplayEnhancementService\",\"ShellHWDetection\",\n \"AppHostSvc\",\"fhsvc\",\"CscService\",\"PushToInstall\") and\n\n /* unknown FPs can be added here */\n\n not process.name : (\"WerFault.exe\",\"WerFaultSecure.exe\",\"wermgr.exe\") and\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\RelPost.exe\" and process.parent.args : \"WdiSystemHost\") and\n not (process.name : \"rundll32.exe\" and\n process.args : \"?:\\\\WINDOWS\\\\System32\\\\winethc.dll,ForceProxyDetectionOnNextRun\" and process.parent.args : \"WdiServiceHost\") and\n not (process.executable : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\", \"?:\\\\Windows\\\\System32\\\\Kodak\\\\kds_i4x50\\\\lib\\\\lexexe.exe\") and\n process.parent.args : \"imgsvc\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Exporting Exchange Mailbox via PowerShell", + "description": "Identifies the use of the Exchange PowerShell cmdlet, New-MailBoxExportRequest, to export the contents of a primary mailbox or archive to a .pst file. Adversaries may target user email to collect sensitive information.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Exporting Exchange Mailbox via PowerShell\n\nEmail mailboxes and their information can be valuable assets for attackers. Company mailboxes often contain sensitive information such as login credentials, intellectual property, financial data, and personal information, making them high-value targets for malicious actors.\n\nThe `New-MailBoxExportRequest` cmdlet is used to begin the process of exporting contents of a primary mailbox or archive to a .pst file. Note that this is done on a per-mailbox basis and this cmdlet is available only in on-premises Exchange.\n\nAttackers can abuse this functionality in preparation for exfiltrating contents, which is likely to contain sensitive and strategic data.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the export operation:\n - Identify the user account that performed the action and whether it should perform this kind of action.\n - Contact the account owner and confirm whether they are aware of this activity.\n - Check if this operation was approved and performed according to the organization's change management policy.\n - Retrieve the operation status and use the `Get-MailboxExportRequest` cmdlet to review previous requests.\n - By default, no group in Exchange has the privilege to import or export mailboxes. Investigate administrators that assigned the \"Mailbox Import Export\" privilege for abnormal activity.\n- Investigate if there is a significant quantity of export requests in the alert timeframe. This operation is done on a per-mailbox basis and can be part of a mass export.\n- If the operation was completed successfully:\n - Check if the file is on the path specified in the command.\n - Investigate if the file was compressed, archived, or retrieved by the attacker for exfiltration.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and it is done with proper approval.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If the involved host is not the Exchange server, isolate the host to prevent further post-compromise behavior.\n- Use the `Remove-MailboxExportRequest` cmdlet to remove fully or partially completed export requests.\n- Prioritize cases that involve personally identifiable information (PII) or other classified data.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges of users with the \"Mailbox Import Export\" privilege to ensure that the least privilege principle is being followed.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate exchange system administration activity." + ], + "references": [ + "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/", + "https://docs.microsoft.com/en-us/powershell/module/exchange/new-mailboxexportrequest?view=exchange-ps" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1005", + "name": "Data from Local System", + "reference": "https://attack.mitre.org/techniques/T1005/" + }, + { + "id": "T1114", + "name": "Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/", + "subtechnique": [ + { + "id": "T1114.002", + "name": "Remote Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "2ec10e5f-121c-43c5-8fd5-5be5614a3dfc", + "rule_id": "6aace640-e631-4870-ba8e-5fdda09325db", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name: (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and \n process.command_line : (\"*MailboxExportRequest*\", \"*-Mailbox*-ContentFilter*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Sensitive Files Compression", + "description": "Identifies the use of a compression utility to collect known files containing sensitive information, such as credentials and system configurations.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 206, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Collection", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.trendmicro.com/en_ca/research/20/l/teamtnt-now-deploying-ddos-capable-irc-bot-tntbotinger.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.001", + "name": "Credentials In Files", + "reference": "https://attack.mitre.org/techniques/T1552/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1560", + "name": "Archive Collected Data", + "reference": "https://attack.mitre.org/techniques/T1560/", + "subtechnique": [ + { + "id": "T1560.001", + "name": "Archive via Utility", + "reference": "https://attack.mitre.org/techniques/T1560/001/" + } + ] + } + ] + } + ], + "id": "f0afdac8-723d-4396-99c7-bdd5a08e9894", + "rule_id": "6b84d470-9036-4cc0-a27c-6d90bbfe81ab", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "new_terms", + "query": "event.category:process and host.os.type:linux and event.type:start and\n process.name:(zip or tar or gzip or hdiutil or 7z) and\n process.args:\n (\n /root/.ssh/id_rsa or\n /root/.ssh/id_rsa.pub or\n /root/.ssh/id_ed25519 or\n /root/.ssh/id_ed25519.pub or\n /root/.ssh/authorized_keys or\n /root/.ssh/authorized_keys2 or\n /root/.ssh/known_hosts or\n /root/.bash_history or\n /etc/hosts or\n /home/*/.ssh/id_rsa or\n /home/*/.ssh/id_rsa.pub or\n /home/*/.ssh/id_ed25519 or\n /home/*/.ssh/id_ed25519.pub or\n /home/*/.ssh/authorized_keys or\n /home/*/.ssh/authorized_keys2 or\n /home/*/.ssh/known_hosts or\n /home/*/.bash_history or\n /root/.aws/credentials or\n /root/.aws/config or\n /home/*/.aws/credentials or\n /home/*/.aws/config or\n /root/.docker/config.json or\n /home/*/.docker/config.json or\n /etc/group or\n /etc/passwd or\n /etc/shadow or\n /etc/gshadow\n )\n", + "new_terms_fields": [ + "host.id", + "process.command_line", + "process.parent.executable" + ], + "history_window_start": "now-10d", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Remote Computer Account DnsHostName Update", + "description": "Identifies the remote update to a computer account's DnsHostName attribute. If the new value set is a valid domain controller DNS hostname and the subject computer name is not a domain controller, then it's highly likely a preparation step to exploit CVE-2022-26923 in an attempt to elevate privileges from a standard domain user to domain admin privileges.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Use Case: Active Directory Monitoring", + "Data Source: Active Directory", + "Use Case: Vulnerability" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://research.ifcr.dk/certifried-active-directory-domain-privilege-escalation-cve-2022-26923-9e098fe298f4", + "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2022-26923" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + }, + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + } + ] + } + ] + } + ], + "id": "fdb17c01-7505-4845-8b1c-23e8595384e8", + "rule_id": "6bed021a-0afb-461c-acbe-ffdb9574d3f3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.DnsHostName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.TargetUserName", + "type": "keyword", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "iam where event.action == \"changed-computer-account\" and user.id : (\"S-1-5-21-*\", \"S-1-12-1-*\") and\n\n /* if DnsHostName value equal a DC DNS hostname then it's highly suspicious */\n winlog.event_data.DnsHostName : \"??*\" and\n\n /* exclude FPs where DnsHostName starts with the ComputerName that was changed */\n not startswith~(winlog.event_data.DnsHostName, substring(winlog.event_data.TargetUserName, 0, length(winlog.event_data.TargetUserName) - 1))\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Microsoft Exchange Server UM Writing Suspicious Files", + "description": "Identifies suspicious files being written by the Microsoft Exchange Server Unified Messaging (UM) service. This activity has been observed exploiting CVE-2021-26858.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\nPositive hits can be checked against the established Microsoft [baselines](https://github.com/microsoft/CSS-Exchange/tree/main/Security/Baselines).\n\nMicrosoft highly recommends that the best course of action is patching, but this may not protect already compromised systems\nfrom existing intrusions. Other tools for detecting and mitigating can be found within their Exchange support\n[repository](https://github.com/microsoft/CSS-Exchange/tree/main/Security)", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Files generated during installation will generate a lot of noise, so the rule should only be enabled after the fact.", + "This rule was tuned using the following baseline: https://raw.githubusercontent.com/microsoft/CSS-Exchange/main/Security/Baselines/baseline_15.2.792.5.csv from Microsoft. Depending on version, consult https://github.com/microsoft/CSS-Exchange/tree/main/Security/Baselines to help determine normalcy." + ], + "references": [ + "https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers", + "https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "0c193625-b5ee-4697-b8e2-b32ad62fa5ac", + "rule_id": "6cd1779c-560f-4b68-a8f1-11009b27fe63", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n process.name : (\"UMWorkerProcess.exe\", \"umservice.exe\") and\n file.extension : (\"php\", \"jsp\", \"js\", \"aspx\", \"asmx\", \"asax\", \"cfm\", \"shtml\") and\n (\n file.path : \"?:\\\\inetpub\\\\wwwroot\\\\aspnet_client\\\\*\" or\n\n (file.path : \"?:\\\\*\\\\Microsoft\\\\Exchange Server*\\\\FrontEnd\\\\HttpProxy\\\\owa\\\\auth\\\\*\" and\n not (file.path : \"?:\\\\*\\\\Microsoft\\\\Exchange Server*\\\\FrontEnd\\\\HttpProxy\\\\owa\\\\auth\\\\version\\\\*\" or\n file.name : (\"errorFE.aspx\", \"expiredpassword.aspx\", \"frowny.aspx\", \"GetIdToken.htm\", \"logoff.aspx\",\n \"logon.aspx\", \"OutlookCN.aspx\", \"RedirSuiteServiceProxy.aspx\", \"signout.aspx\"))) or\n\n (file.path : \"?:\\\\*\\\\Microsoft\\\\Exchange Server*\\\\FrontEnd\\\\HttpProxy\\\\ecp\\\\auth\\\\*\" and\n not file.name : \"TimeoutLogoff.aspx\")\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Unusual Process For a Windows Host", + "description": "Identifies rare processes that do not usually run on individual hosts, which can indicate execution of unauthorized services, malware, or persistence mechanisms. Processes are considered rare when they only run occasionally as compared with other processes running on the host.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Process For a Windows Host\n\nSearching for abnormal Windows processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.\n\nThis rule uses a machine learning job to detect a Windows process that is rare and unusual for an individual Windows host in your environment.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.\n - Investigate the process metadata — such as the digital signature, directory, etc. — to obtain more context that can indicate whether the executable is associated with an expected software vendor or package.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.\n- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE NOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR user_account == null)\"}}\n - !{osquery{\"label\":\"Retrieve Service Unisgned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid, services.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path = authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Related Rules\n\n- Unusual Process For a Windows Host - 6d448b96-c922-4adb-b51c-b767f1ea5b76\n- Unusual Windows Path Activity - 445a342e-03fb-42d0-8656-0367eb2dead5\n- Unusual Windows Process Calling the Metadata Service - abae61a8-c560-4dbd-acca-1e1438bff36b\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + } + ], + "id": "b62ef196-5911-4c7b-8b1d-38a48738802b", + "rule_id": "6d448b96-c922-4adb-b51c-b767f1ea5b76", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_rare_process_by_host_windows" + ] + }, + { + "name": "First Time Seen Commonly Abused Remote Access Tool Execution", + "description": "Adversaries may install legitimate remote access tools (RAT) to compromised endpoints for further command-and-control (C2). Adversaries can rely on installed RATs for persistence, execution of native commands and more. This rule detects when a process is started whose name or code signature resembles commonly abused RATs. This is a New Terms rule type indicating the host has not seen this RAT process started before within the last 30 days.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating First Time Seen Commonly Abused Remote Access Tool Execution\n\nRemote access software is a class of tools commonly used by IT departments to provide support by connecting securely to users' computers. Remote access is an ever-growing market where new companies constantly offer new ways of quickly accessing remote systems.\n\nAt the same pace as IT departments adopt these tools, the attackers also adopt them as part of their workflow to connect into an interactive session, maintain access with legitimate software as a persistence mechanism, drop malicious software, etc.\n\nThis rule detects when a remote access tool is seen in the environment for the first time in the last 15 days, enabling analysts to investigate and enforce the correct usage of such tools.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Check if the execution of the remote access tool is approved by the organization's IT department.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n - If the tool is not approved for use in the organization, the employee could have been tricked into installing it and providing access to a malicious third party. Investigate whether this third party could be attempting to scam the end-user or gain access to the environment through social engineering.\n- Investigate any abnormal behavior by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n\n### False positive analysis\n\n- If an authorized support person or administrator used the tool to conduct legitimate support or remote access, consider reinforcing that only tooling approved by the IT policy should be used. The analyst can dismiss the alert if no other suspicious behavior is observed involving the host or users.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Run a full scan using the antimalware tool in place. This scan can reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If an unauthorized third party did the access via social engineering, consider improvements to the security awareness program.\n- Enforce that only tooling approved by the IT policy should be used for remote access purposes and only by authorized staff.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://thedfirreport.com/2023/04/03/malicious-iso-file-leads-to-domain-wide-ransomware/", + "https://attack.mitre.org/techniques/T1219/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1219", + "name": "Remote Access Software", + "reference": "https://attack.mitre.org/techniques/T1219/" + } + ] + } + ], + "id": "12b10475-8f82-4786-a46c-2ec0ce7f48d5", + "rule_id": "6e1a2cc4-d260-11ed-8829-f661ea17fbcc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name.caseless", + "type": "unknown", + "ecs": false + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type: \"windows\" and\n\n event.category: \"process\" and event.type : \"start\" and\n\n (\n process.code_signature.subject_name : (\n TeamViewer* or \"NetSupport Ltd\" or \"GlavSoft\" or \"LogMeIn, Inc.\" or \"Ammyy LLC\" or\n \"Nanosystems S.r.l.\" or \"Remote Utilities LLC\" or \"ShowMyPC\" or \"Splashtop Inc.\" or\n \"Yakhnovets Denis Aleksandrovich IP\" or \"Pro Softnet Corporation\" or \"BeamYourScreen GmbH\" or\n \"RealVNC\" or \"uvnc\" or \"SAFIB\") or\n\n process.name.caseless : (\n \"teamviewer.exe\" or \"apc_Admin.exe\" or \"apc_host.exe\" or \"SupremoHelper.exe\" or \"rfusclient.exe\" or\n \"spclink.exe\" or \"smpcview.exe\" or \"ROMServer.exe\" or \"strwinclt.exe\" or \"RPCSuite.exe\" or \"RemotePCDesktop.exe\" or\n \"RemotePCService.exe\" or \"tvn.exe\" or \"LMIIgnition.exe\" or \"B4-Service.exe\" or \"Mikogo-Service.exe\" or \"AnyDesk.exe\" or\n \"Splashtop-streamer.exe\" or AA_v*.exe, or \"rutserv.exe\" or \"rutview.exe\" or \"vncserver.exe\" or \"vncviewer.exe\" or\n \"tvnserver.exe\" or \"tvnviewer.exe\" or \"winvnc.exe\" or \"RemoteDesktopManager.exe\" or \"LogMeIn.exe\" or ScreenConnect*.exe or\n \"RemotePC.exe\" or \"r_server.exe\" or \"radmin.exe\" or \"ROMServer.exe\" or \"ROMViewer.exe\" or \"DWRCC.exe\" or \"AeroAdmin.exe\" or\n \"ISLLightClient.exe\" or \"ISLLight.exe\" or \"AteraAgent.exe\" or \"SRService.exe\")\n\t) and\n\n\tnot (process.pe.original_file_name : (\"G2M.exe\" or \"Updater.exe\" or \"powershell.exe\") and process.code_signature.subject_name : \"LogMeIn, Inc.\")\n", + "new_terms_fields": [ + "host.id" + ], + "history_window_start": "now-15d", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ], + "language": "kuery" + }, + { + "name": "Anomalous Process For a Windows Population", + "description": "Searches for rare processes running on multiple hosts in an entire fleet or network. This reduces the detection of false positives since automated maintenance processes usually only run occasionally on a single machine but are common to all or many hosts in a fleet.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Anomalous Process For a Windows Population\n\nSearching for abnormal Windows processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.\n\nThis rule uses a machine learning job to detect a Windows process that is rare and unusual for all of the monitored Windows hosts in your environment.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.\n - Investigate the process metadata — such as the digital signature, directory, etc. — to obtain more context that can indicate whether the executable is associated with an expected software vendor or package.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.\n- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSyste' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Retrieve Service Unisgned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Related Rules\n\n- Unusual Process For a Windows Host - 6d448b96-c922-4adb-b51c-b767f1ea5b76\n- Unusual Windows Path Activity - 445a342e-03fb-42d0-8656-0367eb2dead5\n- Unusual Windows Process Calling the Metadata Service - abae61a8-c560-4dbd-acca-1e1438bff36b\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Persistence", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] + } + ], + "id": "b7b2da49-e5c5-4740-b762-968b869356d6", + "rule_id": "6e40d56f-5c0e-4ac6-aece-bee96645b172", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_windows_anomalous_process_all_hosts" + ] + }, + { + "name": "AdminSDHolder Backdoor", + "description": "Detects modifications in the AdminSDHolder object. Attackers can abuse the SDProp process to implement a persistent backdoor in Active Directory. SDProp compares the permissions on protected objects with those defined on the AdminSDHolder object. If the permissions on any of the protected accounts and groups do not match, the permissions on the protected accounts and groups are reset to match those of the domain's AdminSDHolder object, regaining their Administrative Privileges.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Use Case: Active Directory Monitoring", + "Data Source: Active Directory" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://adsecurity.org/?p=1906", + "https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-c--protected-accounts-and-groups-in-active-directory#adminsdholder" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + } + ] + }, + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "6122b1b7-93ea-43e3-b4a1-a11e71d7186c", + "rule_id": "6e9130a5-9be6-48e5-943a-9628bfc74b18", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.ObjectDN", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.action:\"Directory Service Changes\" and event.code:5136 and\n winlog.event_data.ObjectDN:CN=AdminSDHolder,CN=System*\n", + "language": "kuery" + }, + { + "name": "AWS CloudTrail Log Deleted", + "description": "Identifies the deletion of an AWS log trail. An adversary may delete trails in an attempt to evade defenses.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS CloudTrail Log Deleted\n\nAmazon CloudTrail is a service that enables governance, compliance, operational auditing, and risk auditing of your Amazon Web Services account. With CloudTrail, you can log, continuously monitor, and retain account activity related to actions across your Amazon Web Services infrastructure. CloudTrail provides event history of your Amazon Web Services account activity, including actions taken through the Amazon Management Console, Amazon SDKs, command line tools, and other Amazon Web Services services. This event history simplifies security analysis, resource change tracking, and troubleshooting.\n\nThis rule identifies the deletion of an AWS log trail using the API `DeleteTrail` action. Attackers can do this to cover their tracks and impact security monitoring that relies on this source.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Investigate the deleted log trail's criticality and whether the responsible team is aware of the deletion.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Log Auditing", + "Resources: Investigation Guide", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trail deletions may be made by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Trail deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_DeleteTrail.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/delete-trail.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "58ba2e18-9069-4ce4-bd05-c308ea0d1988", + "rule_id": "7024e2a0-315d-4334-bb1a-441c593e16ab", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:DeleteTrail and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "AWS Config Resource Deletion", + "description": "Identifies attempts to delete an AWS Config Service resource. An adversary may tamper with Config services in order to reduce visibility into the security posture of an account and / or its workload instances.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS Config Resource Deletion\n\nAWS Config provides a detailed view of the configuration of AWS resources in your AWS account. This includes how the resources are related to one another and how they were configured in the past so that you can see how the configurations and relationships change over time.\n\nThis rule looks for the deletion of AWS Config resources using various API actions. Attackers can do this to cover their tracks and impact security monitoring that relies on these sources.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Identify the AWS resource that was involved and its criticality, ownership, and role in the environment. Also investigate if the resource is security-related.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Resources: Investigation Guide", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Privileged IAM users with security responsibilities may be expected to make changes to the Config service in order to align with local security policies and requirements. Automation, orchestration, and security tools may also make changes to the Config service, where they are used to automate setup or configuration of AWS accounts. Other kinds of user or service contexts do not commonly make changes to this service." + ], + "references": [ + "https://docs.aws.amazon.com/config/latest/developerguide/how-does-config-work.html", + "https://docs.aws.amazon.com/config/latest/APIReference/API_Operations.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "813e25e6-2acb-49cb-8d9b-cd13dc5423ec", + "rule_id": "7024e2a0-315d-4334-bb1a-552d604f27bc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:config.amazonaws.com and\n event.action:(DeleteConfigRule or DeleteOrganizationConfigRule or DeleteConfigurationAggregator or\n DeleteConfigurationRecorder or DeleteConformancePack or DeleteOrganizationConformancePack or\n DeleteDeliveryChannel or DeleteRemediationConfiguration or DeleteRetentionConfiguration)\n", + "language": "kuery" + }, + { + "name": "Suspicious RDP ActiveX Client Loaded", + "description": "Identifies suspicious Image Loading of the Remote Desktop Services ActiveX Client (mstscax), this may indicate the presence of RDP lateral movement capability.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://posts.specterops.io/revisiting-remote-desktop-lateral-movement-8fb905cb46c3" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.001", + "name": "Remote Desktop Protocol", + "reference": "https://attack.mitre.org/techniques/T1021/001/" + } + ] + } + ] + } + ], + "id": "fc6160f7-5eb7-4dc4-9177-e4a10a59dd69", + "rule_id": "71c5cb27-eca5-4151-bb47-64bc3f883270", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "any where host.os.type == \"windows\" and\n (event.category : (\"library\", \"driver\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : \"mstscax.dll\" or file.name : \"mstscax.dll\") and\n /* depending on noise in your env add here extra paths */\n process.executable :\n (\n \"C:\\\\Windows\\\\*\",\n \"C:\\\\Users\\\\Public\\\\*\",\n \"C:\\\\Users\\\\Default\\\\*\",\n \"C:\\\\Intel\\\\*\",\n \"C:\\\\PerfLogs\\\\*\",\n \"C:\\\\ProgramData\\\\*\",\n \"\\\\Device\\\\Mup\\\\*\",\n \"\\\\\\\\*\"\n ) and\n /* add here FPs */\n not process.executable : (\"C:\\\\Windows\\\\System32\\\\mstsc.exe\", \"C:\\\\Windows\\\\SysWOW64\\\\mstsc.exe\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Modification of Accessibility Binaries", + "description": "Windows contains accessibility features that may be launched with a key combination before a user has logged in. An adversary can modify the way these programs are launched to get a command prompt or backdoor without logging in to the system.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Modification of Accessibility Binaries\n\nAdversaries may establish persistence and/or elevate privileges by executing malicious content triggered by accessibility features. Windows contains accessibility features that may be launched with a key combination before a user has logged in (ex: when the user is on the Windows logon screen). An adversary can modify the way these programs are launched to get a command prompt or backdoor without logging in to the system.\n\nMore details can be found [here](https://attack.mitre.org/techniques/T1546/008/).\n\nThis rule looks for the execution of supposed accessibility binaries that don't match any of the accessibility features binaries' original file names, which is likely a custom binary deployed by the attacker.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/blog/practical-security-engineering-stateful-detection" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.008", + "name": "Accessibility Features", + "reference": "https://attack.mitre.org/techniques/T1546/008/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.008", + "name": "Accessibility Features", + "reference": "https://attack.mitre.org/techniques/T1546/008/" + } + ] + } + ] + } + ], + "id": "eeae6e22-066e-4f41-b3f0-494d520163a4", + "rule_id": "7405ddf1-6c8e-41ce-818f-48bea6bcaed8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"Utilman.exe\", \"winlogon.exe\") and user.name == \"SYSTEM\" and\n process.args :\n (\n \"C:\\\\Windows\\\\System32\\\\osk.exe\",\n \"C:\\\\Windows\\\\System32\\\\Magnify.exe\",\n \"C:\\\\Windows\\\\System32\\\\Narrator.exe\",\n \"C:\\\\Windows\\\\System32\\\\Sethc.exe\",\n \"utilman.exe\",\n \"ATBroker.exe\",\n \"DisplaySwitch.exe\",\n \"sethc.exe\"\n )\n and not process.pe.original_file_name in\n (\n \"osk.exe\",\n \"sethc.exe\",\n \"utilman2.exe\",\n \"DisplaySwitch.exe\",\n \"ATBroker.exe\",\n \"ScreenMagnifier.exe\",\n \"SR.exe\",\n \"Narrator.exe\",\n \"magnify.exe\",\n \"MAGNIFY.EXE\"\n )\n\n/* uncomment once in winlogbeat to avoid bypass with rogue process with matching pe original file name */\n/* and process.code_signature.subject_name == \"Microsoft Windows\" and process.code_signature.status == \"trusted\" */\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Sysctl File Event", + "description": "Monitors file events on sysctl configuration files (e.g., /etc/sysctl.conf, /etc/sysctl.d/*.conf) to identify potential unauthorized access or manipulation of system-level configuration settings. Attackers may tamper with the sysctl configuration files to modify kernel parameters, potentially compromising system stability, performance, or security.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Setup\nThis rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system. \n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from. \n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n\n```\n-w /etc/sysctl.conf -p wa -k sysctl\n-w /etc/sysctl.d -p wa -k sysctl\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", + "building_block_type": "default", + "version": 103, + "tags": [ + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "eb32ebc4-2480-46ba-acb0-5b06fbc117f9", + "rule_id": "7592c127-89fb-4209-a8f6-f9944dfd7e02", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "This rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system.\n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n\n```\n-w /etc/sysctl.conf -p wa -k sysctl\n-w /etc/sysctl.d -p wa -k sysctl\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", + "type": "new_terms", + "query": "host.os.type:linux and event.category:file and event.action:(\"opened-file\" or \"read-file\" or \"wrote-to-file\") and\nfile.path : (\"/etc/sysctl.conf\" or \"/etc/sysctl.d\" or /etc/sysctl.d/*)\n", + "new_terms_fields": [ + "host.id", + "process.executable", + "file.path" + ], + "history_window_start": "now-7d", + "index": [ + "auditbeat-*", + "logs-auditd_manager.auditd-*" + ], + "language": "kuery" + }, + { + "name": "Potential Remote Desktop Tunneling Detected", + "description": "Identifies potential use of an SSH utility to establish RDP over a reverse SSH Tunnel. This can be used by attackers to enable routing of network packets that would otherwise not reach their intended destination.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Remote Desktop Tunneling Detected\n\nProtocol Tunneling is a mechanism that involves explicitly encapsulating a protocol within another for various use cases, ranging from providing an outer layer of encryption (similar to a VPN) to enabling traffic that network appliances would filter to reach their destination.\n\nAttackers may tunnel Remote Desktop Protocol (RDP) traffic through other protocols like Secure Shell (SSH) to bypass network restrictions that block incoming RDP connections but may be more permissive to other protocols.\n\nThis rule looks for command lines involving the `3389` port, which RDP uses by default and options commonly associated with tools that perform tunneling.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine network data to determine if the host communicated with external servers using the tunnel.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n- Investigate the command line for the execution of programs that are unrelated to tunneling, like Remote Desktop clients.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Take the necessary actions to disable the tunneling, which can be a process kill, service deletion, registry key modification, etc. Inspect the host to learn which method was used and to determine a response for the case.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Tactic: Lateral Movement", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.netspi.com/how-to-access-rdp-over-a-reverse-ssh-tunnel/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.004", + "name": "SSH", + "reference": "https://attack.mitre.org/techniques/T1021/004/" + } + ] + } + ] + } + ], + "id": "44df0369-f87e-4c37-9852-05f414280449", + "rule_id": "76fd43b7-3480-4dd9-8ad7-8bd36bfad92f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n /* RDP port and usual SSH tunneling related switches in command line */\n process.args : \"*:3389\" and\n process.args : (\"-L\", \"-P\", \"-R\", \"-pw\", \"-ssh\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Enumeration Command Spawned via WMIPrvSE", + "description": "Identifies native Windows host and network enumeration commands spawned by the Windows Management Instrumentation Provider Service (WMIPrvSE).", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1018", + "name": "Remote System Discovery", + "reference": "https://attack.mitre.org/techniques/T1018/" + }, + { + "id": "T1087", + "name": "Account Discovery", + "reference": "https://attack.mitre.org/techniques/T1087/" + }, + { + "id": "T1518", + "name": "Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/" + }, + { + "id": "T1016", + "name": "System Network Configuration Discovery", + "reference": "https://attack.mitre.org/techniques/T1016/", + "subtechnique": [ + { + "id": "T1016.001", + "name": "Internet Connection Discovery", + "reference": "https://attack.mitre.org/techniques/T1016/001/" + } + ] + }, + { + "id": "T1057", + "name": "Process Discovery", + "reference": "https://attack.mitre.org/techniques/T1057/" + } + ] + } + ], + "id": "0d3286d3-bfba-49db-b8f4-51bf287c7691", + "rule_id": "770e0c4d-b998-41e5-a62e-c7901fd7f470", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name:\n (\n \"arp.exe\",\n \"dsquery.exe\",\n \"dsget.exe\",\n \"gpresult.exe\",\n \"hostname.exe\",\n \"ipconfig.exe\",\n \"nbtstat.exe\",\n \"net.exe\",\n \"net1.exe\",\n \"netsh.exe\",\n \"netstat.exe\",\n \"nltest.exe\",\n \"ping.exe\",\n \"qprocess.exe\",\n \"quser.exe\",\n \"qwinsta.exe\",\n \"reg.exe\",\n \"sc.exe\",\n \"systeminfo.exe\",\n \"tasklist.exe\",\n \"tracert.exe\",\n \"whoami.exe\"\n ) and\n process.parent.name:\"wmiprvse.exe\" and \n not (\n process.name : \"sc.exe\" and process.args : \"RemoteRegistry\" and process.args : \"start=\" and \n process.args : (\"demand\", \"disabled\")\n ) and\n not process.args : \"tenable_mw_scan\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Network Sweep Detected", + "description": "This rule identifies a potential network sweep. A network sweep is a method used by attackers to scan a target network, identifying active hosts, open ports, and available services to gather information on vulnerabilities and weaknesses. This reconnaissance helps them plan subsequent attacks and exploit potential entry points for unauthorized access, data theft, or other malicious activities. This rule proposes threshold logic to check for connection attempts from one source host to 10 or more destination hosts on commonly used network services.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Network", + "Tactic: Discovery", + "Tactic: Reconnaissance", + "Use Case: Network Security Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 5, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1046", + "name": "Network Service Discovery", + "reference": "https://attack.mitre.org/techniques/T1046/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0043", + "name": "Reconnaissance", + "reference": "https://attack.mitre.org/tactics/TA0043/" + }, + "technique": [ + { + "id": "T1595", + "name": "Active Scanning", + "reference": "https://attack.mitre.org/techniques/T1595/", + "subtechnique": [ + { + "id": "T1595.001", + "name": "Scanning IP Blocks", + "reference": "https://attack.mitre.org/techniques/T1595/001/" + } + ] + } + ] + } + ], + "id": "05649847-b1e7-42a2-83c8-1671ff0f1654", + "rule_id": "781f8746-2180-4691-890c-4c96d11ca91d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "destination.port : (21 or 22 or 23 or 25 or 139 or 445 or 3389 or 5985 or 5986) and \nsource.ip : (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n", + "threshold": { + "field": [ + "source.ip" + ], + "value": 1, + "cardinality": [ + { + "field": "destination.ip", + "value": 100 + } + ] + }, + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*", + "logs-endpoint.events.network-*" + ], + "language": "kuery" + }, + { + "name": "Unsigned DLL Loaded by Svchost", + "description": "Identifies an unsigned library created in the last 5 minutes and subsequently loaded by a shared windows service (svchost). Adversaries may use this technique to maintain persistence or run with System privileges.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1569", + "name": "System Services", + "reference": "https://attack.mitre.org/techniques/T1569/", + "subtechnique": [ + { + "id": "T1569.002", + "name": "Service Execution", + "reference": "https://attack.mitre.org/techniques/T1569/002/" + } + ] + } + ] + } + ], + "id": "e8a07e67-a2c7-4a67-8dd1-97f98480b141", + "rule_id": "78ef0c95-9dc2-40ac-a8da-5deb6293a14e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.Ext.relative_file_creation_time", + "type": "unknown", + "ecs": false + }, + { + "name": "dll.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "dll.hash.sha256", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "library where host.os.type == \"windows\" and\n\n process.executable : \n (\"?:\\\\Windows\\\\System32\\\\svchost.exe\", \"?:\\\\Windows\\\\Syswow64\\\\svchost.exe\") and \n \n dll.code_signature.trusted != true and \n \n not dll.code_signature.status : (\"trusted\", \"errorExpired\", \"errorCode_endpoint*\") and \n \n dll.hash.sha256 != null and \n \n (\n /* DLL created within 5 minutes of the library load event - compatible with Elastic Endpoint 8.4+ */\n dll.Ext.relative_file_creation_time <= 300 or \n \n /* unusual paths */\n dll.path :(\"?:\\\\ProgramData\\\\*\",\n \"?:\\\\Users\\\\*\",\n \"?:\\\\PerfLogs\\\\*\",\n \"?:\\\\Windows\\\\Tasks\\\\*\",\n \"?:\\\\Intel\\\\*\",\n \"?:\\\\AMD\\\\Temp\\\\*\",\n \"?:\\\\Windows\\\\AppReadiness\\\\*\",\n \"?:\\\\Windows\\\\ServiceState\\\\*\",\n \"?:\\\\Windows\\\\security\\\\*\",\n \"?:\\\\Windows\\\\IdentityCRL\\\\*\",\n \"?:\\\\Windows\\\\Branding\\\\*\",\n \"?:\\\\Windows\\\\csc\\\\*\",\n \"?:\\\\Windows\\\\DigitalLocker\\\\*\",\n \"?:\\\\Windows\\\\en-US\\\\*\",\n \"?:\\\\Windows\\\\wlansvc\\\\*\",\n \"?:\\\\Windows\\\\Prefetch\\\\*\",\n \"?:\\\\Windows\\\\Fonts\\\\*\",\n \"?:\\\\Windows\\\\diagnostics\\\\*\",\n \"?:\\\\Windows\\\\TAPI\\\\*\",\n \"?:\\\\Windows\\\\INF\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\Speech\\\\*\",\n \"?:\\\\windows\\\\tracing\\\\*\",\n \"?:\\\\windows\\\\IME\\\\*\",\n \"?:\\\\Windows\\\\Performance\\\\*\",\n \"?:\\\\windows\\\\intel\\\\*\",\n \"?:\\\\windows\\\\ms\\\\*\",\n \"?:\\\\Windows\\\\dot3svc\\\\*\",\n \"?:\\\\Windows\\\\panther\\\\*\",\n \"?:\\\\Windows\\\\RemotePackages\\\\*\",\n \"?:\\\\Windows\\\\OCR\\\\*\",\n \"?:\\\\Windows\\\\appcompat\\\\*\",\n \"?:\\\\Windows\\\\apppatch\\\\*\",\n \"?:\\\\Windows\\\\addins\\\\*\",\n \"?:\\\\Windows\\\\Setup\\\\*\",\n \"?:\\\\Windows\\\\Help\\\\*\",\n \"?:\\\\Windows\\\\SKB\\\\*\",\n \"?:\\\\Windows\\\\Vss\\\\*\",\n \"?:\\\\Windows\\\\servicing\\\\*\",\n \"?:\\\\Windows\\\\CbsTemp\\\\*\",\n \"?:\\\\Windows\\\\Logs\\\\*\",\n \"?:\\\\Windows\\\\WaaS\\\\*\",\n \"?:\\\\Windows\\\\twain_32\\\\*\",\n \"?:\\\\Windows\\\\ShellExperiences\\\\*\",\n \"?:\\\\Windows\\\\ShellComponents\\\\*\",\n \"?:\\\\Windows\\\\PLA\\\\*\",\n \"?:\\\\Windows\\\\Migration\\\\*\",\n \"?:\\\\Windows\\\\debug\\\\*\",\n \"?:\\\\Windows\\\\Cursors\\\\*\",\n \"?:\\\\Windows\\\\Containers\\\\*\",\n \"?:\\\\Windows\\\\Boot\\\\*\",\n \"?:\\\\Windows\\\\bcastdvr\\\\*\",\n \"?:\\\\Windows\\\\TextInput\\\\*\",\n \"?:\\\\Windows\\\\security\\\\*\",\n \"?:\\\\Windows\\\\schemas\\\\*\",\n \"?:\\\\Windows\\\\SchCache\\\\*\",\n \"?:\\\\Windows\\\\Resources\\\\*\",\n \"?:\\\\Windows\\\\rescache\\\\*\",\n \"?:\\\\Windows\\\\Provisioning\\\\*\",\n \"?:\\\\Windows\\\\PrintDialog\\\\*\",\n \"?:\\\\Windows\\\\PolicyDefinitions\\\\*\",\n \"?:\\\\Windows\\\\media\\\\*\",\n \"?:\\\\Windows\\\\Globalization\\\\*\",\n \"?:\\\\Windows\\\\L2Schemas\\\\*\",\n \"?:\\\\Windows\\\\LiveKernelReports\\\\*\",\n \"?:\\\\Windows\\\\ModemLogs\\\\*\",\n \"?:\\\\Windows\\\\ImmersiveControlPanel\\\\*\",\n \"?:\\\\$Recycle.Bin\\\\*\")\n ) and \n \n not dll.hash.sha256 : \n (\"3ed33e71641645367442e65dca6dab0d326b22b48ef9a4c2a2488e67383aa9a6\", \n \"b4db053f6032964df1b254ac44cb995ffaeb4f3ade09597670aba4f172cf65e4\", \n \"214c75f678bc596bbe667a3b520aaaf09a0e50c364a28ac738a02f867a085eba\", \n \"23aa95b637a1bf6188b386c21c4e87967ede80242327c55447a5bb70d9439244\", \n \"5050b025909e81ae5481db37beb807a80c52fc6dd30c8aa47c9f7841e2a31be7\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential File Transfer via Certreq", + "description": "Identifies Certreq making an HTTP Post request. Adversaries could abuse Certreq to download files or upload data to a remote URL.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Command and Control", + "Tactic: Exfiltration", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://lolbas-project.github.io/lolbas/Binaries/Certreq/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1567", + "name": "Exfiltration Over Web Service", + "reference": "https://attack.mitre.org/techniques/T1567/" + } + ] + } + ], + "id": "2b2ed2f9-7d35-40ff-86eb-b35eaa1d876c", + "rule_id": "79f0a1f7-ed6b-471c-8eb1-23abd6470b1c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"CertReq.exe\" or process.pe.original_file_name == \"CertReq.exe\") and process.args : \"-Post\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS ElastiCache Security Group Created", + "description": "Identifies when an ElastiCache security group has been created.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "A ElastiCache security group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security group creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSecurityGroup.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "d152e988-c72d-452e-b7ae-399104cf6506", + "rule_id": "7b3da11a-60a2-412e-8aa7-011e1eb9ed47", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:elasticache.amazonaws.com and event.action:\"Create Cache Security Group\" and\nevent.outcome:success\n", + "language": "kuery" + }, + { + "name": "Suspicious LSASS Access via MalSecLogon", + "description": "Identifies suspicious access to LSASS handle from a call trace pointing to seclogon.dll and with a suspicious access rights value. This may indicate an attempt to leak an LSASS handle via abusing the Secondary Logon service in preparation for credential access.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 206, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://splintercod3.blogspot.com/p/the-hidden-side-of-seclogon-part-3.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "7cdf0116-caf7-472b-8f4d-bcabef4ead5d", + "rule_id": "7ba58110-ae13-439b-8192-357b0fcfa9d7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.CallTrace", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.GrantedAccess", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetImage", + "type": "keyword", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.code == \"10\" and\n winlog.event_data.TargetImage : \"?:\\\\WINDOWS\\\\system32\\\\lsass.exe\" and\n\n /* seclogon service accessing lsass */\n winlog.event_data.CallTrace : \"*seclogon.dll*\" and process.name : \"svchost.exe\" and\n\n /* PROCESS_CREATE_PROCESS & PROCESS_DUP_HANDLE & PROCESS_QUERY_INFORMATION */\n winlog.event_data.GrantedAccess == \"0x14c0\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Suspicious WMIC XSL Script Execution", + "description": "Identifies WMIC allowlist bypass techniques by alerting on suspicious execution of scripts. When WMIC loads scripting libraries it may be indicative of an allowlist bypass.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1220", + "name": "XSL Script Processing", + "reference": "https://attack.mitre.org/techniques/T1220/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "34c828d3-6a36-48e0-b85b-eb7e07254d20", + "rule_id": "7f370d54-c0eb-4270-ac5a-9a6020585dc6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id with maxspan = 2m\n[process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"WMIC.exe\" or process.pe.original_file_name : \"wmic.exe\") and\n process.args : (\"format*:*\", \"/format*:*\", \"*-format*:*\") and\n not process.command_line : \"* /format:table *\"]\n[any where host.os.type == \"windows\" and (event.category == \"library\" or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : (\"jscript.dll\", \"vbscript.dll\") or file.name : (\"jscript.dll\", \"vbscript.dll\"))]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Enumeration of Kernel Modules via Proc", + "description": "Loadable Kernel Modules (or LKMs) are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. This identifies attempts to enumerate information about a kernel module using the /proc/modules filesystem. This filesystem is used by utilities such as lsmod and kmod to list the available kernel modules.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Setup\nThis rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system. \n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from. \nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /proc/ -p r -k audit_proc\n```\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", + "building_block_type": "default", + "version": 103, + "tags": [ + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Security tools and device drivers may run these programs in order to enumerate kernel modules. Use of these programs by ordinary users is uncommon. These can be exempted by process name or username." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "2f4ae1a4-ad2b-4a4c-ae2f-c85ae1d0434e", + "rule_id": "80084fa9-8677-4453-8680-b891d3c0c778", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "This rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system.\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /proc/ -p r -k audit_proc\n```\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", + "type": "new_terms", + "query": "host.os.type:linux and event.category:file and event.action:\"opened-file\" and file.path:\"/proc/modules\"\n", + "new_terms_fields": [ + "host.id", + "process.executable" + ], + "history_window_start": "now-7d", + "index": [ + "auditbeat-*", + "logs-auditd_manager.auditd-*" + ], + "language": "kuery" + }, + { + "name": "PowerShell Script Block Logging Disabled", + "description": "Identifies attempts to disable PowerShell Script Block Logging via registry modification. Attackers may disable this logging to conceal their activities in the host and evade detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Script Block Logging Disabled\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks, making it available in various environments and creating an attractive way for attackers to execute code.\n\nPowerShell Script Block Logging is a feature of PowerShell that records the content of all script blocks that it processes, giving defenders visibility of PowerShell scripts and sequences of executed commands.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check whether it makes sense for the user to use PowerShell to complete tasks.\n- Investigate if PowerShell scripts were run after logging was disabled.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- PowerShell Suspicious Discovery Related Windows API Functions - 61ac3638-40a3-44b2-855a-985636ca985e\n- PowerShell Keylogging Script - bd2c86a0-8b61-4457-ab38-96943984e889\n- PowerShell Suspicious Script with Audio Capture Capabilities - 2f2f4939-0b34-40c2-a0a3-844eb7889f43\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n- Suspicious .NET Reflection via PowerShell - e26f042e-c590-4e82-8e05-41e81bd822ad\n- PowerShell Suspicious Payload Encoded and Compressed - 81fe9dc6-a2d7-4192-a2d8-eed98afc766a\n- PowerShell Suspicious Script with Screenshot Capabilities - 959a7353-1129-4aa7-9084-30746b256a70\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://admx.help/?Category=Windows_10_2016&Policy=Microsoft.Policies.PowerShell::EnableScriptBlockLogging" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.002", + "name": "Disable Windows Event Logging", + "reference": "https://attack.mitre.org/techniques/T1562/002/" + } + ] + }, + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "49d19adb-a15f-485e-ab59-86937e4eb7c6", + "rule_id": "818e23e6-2094-4f0e-8c01-22d30f3506c6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\PowerShell\\\\ScriptBlockLogging\\\\EnableScriptBlockLogging\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\PowerShell\\\\ScriptBlockLogging\\\\EnableScriptBlockLogging\"\n ) and registry.data.strings : (\"0\", \"0x00000000\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Temporarily Scheduled Task Creation", + "description": "Indicates the creation and deletion of a scheduled task within a short time interval. Adversaries can use these to proxy malicious execution via the schedule service and perform clean up.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate scheduled tasks may be created during installation of new software." + ], + "references": [ + "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4698" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "c4753448-94c7-49e3-9623-506ad0d40317", + "rule_id": "81ff45f8-f8c2-4e28-992e-5a0e8d98e0fe", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TaskName", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "sequence by winlog.computer_name, winlog.event_data.TaskName with maxspan=5m\n [iam where event.action == \"scheduled-task-created\" and not user.name : \"*$\"]\n [iam where event.action == \"scheduled-task-deleted\" and not user.name : \"*$\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Attempt to Disable IPTables or Firewall", + "description": "Adversaries may attempt to disable the iptables or firewall service in an attempt to affect how a host is allowed to receive or send network traffic.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "3daabdd2-5583-461d-a956-15e696c223c3", + "rule_id": "83e9c2b3-24ef-4c1d-a8cd-5ebafb5dfa2f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and\n (\n /* disable FW */\n (\n (process.name == \"ufw\" and process.args == \"disable\") or\n (process.name == \"iptables\" and process.args == \"-F\" and process.args_count == 2)\n ) or\n\n /* stop FW service */\n (\n ((process.name == \"service\" and process.args == \"stop\") or\n (process.name == \"chkconfig\" and process.args == \"off\") or\n (process.name == \"systemctl\" and process.args in (\"disable\", \"stop\", \"kill\"))) and\n process.args in (\"firewalld\", \"ip6tables\", \"iptables\")\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Remote Credential Access via Registry", + "description": "Identifies remote access to the registry to potentially dump credential data from the Security Account Manager (SAM) registry hive in preparation for credential access and privileges elevation.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Remote Credential Access via Registry\n\nDumping registry hives is a common way to access credential information. Some hives store credential material, such as the SAM hive, which stores locally cached credentials (SAM secrets), and the SECURITY hive, which stores domain cached credentials (LSA secrets). Dumping these hives in combination with the SYSTEM hive enables the attacker to decrypt these secrets.\n\nAttackers can use tools like secretsdump.py or CrackMapExec to dump the registry hives remotely, and use dumped credentials to access other systems in the domain.\n\n#### Possible investigation steps\n\n- Identify the specifics of the involved assets, such as their role, criticality, and associated users.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Determine the privileges of the compromised accounts.\n- Investigate other alerts associated with the user/source host during the past 48 hours.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (e.g., 4624) to the target host.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Related rules\n\n- Credential Acquisition via Registry Hive Dumping - a7e7bfa3-088e-4f13-b29e-3986e0e756b8\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine if other hosts were compromised.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Reimage the host operating system or restore the compromised files to clean versions.\n- Ensure that the machine has the latest security updates and is not running unsupported Windows versions.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/SecureAuthCorp/impacket/blob/master/examples/secretsdump.py", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.002", + "name": "Security Account Manager", + "reference": "https://attack.mitre.org/techniques/T1003/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + } + ], + "id": "ec72664f-fce9-4507-b59f-2ab058f7c7b5", + "rule_id": "850d901a-2a3c-46c6-8b22-55398a01aad8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.header_bytes", + "type": "unknown", + "ecs": false + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "file.size", + "type": "long", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "This rule uses Elastic Endpoint file creation and system integration events for correlation. Both data should be collected from the host for this detection to work.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and\n event.action == \"creation\" and process.name : \"svchost.exe\" and\n file.Ext.header_bytes : \"72656766*\" and user.id : (\"S-1-5-21-*\", \"S-1-12-1-*\") and file.size >= 30000 and\n file.path : (\"?:\\\\Windows\\\\system32\\\\*.tmp\", \"?:\\\\WINDOWS\\\\Temp\\\\*.tmp\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-endpoint.events.*" + ] + }, + { + "name": "AWS EC2 Network Access Control List Deletion", + "description": "Identifies the deletion of an Amazon Elastic Compute Cloud (EC2) network access control list (ACL) or one of its ingress/egress entries.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Network Security Monitoring", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Network ACL's may be deleted by a network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Network ACL deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/delete-network-acl.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteNetworkAcl.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/delete-network-acl-entry.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteNetworkAclEntry.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "2affad75-ffe0-495a-9e87-1253e8631811", + "rule_id": "8623535c-1e17-44e1-aa97-7a0699c3037d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:(DeleteNetworkAcl or DeleteNetworkAclEntry) and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "AWS RDS Security Group Deletion", + "description": "Identifies the deletion of an Amazon Relational Database Service (RDS) Security group.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "An RDS security group deletion may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security group deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBSecurityGroup.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1531", + "name": "Account Access Removal", + "reference": "https://attack.mitre.org/techniques/T1531/" + } + ] + } + ], + "id": "d1fa7fbd-c2d8-42d3-8916-51fcfcd41c22", + "rule_id": "863cdf31-7fd3-41cf-a185-681237ea277b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:DeleteDBSecurityGroup and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "AWS IAM Group Deletion", + "description": "Identifies the deletion of a specified AWS Identity and Access Management (IAM) resource group. Deleting a resource group does not delete resources that are members of the group; it only deletes the group structure.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A resource group may be deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Resource group deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/delete-group.html", + "https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteGroup.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1531", + "name": "Account Access Removal", + "reference": "https://attack.mitre.org/techniques/T1531/" + } + ] + } + ], + "id": "12092623-9a06-468f-9cb2-99c8c0309054", + "rule_id": "867616ec-41e5-4edc-ada2-ab13ab45de8a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:DeleteGroup and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Security Software Discovery via Grep", + "description": "Identifies the use of the grep command to discover known third-party macOS and Linux security tools, such as Antivirus or Host Firewall details.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Security Software Discovery via Grep\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `grep` utility with arguments compatible to the enumeration of the security software installed on the host. Attackers can use this information to decide whether or not to infect a system, disable protections, use bypasses, etc.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, file modifications, and any spawned child processes.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Endpoint Security installers, updaters and post installation verification scripts." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1518", + "name": "Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/", + "subtechnique": [ + { + "id": "T1518.001", + "name": "Security Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/001/" + } + ] + } + ] + } + ], + "id": "cedd83a3-4970-45f2-b5d0-ee2d878f40a4", + "rule_id": "870aecc0-cea4-4110-af3f-e02e9b373655", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where event.type == \"start\" and\nprocess.name : \"grep\" and user.id != \"0\" and\n not process.parent.executable : \"/Library/Application Support/*\" and\n process.args :\n (\"Little Snitch*\",\n \"Avast*\",\n \"Avira*\",\n \"ESET*\",\n \"BlockBlock*\",\n \"360Sec*\",\n \"LuLu*\",\n \"KnockKnock*\",\n \"kav\",\n \"KIS\",\n \"RTProtectionDaemon*\",\n \"Malware*\",\n \"VShieldScanner*\",\n \"WebProtection*\",\n \"webinspectord*\",\n \"McAfee*\",\n \"isecespd*\",\n \"macmnsvc*\",\n \"masvc*\",\n \"kesl*\",\n \"avscan*\",\n \"guard*\",\n \"rtvscand*\",\n \"symcfgd*\",\n \"scmdaemon*\",\n \"symantec*\",\n \"sophos*\",\n \"osquery*\",\n \"elastic-endpoint*\"\n ) and\n not (\n (process.args : \"Avast\" and process.args : \"Passwords\") or\n (process.parent.args : \"/opt/McAfee/agent/scripts/ma\" and process.parent.args : \"checkhealth\") or\n (process.command_line : (\n \"grep ESET Command-line scanner, version %s -A2\",\n \"grep -i McAfee Web Gateway Core version:\",\n \"grep --color=auto ESET Command-line scanner, version %s -A2\"\n )\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "auditbeat-*" + ] + }, + { + "name": "Enumeration of Administrator Accounts", + "description": "Identifies instances of lower privilege accounts enumerating Administrator accounts or groups using built-in Windows tools.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Enumeration of Administrator Accounts\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `net` and `wmic` utilities to enumerate administrator-related users or groups in the domain and local machine scope. Attackers can use this information to plan their next steps of the attack, such as mapping targets for credential compromise and other post-exploitation activities.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Related rules\n\n- AdFind Command Activity - eda499b8-a073-4e35-9733-22ec71f57f3a\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1069", + "name": "Permission Groups Discovery", + "reference": "https://attack.mitre.org/techniques/T1069/", + "subtechnique": [ + { + "id": "T1069.001", + "name": "Local Groups", + "reference": "https://attack.mitre.org/techniques/T1069/001/" + }, + { + "id": "T1069.002", + "name": "Domain Groups", + "reference": "https://attack.mitre.org/techniques/T1069/002/" + } + ] + }, + { + "id": "T1087", + "name": "Account Discovery", + "reference": "https://attack.mitre.org/techniques/T1087/", + "subtechnique": [ + { + "id": "T1087.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1087/001/" + }, + { + "id": "T1087.002", + "name": "Domain Account", + "reference": "https://attack.mitre.org/techniques/T1087/002/" + } + ] + } + ] + } + ], + "id": "fab62d98-06b0-4332-ac4f-d302be9b6993", + "rule_id": "871ea072-1b71-4def-b016-6278b505138d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (((process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or\n ((process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and\n not process.parent.name : \"net.exe\")) and\n process.args : (\"group\", \"user\", \"localgroup\") and\n process.args : (\"*admin*\", \"Domain Admins\", \"Remote Desktop Users\", \"Enterprise Admins\", \"Organization Management\") and\n not process.args : \"/add\")\n\n or\n\n ((process.name : \"wmic.exe\" or process.pe.original_file_name == \"wmic.exe\") and\n process.args : (\"group\", \"useraccount\"))\n) and not user.id in (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS EventBridge Rule Disabled or Deleted", + "description": "Identifies when a user has disabled or deleted an EventBridge rule. This activity can result in an unintended loss of visibility in applications or a break in the flow with other AWS services.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-20m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "EventBridge Rules could be deleted or disabled by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. EventBridge Rules being deleted or disabled by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeleteRule.html", + "https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DisableRule.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1489", + "name": "Service Stop", + "reference": "https://attack.mitre.org/techniques/T1489/" + } + ] + } + ], + "id": "59ebd3d5-1027-4336-a7da-4be752035f6e", + "rule_id": "87594192-4539-4bc4-8543-23bc3d5bd2b4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:eventbridge.amazonaws.com and event.action:(DeleteRule or DisableRule) and\nevent.outcome:success\n", + "language": "kuery" + }, + { + "name": "Kerberos Traffic from Unusual Process", + "description": "Identifies network connections to the standard Kerberos port from an unusual process. On Windows, the only process that normally performs Kerberos traffic from a domain joined host is lsass.exe.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Kerberos Traffic from Unusual Process\n\nKerberos is the default authentication protocol in Active Directory, designed to provide strong authentication for client/server applications by using secret-key cryptography.\n\nDomain-joined hosts usually perform Kerberos traffic using the `lsass.exe` process. This rule detects the occurrence of traffic on the Kerberos port (88) by processes other than `lsass.exe` to detect the unusual request and usage of Kerberos tickets.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check if the Destination IP is related to a Domain Controller.\n- Review event ID 4769 for suspicious ticket requests.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This rule uses a Kerberos-related port but does not identify the protocol used on that port. HTTP traffic on a non-standard port or destination IP address unrelated to Domain controllers can create false positives.\n- Exceptions can be added for noisy/frequent connections.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n - Ticket requests can be used to investigate potentially compromised accounts.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "HTTP traffic on a non standard port. Verify that the destination IP address is not related to a Domain Controller." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/" + } + ] + } + ], + "id": "f1b3d84a-3bb5-4036-a90d-635ab847abea", + "rule_id": "897dc6b5-b39f-432a-8d75-d3730d50c782", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.address", + "type": "keyword", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + }, + { + "name": "source.port", + "type": "long", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "network where host.os.type == \"windows\" and event.type == \"start\" and network.direction : (\"outgoing\", \"egress\") and\n destination.port == 88 and source.port >= 49152 and process.pid != 4 and \n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\lsass.exe\",\n \"System\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Program Files\\\\Puppet Labs\\\\Puppet\\\\puppet\\\\bin\\\\ruby.exe\",\n \"\\\\device\\\\harddiskvolume?\\\\windows\\\\system32\\\\lsass.exe\",\n \"?:\\\\Program Files\\\\rapid7\\\\nexpose\\\\nse\\\\.DLLCACHE\\\\nseserv.exe\",\n \"?:\\\\Program Files (x86)\\\\GFI\\\\LanGuard 12 Agent\\\\lnsscomm.exe\",\n \"?:\\\\Program Files (x86)\\\\SuperScan\\\\scanner.exe\",\n \"?:\\\\Program Files (x86)\\\\Nmap\\\\nmap.exe\",\n \"?:\\\\Program Files\\\\Tenable\\\\Nessus\\\\nessusd.exe\",\n \"\\\\device\\\\harddiskvolume?\\\\program files (x86)\\\\nmap\\\\nmap.exe\",\n \"?:\\\\Program Files\\\\Docker\\\\Docker\\\\resources\\\\vpnkit.exe\",\n \"?:\\\\Program Files\\\\Docker\\\\Docker\\\\resources\\\\com.docker.vpnkit.exe\",\n \"?:\\\\Program Files\\\\VMware\\\\VMware View\\\\Server\\\\bin\\\\ws_TomcatService.exe\",\n \"?:\\\\Program Files (x86)\\\\DesktopCentral_Agent\\\\bin\\\\dcpatchscan.exe\",\n \"\\\\device\\\\harddiskvolume?\\\\program files (x86)\\\\nmap oem\\\\nmap.exe\",\n \"?:\\\\Program Files (x86)\\\\Nmap OEM\\\\nmap.exe\",\n \"?:\\\\Program Files (x86)\\\\Zscaler\\\\ZSATunnel\\\\ZSATunnel.exe\",\n \"?:\\\\Program Files\\\\JetBrains\\\\PyCharm Community Edition*\\\\bin\\\\pycharm64.exe\",\n \"?:\\\\Program Files (x86)\\\\Advanced Port Scanner\\\\advanced_port_scanner.exe\",\n \"?:\\\\Program Files (x86)\\\\nwps\\\\NetScanTools Pro\\\\NSTPRO.exe\",\n \"?:\\\\Program Files\\\\BlackBerry\\\\UEM\\\\Proxy Server\\\\bin\\\\prunsrv.exe\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Silverlight\\\\sllauncher.exe\",\n \"?:\\\\Windows\\\\System32\\\\MicrosoftEdgeCP.exe\",\n \"?:\\\\Windows\\\\SystemApps\\\\Microsoft.MicrosoftEdge_*\\\\MicrosoftEdge.exe\", \n \"?:\\\\Program Files (x86)\\\\Microsoft\\\\EdgeUpdate\\\\MicrosoftEdgeUpdate.exe\",\n \"?:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\", \n \"?:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\", \n \"?:\\\\Program Files (x86)\\\\Microsoft\\\\Edge\\\\Application\\\\msedge.exe\", \n \"?:\\\\Program Files\\\\Mozilla Firefox\\\\firefox.exe\", \n \"?:\\\\Program Files\\\\Internet Explorer\\\\iexplore.exe\",\n \"?:\\\\Program Files (x86)\\\\Internet Explorer\\\\iexplore.exe\"\n ) and\n destination.address != \"127.0.0.1\" and destination.address != \"::1\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Command Prompt Network Connection", + "description": "Identifies cmd.exe making a network connection. Adversaries could abuse cmd.exe to download or execute malware from a remote URL.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Command Prompt Network Connection\n\nAttackers commonly transfer tooling or malware from external systems into a compromised environment using a command and control channel. However, they can also abuse signed utilities to drop these files.\n\nThis rule looks for a network connection to an external address from the `cmd.exe` utility, which can indicate the abuse of the utility to download malicious files and tools.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n - Investigate the file digital signature and process original filename, if suspicious, treat it as potential malware.\n- Investigate the target host that the signed binary is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Examine if any file was downloaded and check if it is an executable or script.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the downloaded file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of destination IP address and file name conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Administrators may use the command prompt for regular administrative tasks. It's important to baseline your environment for network connections being made from the command prompt to determine any abnormal use of this tool." + ], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + } + ], + "id": "bf99ce78-5c0a-4da9-b82d-5cc2fc0420eb", + "rule_id": "89f9a4b0-9f8f-4ee0-8823-c4751a6d6696", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"cmd.exe\" and event.type == \"start\"]\n [network where host.os.type == \"windows\" and process.name : \"cmd.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\",\n \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\",\n \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Suspicious Execution from a Mounted Device", + "description": "Identifies when a script interpreter or signed binary is launched via a non-standard working directory. An attacker may use this technique to evade defenses.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.microsoft.com/security/blog/2021/05/27/new-sophisticated-email-based-attack-from-nobelium/", + "https://www.volexity.com/blog/2021/05/27/suspected-apt29-operation-launches-election-fraud-themed-phishing-campaigns/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.005", + "name": "Mshta", + "reference": "https://attack.mitre.org/techniques/T1218/005/" + }, + { + "id": "T1218.010", + "name": "Regsvr32", + "reference": "https://attack.mitre.org/techniques/T1218/010/" + }, + { + "id": "T1218.011", + "name": "Rundll32", + "reference": "https://attack.mitre.org/techniques/T1218/011/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + } + ], + "id": "5323ad13-618a-4dd8-ae62-4448b39ee416", + "rule_id": "8a1d4831-3ce6-4859-9891-28931fa6101d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.working_directory", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.executable : \"C:\\\\*\" and\n (process.working_directory : \"?:\\\\\" and not process.working_directory: \"C:\\\\\") and\n process.parent.name : \"explorer.exe\" and\n process.name : (\"rundll32.exe\", \"mshta.exe\", \"powershell.exe\", \"pwsh.exe\", \"cmd.exe\", \"regsvr32.exe\",\n \"cscript.exe\", \"wscript.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Suspicious JAVA Child Process", + "description": "Identifies suspicious child processes of the Java interpreter process. This may indicate an attempt to execute a malicious JAR file or an exploitation attempt via a JAVA specific vulnerability.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Java Child Process\n\nThis rule identifies a suspicious child process of the Java interpreter process. It may indicate an attempt to execute a malicious JAR file or an exploitation attempt via a Java specific vulnerability.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, file modifications, and any spawned child processes.\n- Examine the command line to determine if the command executed is potentially harmful or malicious.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of process and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 205, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.lunasec.io/docs/blog/log4j-zero-day/", + "https://github.com/christophetd/log4shell-vulnerable-app", + "https://www.blackhat.com/docs/us-16/materials/us-16-Munoz-A-Journey-From-JNDI-LDAP-Manipulation-To-RCE.pdf", + "https://www.elastic.co/security-labs/detecting-log4j2-with-elastic-security", + "https://www.elastic.co/security-labs/analysis-of-log4shell-cve-2021-45046" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.007", + "name": "JavaScript", + "reference": "https://attack.mitre.org/techniques/T1059/007/" + } + ] + } + ] + } + ], + "id": "956568ce-ec59-4be0-b4bf-468c3c3bff35", + "rule_id": "8acb7614-1d92-4359-bfcf-478b6d9de150", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "new_terms", + "query": "event.category:process and event.type:(\"start\" or \"process_started\") and process.parent.name:\"java\" and process.name:(\n \"sh\" or \"bash\" or \"dash\" or \"ksh\" or \"tcsh\" or \"zsh\" or \"curl\" or \"wget\"\n)\n", + "new_terms_fields": [ + "host.id", + "process.command_line" + ], + "history_window_start": "now-7d", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "RDP (Remote Desktop Protocol) from the Internet", + "description": "This rule detects network events that may indicate the use of RDP traffic from the Internet. RDP is commonly used by system administrators to remotely control a system for maintenance or to use shared resources. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "timeline_id": "300afc76-072d-4261-864d-4149714bf3f1", + "timeline_title": "Comprehensive Network Timeline", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Tactic: Command and Control", + "Domain: Endpoint", + "Use Case: Threat Detection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Some network security policies allow RDP directly from the Internet but usage that is unfamiliar to server or network owners can be unexpected and suspicious. RDP services may be exposed directly to the Internet in some networks such as cloud environments. In such cases, only RDP gateways, bastions or jump servers may be expected expose RDP directly to the Internet and can be exempted from this rule. RDP may be required by some work-flows such as remote access and support for specialized software products and servers. Such work-flows are usually known and not unexpected." + ], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + } + ], + "id": "739ffc2e-6a23-44be-afeb-6aadaf0d4eb0", + "rule_id": "8c1bdde8-4204-45c0-9e0c-c85ca3902488", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and (destination.port:3389 or event.dataset:zeek.rdp) and\n not source.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n ) and\n destination.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n )\n", + "language": "kuery" + }, + { + "name": "Unusual Child Process of dns.exe", + "description": "Identifies an unexpected process spawning from dns.exe, the process responsible for Windows DNS server services, which may indicate activity related to remote code execution or other forms of exploitation.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Child Process of dns.exe\n\nSIGRed (CVE-2020-1350) is a wormable, critical vulnerability in the Windows DNS server that affects Windows Server versions 2003 to 2019 and can be triggered by a malicious DNS response. Because the service is running in elevated privileges (SYSTEM), an attacker that successfully exploits it is granted Domain Administrator rights. This can effectively compromise the entire corporate infrastructure.\n\nThis rule looks for unusual children of the `dns.exe` process, which can indicate the exploitation of the SIGRed or a similar remote code execution vulnerability in the DNS server.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes.\n - Any suspicious or abnormal child process spawned from dns.exe should be carefully reviewed and investigated. It's impossible to predict what an adversary may deploy as the follow-on process after the exploit, but built-in discovery/enumeration utilities should be top of mind (`whoami.exe`, `netstat.exe`, `systeminfo.exe`, `tasklist.exe`).\n - Built-in Windows programs that contain capabilities used to download and execute additional payloads should also be considered. This is not an exhaustive list, but ideal candidates to start out would be: `mshta.exe`, `powershell.exe`, `regsvr32.exe`, `rundll32.exe`, `wscript.exe`, `wmic.exe`.\n - If a denial-of-service (DoS) exploit is successful and DNS Server service crashes, be mindful of potential child processes related to `werfault.exe` occurring.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the host during the past 48 hours.\n- Check whether the server is vulnerable to CVE-2020-1350.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system or restore the compromised server to a clean state.\n- Install the latest patches on systems that run Microsoft DNS Server.\n- Consider the implementation of a patch management system, such as the Windows Server Update Services (WSUS).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Werfault.exe will legitimately spawn when dns.exe crashes, but the DNS service is very stable and so this is a low occurring event. Denial of Service (DoS) attempts by intentionally crashing the service will also cause werfault.exe to spawn." + ], + "references": [ + "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/", + "https://msrc-blog.microsoft.com/2020/07/14/july-2020-security-update-cve-2020-1350-vulnerability-in-windows-domain-name-system-dns-server/", + "https://github.com/maxpl0it/CVE-2020-1350-DoS", + "https://www.elastic.co/security-labs/detection-rules-for-sigred-vulnerability" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "351e50f8-27ff-4c89-9de4-c56cdb3824de", + "rule_id": "8c37dc0e-e3ac-4c97-8aa0-cf6a9122de45", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"dns.exe\" and\n not process.name : \"conhost.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Privilege Escalation via PKEXEC", + "description": "Identifies an attempt to exploit a local privilege escalation in polkit pkexec (CVE-2021-4034) via unsecure environment variable injection. Successful exploitation allows an unprivileged user to escalate to the root user.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://seclists.org/oss-sec/2022/q1/80", + "https://haxx.in/files/blasty-vs-pkexec.c" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.007", + "name": "Path Interception by PATH Environment Variable", + "reference": "https://attack.mitre.org/techniques/T1574/007/" + } + ] + } + ] + } + ], + "id": "6271e4ed-42d2-46c1-89fe-1a44b98409f2", + "rule_id": "8da41fc9-7735-4b24-9cc6-c78dfc9fc9c9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "file where host.os.type == \"linux\" and file.path : \"/*GCONV_PATH*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Potential Port Monitor or Print Processor Registration Abuse", + "description": "Identifies port monitor and print processor registry modifications. Adversaries may abuse port monitor and print processors to run malicious DLLs during system boot that will be executed as SYSTEM for privilege escalation and/or persistence, if permissions allow writing a fully-qualified pathname for that DLL.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.welivesecurity.com/2020/05/21/no-game-over-winnti-group/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.010", + "name": "Port Monitors", + "reference": "https://attack.mitre.org/techniques/T1547/010/" + }, + { + "id": "T1547.012", + "name": "Print Processors", + "reference": "https://attack.mitre.org/techniques/T1547/012/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.010", + "name": "Port Monitors", + "reference": "https://attack.mitre.org/techniques/T1547/010/" + }, + { + "id": "T1547.012", + "name": "Print Processors", + "reference": "https://attack.mitre.org/techniques/T1547/012/" + } + ] + } + ] + } + ], + "id": "e9255167-487d-4de0-8f9f-78d1875aa7b6", + "rule_id": "8f3e91c7-d791-4704-80a1-42c160d7aa27", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Print\\\\Monitors\\\\*\",\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Print\\\\Environments\\\\Windows*\\\\Print Processors\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Print\\\\Monitors\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Print\\\\Environments\\\\Windows*\\\\Print Processors\\\\*\"\n ) and registry.data.strings : \"*.dll\" and\n /* exclude SYSTEM SID - look for changes by non-SYSTEM user */\n not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Hping Process Activity", + "description": "Hping ran on a Linux host. Hping is a FOSS command-line packet analyzer and has the ability to construct network packets for a wide variety of network security testing applications, including scanning and firewall auditing.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Normal use of hping is uncommon apart from security testing and research. Use by non-security engineers is very uncommon." + ], + "references": [ + "https://en.wikipedia.org/wiki/Hping" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "0f292dad-1d5b-4637-90da-eef02c652fa7", + "rule_id": "90169566-2260-4824-b8e4-8615c3b4ed52", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\"\nand process.name in (\"hping\", \"hping2\", \"hping3\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "AWS Deletion of RDS Instance or Cluster", + "description": "Identifies the deletion of an Amazon Relational Database Service (RDS) Aurora database cluster, global database cluster, or database instance.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Clusters or instances may be deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Cluster or instance deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/delete-db-cluster.html", + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBCluster.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/delete-global-cluster.html", + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteGlobalCluster.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/delete-db-instance.html", + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBInstance.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + } + ], + "id": "e1a91a83-fbe4-4052-a4a7-2f085e186c6b", + "rule_id": "9055ece6-2689-4224-a0e0-b04881e1f8ad", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:(DeleteDBCluster or DeleteGlobalCluster or DeleteDBInstance)\nand event.outcome:success\n", + "language": "kuery" + }, + { + "name": "AWS WAF Access Control List Deletion", + "description": "Identifies the deletion of a specified AWS Web Application Firewall (WAF) access control list.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Network Security Monitoring", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Firewall ACL's may be deleted by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Web ACL deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/waf-regional/delete-web-acl.html", + "https://docs.aws.amazon.com/waf/latest/APIReference/API_wafRegional_DeleteWebACL.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "bdb756d6-a8e1-445e-8809-e7c5f333a837", + "rule_id": "91d04cd4-47a9-4334-ab14-084abe274d49", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.action:DeleteWebACL and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "AWS Security Token Service (STS) AssumeRole Usage", + "description": "Identifies the use of AssumeRole. AssumeRole returns a set of temporary security credentials that can be used to access AWS resources. An adversary could use those credentials to move laterally and escalate privileges.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Automated processes that use Terraform may lead to false positives." + ], + "references": [ + "https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1550", + "name": "Use Alternate Authentication Material", + "reference": "https://attack.mitre.org/techniques/T1550/", + "subtechnique": [ + { + "id": "T1550.001", + "name": "Application Access Token", + "reference": "https://attack.mitre.org/techniques/T1550/001/" + } + ] + } + ] + } + ], + "id": "eb4da9f1-bcd8-4886-833d-5115ff352837", + "rule_id": "93075852-b0f5-4b8b-89c3-a226efae5726", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "aws.cloudtrail.user_identity.session_context.session_issuer.type", + "type": "keyword", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:sts.amazonaws.com and event.action:AssumedRole and\naws.cloudtrail.user_identity.session_context.session_issuer.type:Role and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Sudoers File Modification", + "description": "A sudoers file specifies the commands that users or groups can run and from which terminals. Adversaries can take advantage of these configurations to execute commands as other users or spawn processes with higher privileges.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 203, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.003", + "name": "Sudo and Sudo Caching", + "reference": "https://attack.mitre.org/techniques/T1548/003/" + } + ] + } + ] + } + ], + "id": "96f81a97-0db0-4111-8330-1642c04928de", + "rule_id": "931e25a5-0f5e-4ae0-ba0d-9e94eff7e3a4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "new_terms", + "query": "event.category:file and event.type:change and file.path:(/etc/sudoers* or /private/etc/sudoers*)\n", + "new_terms_fields": [ + "host.id", + "process.executable", + "file.path" + ], + "history_window_start": "now-7d", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "AWS VPC Flow Logs Deletion", + "description": "Identifies the deletion of one or more flow logs in AWS Elastic Compute Cloud (EC2). An adversary may delete flow logs in an attempt to evade defenses.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS VPC Flow Logs Deletion\n\nVPC Flow Logs is an AWS feature that enables you to capture information about the IP traffic going to and from network interfaces in your virtual private cloud (VPC). Flow log data can be published to Amazon CloudWatch Logs or Amazon S3.\n\nThis rule identifies the deletion of VPC flow logs using the API `DeleteFlowLogs` action. Attackers can do this to cover their tracks and impact security monitoring that relies on this source.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n- Administrators may rotate these logs after a certain period as part of their retention policy or after importing them to a SIEM.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Log Auditing", + "Resources: Investigation Guide", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Flow log deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/delete-flow-logs.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteFlowLogs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "49a2b4b3-eed7-4bde-9fc9-91e8c80f03f2", + "rule_id": "9395fd2c-9947-4472-86ef-4aceb2f7e872", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:DeleteFlowLogs and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Attempt to Create Okta API Token", + "description": "Detects attempts to create an Okta API token. An adversary may create an Okta API token to maintain access to an organization's network while they work to achieve their objectives. An attacker may abuse an API token to execute techniques such as creating user accounts or disabling security rules or policies.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "If the behavior of creating Okta API tokens is expected, consider adding exceptions to this rule to filter false positives." + ], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/" + } + ] + } + ], + "id": "691db767-4792-42f4-8072-bffd06f02162", + "rule_id": "96b9f4ea-0e8c-435b-8d53-2096e75fcac5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:system.api_token.create\n", + "language": "kuery" + }, + { + "name": "AWS SAML Activity", + "description": "Identifies when SAML activity has occurred in AWS. An adversary could manipulate SAML to maintain access to the target.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "SAML Provider could be updated by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. SAML Provider updates by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateSAMLProvider.html", + "https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithSAML.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1550", + "name": "Use Alternate Authentication Material", + "reference": "https://attack.mitre.org/techniques/T1550/", + "subtechnique": [ + { + "id": "T1550.001", + "name": "Application Access Token", + "reference": "https://attack.mitre.org/techniques/T1550/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "ca8b04a8-9484-4b78-b03e-8066927f4316", + "rule_id": "979729e7-0c52-4c4c-b71e-88103304a79f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:(iam.amazonaws.com or sts.amazonaws.com) and event.action:(Assumerolewithsaml or\nUpdateSAMLProvider) and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Suspicious Renaming of ESXI Files", + "description": "Identifies instances where VMware-related files, such as those with extensions like \".vmdk\", \".vmx\", \".vmxf\", \".vmsd\", \".vmsn\", \".vswp\", \".vmss\", \".nvram\", and \".vmem\", are renamed on a Linux system. The rule monitors for the \"rename\" event action associated with these file types, which could indicate malicious activity.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.003", + "name": "Rename System Utilities", + "reference": "https://attack.mitre.org/techniques/T1036/003/" + } + ] + } + ] + } + ], + "id": "afb6be8e-44d2-4c89-ad7d-fa6bd025eada", + "rule_id": "97db8b42-69d8-4bf3-9fd4-c69a1d895d68", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.original.name", + "type": "unknown", + "ecs": false + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "file where host.os.type == \"linux\" and event.action == \"rename\" and\nfile.Ext.original.name : (\"*.vmdk\", \"*.vmx\", \"*.vmxf\", \"*.vmsd\", \"*.vmsn\", \"*.vswp\", \"*.vmss\", \"*.nvram\", \"*.vmem\")\nand not file.name : (\"*.vmdk\", \"*.vmx\", \"*.vmxf\", \"*.vmsd\", \"*.vmsn\", \"*.vswp\", \"*.vmss\", \"*.nvram\", \"*.vmem\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "AWS EC2 Snapshot Activity", + "description": "An attempt was made to modify AWS EC2 snapshot attributes. Snapshots are sometimes shared by threat actors in order to exfiltrate bulk data from an EC2 fleet. If the permissions were modified, verify the snapshot was not shared with an unauthorized or unexpected AWS account.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS EC2 Snapshot Activity\n\nAmazon EC2 snapshots are a mechanism to create point-in-time references to data that reside in storage volumes. System administrators commonly use this for backup operations and data recovery.\n\nThis rule looks for the modification of snapshot attributes using the API `ModifySnapshotAttribute` action. This can be used to share snapshots with unauthorized third parties, giving others access to all the data on the snapshot.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Search for dry run attempts against the resource ID of the snapshot from other user accounts within CloudTrail.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences involving other users.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Check if the shared permissions of the snapshot were modified to `Public` or include unknown account IDs.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Exfiltration", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "IAM users may occasionally share EC2 snapshots with another AWS account belonging to the same organization. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/modify-snapshot-attribute.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifySnapshotAttribute.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1537", + "name": "Transfer Data to Cloud Account", + "reference": "https://attack.mitre.org/techniques/T1537/" + } + ] + } + ], + "id": "4dab877a-20e4-4cd9-b588-03dbb7e13ba4", + "rule_id": "98fd7407-0bd5-5817-cda0-3fcc33113a56", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:ModifySnapshotAttribute\n", + "language": "kuery" + }, + { + "name": "Suspicious Explorer Child Process", + "description": "Identifies a suspicious Windows explorer child process. Explorer.exe can be abused to launch malicious scripts or executables from a trusted parent process.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + }, + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + }, + { + "id": "T1059.005", + "name": "Visual Basic", + "reference": "https://attack.mitre.org/techniques/T1059/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "59959ed9-f4dd-4ba6-bee0-a7ff44499792", + "rule_id": "9a5b4e31-6cde-4295-9ff7-6be1b8567e1b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n process.name : (\"cscript.exe\", \"wscript.exe\", \"powershell.exe\", \"rundll32.exe\", \"cmd.exe\", \"mshta.exe\", \"regsvr32.exe\") or\n process.pe.original_file_name in (\"cscript.exe\", \"wscript.exe\", \"PowerShell.EXE\", \"RUNDLL32.EXE\", \"Cmd.Exe\", \"MSHTA.EXE\", \"REGSVR32.EXE\")\n ) and\n /* Explorer started via DCOM */\n process.parent.name : \"explorer.exe\" and process.parent.args : \"-Embedding\" and\n not process.parent.args:\n (\n /* Noisy CLSID_SeparateSingleProcessExplorerHost Explorer COM Class IDs */\n \"/factory,{5BD95610-9434-43C2-886C-57852CC8A120}\",\n \"/factory,{ceff45ee-c862-41de-aee2-a022c81eda92}\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Scheduled Tasks AT Command Enabled", + "description": "Identifies attempts to enable the Windows scheduled tasks AT command via the registry. Attackers may use this method to move laterally or persist locally. The AT command has been deprecated since Windows 8 and Windows Server 2012, but still exists for backwards compatibility.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-scheduledjob" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.002", + "name": "At", + "reference": "https://attack.mitre.org/techniques/T1053/002/" + } + ] + } + ] + } + ], + "id": "56a9b14d-7856-40ed-8dd0-abdf1de1d1d5", + "rule_id": "9aa0e1f6-52ce-42e1-abb3-09657cee2698", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\Configuration\\\\EnableAt\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\Configuration\\\\EnableAt\"\n ) and registry.data.strings : (\"1\", \"0x00000001\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Persistence via WMI Event Subscription", + "description": "An adversary can use Windows Management Instrumentation (WMI) to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. Adversaries may use the capabilities of WMI to subscribe to an event and execute arbitrary code when that event occurs, providing persistence on a system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.003", + "name": "Windows Management Instrumentation Event Subscription", + "reference": "https://attack.mitre.org/techniques/T1546/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "61cf1fcb-e940-4e30-a4e0-4f668ef83a35", + "rule_id": "9b6813a1-daf1-457e-b0e6-0bb4e55b8a4c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"wmic.exe\" or process.pe.original_file_name == \"wmic.exe\") and\n process.args : \"create\" and\n process.args : (\"ActiveScriptEventConsumer\", \"CommandLineEventConsumer\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Hosts File Modified", + "description": "The hosts file on endpoints is used to control manual IP address to hostname resolutions. The hosts file is the first point of lookup for DNS hostname resolution so if adversaries can modify the endpoint hosts file, they can route traffic to malicious infrastructure. This rule detects modifications to the hosts file on Microsoft Windows, Linux (Ubuntu or RHEL) and macOS systems.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "timeline_id": "4d4c0b59-ea83-483f-b8c1-8c360ee53c5c", + "timeline_title": "Comprehensive File Timeline", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Hosts File Modified\n\nOperating systems use the hosts file to map a connection between an IP address and domain names before going to domain name servers. Attackers can abuse this mechanism to route traffic to malicious infrastructure or disrupt security that depends on server communications. For example, Russian threat actors modified this file on a domain controller to redirect Duo MFA calls to localhost instead of the Duo server, which prevented the MFA service from contacting its server to validate MFA login. This effectively disabled MFA for active domain accounts because the default policy of Duo for Windows is to \"Fail open\" if the MFA server is unreachable. This can happen in any MFA implementation and is not exclusive to Duo. Find more details in this [CISA Alert](https://www.cisa.gov/uscert/ncas/alerts/aa22-074a).\n\nThis rule identifies modifications in the hosts file across multiple operating systems using process creation events for Linux and file events in Windows and macOS.\n\n#### Possible investigation steps\n\n- Identify the specifics of the involved assets, such as role, criticality, and associated users.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the changes to the hosts file by comparing it against file backups, volume shadow copies, and other restoration mechanisms.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and the configuration was justified.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider isolating the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges of the administrator account that performed the action.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: Windows", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Impact", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/beats/auditbeat/current/auditbeat-reference-yml.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1565", + "name": "Data Manipulation", + "reference": "https://attack.mitre.org/techniques/T1565/", + "subtechnique": [ + { + "id": "T1565.001", + "name": "Stored Data Manipulation", + "reference": "https://attack.mitre.org/techniques/T1565/001/" + } + ] + } + ] + } + ], + "id": "10903d7f-9deb-4fb1-a059-8b9ac9f3eb5f", + "rule_id": "9c260313-c811-4ec8-ab89-8f6530e0246c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "For Windows systems using Auditbeat, this rule requires adding `C:/Windows/System32/drivers/etc` as an additional path in the 'file_integrity' module of auditbeat.yml.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "any where\n\n /* file events for creation; file change events are not captured by some of the included sources for linux and so may\n miss this, which is the purpose of the process + command line args logic below */\n (\n event.category == \"file\" and event.type in (\"change\", \"creation\") and\n file.path : (\"/private/etc/hosts\", \"/etc/hosts\", \"?:\\\\Windows\\\\System32\\\\drivers\\\\etc\\\\hosts\") and \n not process.name in (\"dockerd\", \"rootlesskit\", \"podman\", \"crio\")\n )\n or\n\n /* process events for change targeting linux only */\n (\n event.category == \"process\" and event.type in (\"start\") and\n process.name in (\"nano\", \"vim\", \"vi\", \"emacs\", \"echo\", \"sed\") and\n process.args : (\"/etc/hosts\") and \n not process.parent.name in (\"dhclient-script\", \"google_set_hostname\")\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Command Shell Activity Started via RunDLL32", + "description": "Identifies command shell activity started via RunDLL32, which is commonly abused by attackers to host malicious code.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Credential Access", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Microsoft Windows installers leveraging RunDLL32 for installation." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.011", + "name": "Rundll32", + "reference": "https://attack.mitre.org/techniques/T1218/011/" + } + ] + } + ] + } + ], + "id": "0e71005e-cc1f-4639-9f91-bce1ea35d609", + "rule_id": "9ccf3ce0-0057-440a-91f5-870c6ad39093", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"cmd.exe\", \"powershell.exe\") and\n process.parent.name : \"rundll32.exe\" and process.parent.command_line != null and\n /* common FPs can be added here */\n not process.parent.args : (\"C:\\\\Windows\\\\System32\\\\SHELL32.dll,RunAsNewUser_RunDLL\",\n \"C:\\\\WINDOWS\\\\*.tmp,zzzzInvokeManagedCustomActionOutOfProc\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Microsoft Build Engine Started by a System Process", + "description": "An instance of MSBuild, the Microsoft Build Engine, was started by Explorer or the WMI (Windows Management Instrumentation) subsystem. This behavior is unusual and is sometimes used by malicious payloads.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [] + } + ], + "id": "93355c00-8736-454f-95a0-f6e1364be4d8", + "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"MSBuild.exe\" and\n process.parent.name : (\"explorer.exe\", \"wmiprvse.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "A scheduled task was updated", + "description": "Indicates the update of a scheduled task using Windows event logs. Adversaries can use these to establish persistence, by changing the configuration of a legit scheduled task. Some changes such as disabling or enabling a scheduled task are common and may may generate noise.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 8, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate scheduled tasks may be created during installation of new software." + ], + "references": [ + "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4698" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "68ba5269-2de6-4608-96ef-8b3e213ad13a", + "rule_id": "a02cb68e-7c93-48d1-93b2-2c39023308eb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.SubjectUserSid", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TaskName", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "iam where event.action == \"scheduled-task-updated\" and\n\n /* excluding tasks created by the computer account */\n not user.name : \"*$\" and \n not winlog.event_data.TaskName : \"*Microsoft*\" and \n not winlog.event_data.TaskName :\n (\"\\\\User_Feed_Synchronization-*\",\n \"\\\\OneDrive Reporting Task-S-1-5-21*\",\n \"\\\\OneDrive Reporting Task-S-1-12-1-*\",\n \"\\\\Hewlett-Packard\\\\HP Web Products Detection\",\n \"\\\\Hewlett-Packard\\\\HPDeviceCheck\", \n \"\\\\Microsoft\\\\Windows\\\\UpdateOrchestrator\\\\UpdateAssistant\", \n \"\\\\IpamDnsProvisioning\", \n \"\\\\Microsoft\\\\Windows\\\\UpdateOrchestrator\\\\UpdateAssistantAllUsersRun\", \n \"\\\\Microsoft\\\\Windows\\\\UpdateOrchestrator\\\\UpdateAssistantCalendarRun\", \n \"\\\\Microsoft\\\\Windows\\\\UpdateOrchestrator\\\\UpdateAssistantWakeupRun\", \n \"\\\\Microsoft\\\\Windows\\\\.NET Framework\\\\.NET Framework NGEN v*\", \n \"\\\\Microsoft\\\\VisualStudio\\\\Updates\\\\BackgroundDownload\") and \n not winlog.event_data.SubjectUserSid : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "File Deletion via Shred", + "description": "Malware or other files dropped or created on a system by an adversary may leave traces behind as to what was done within a network and how. Adversaries may remove these files over the course of an intrusion to keep their footprint low or remove them at the end as part of the post-intrusion cleanup process.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.004", + "name": "File Deletion", + "reference": "https://attack.mitre.org/techniques/T1070/004/" + } + ] + } + ] + } + ], + "id": "ca6b0023-b5d4-4918-8b75-f7be6f491160", + "rule_id": "a1329140-8de3-4445-9f87-908fb6d824f4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "query", + "index": [ + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:linux and event.type:start and process.name:shred and\nprocess.args:(\"-u\" or \"--remove\" or \"-z\" or \"--zero\") and not process.parent.name:logrotate\n", + "language": "kuery" + }, + { + "name": "Potential Reverse Shell Activity via Terminal", + "description": "Identifies the execution of a shell process with suspicious arguments which may be indicative of reverse shell activity.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Reverse Shell Activity via Terminal\n\nA reverse shell is a mechanism that's abused to connect back to an attacker-controlled system. It effectively redirects the system's input and output and delivers a fully functional remote shell to the attacker. Even private systems are vulnerable since the connection is outgoing. This activity is typically the result of vulnerability exploitation, malware infection, or penetration testing.\n\nThis rule identifies commands that are potentially related to reverse shell activities using shell applications.\n\n#### Possible investigation steps\n\n- Examine the command line and extract the target domain or IP address information.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - Scope other potentially compromised hosts in your environment by mapping hosts that also communicated with the domain or IP address.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, file modifications, and any spawned child processes.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Take actions to terminate processes and connections used by the attacker.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md", + "https://github.com/WangYihang/Reverse-Shell-Manager", + "https://www.netsparker.com/blog/web-security/understanding-reverse-shells/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "0ef72b8b-b96a-4c7a-91c0-9528b9ac6aa6", + "rule_id": "a1a0375f-22c2-48c0-81a4-7c2d11cc6856", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where event.type in (\"start\", \"process_started\") and\n process.name in (\"sh\", \"bash\", \"zsh\", \"dash\", \"zmodload\") and\n process.args : (\"*/dev/tcp/*\", \"*/dev/udp/*\", \"*zsh/net/tcp*\", \"*zsh/net/udp*\") and\n\n /* noisy FPs */\n not (process.parent.name : \"timeout\" and process.executable : \"/var/lib/docker/overlay*\") and\n not process.command_line : (\n \"*/dev/tcp/sirh_db/*\", \"*/dev/tcp/remoteiot.com/*\", \"*dev/tcp/elk.stag.one/*\", \"*dev/tcp/kafka/*\",\n \"*/dev/tcp/$0/$1*\", \"*/dev/tcp/127.*\", \"*/dev/udp/127.*\", \"*/dev/tcp/localhost/*\", \"*/dev/tcp/itom-vault/*\") and\n not process.parent.command_line : \"runc init\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "DNS-over-HTTPS Enabled via Registry", + "description": "Identifies when a user enables DNS-over-HTTPS. This can be used to hide internet activity or the process of exfiltrating data. With this enabled, an organization will lose visibility into data such as query type, response, and originating IP, which are used to determine bad actors.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://www.tenforums.com/tutorials/151318-how-enable-disable-dns-over-https-doh-microsoft-edge.html", + "https://chromeenterprise.google/policies/?policy=DnsOverHttpsMode" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + }, + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "9e528d55-826c-41df-9ca4-aabd36d89bb8", + "rule_id": "a22a09c2-2162-4df0-a356-9aacbeb56a04", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n (registry.path : \"*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Edge\\\\BuiltInDnsClientEnabled\" and\n registry.data.strings : \"1\") or\n (registry.path : \"*\\\\SOFTWARE\\\\Google\\\\Chrome\\\\DnsOverHttpsMode\" and\n registry.data.strings : \"secure\") or\n (registry.path : \"*\\\\SOFTWARE\\\\Policies\\\\Mozilla\\\\Firefox\\\\DNSOverHTTPS\" and\n registry.data.strings : \"1\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "PowerShell Mailbox Collection Script", + "description": "Detects PowerShell scripts that can be used to collect data from mailboxes. Adversaries may target user email to collect sensitive information.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Mailbox Collection Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nEmail mailboxes and their information can be valuable assets for attackers. Company mailboxes often contain sensitive information such as login credentials, intellectual property, financial data, and personal information, making them high-value targets for malicious actors.\n\nThis rule identifies scripts that contains methods and classes that can be abused to collect emails from local and remote mailboxes.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Determine whether the script was executed and capture relevant information, such as arguments that reveal intent or are indicators of compromise (IoCs).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Determine whether the script stores the captured data locally.\n- Investigate whether the script contains exfiltration capabilities and identify the exfiltration server.\n - Assess network data to determine if the host communicated with the exfiltration server.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and it is done with proper approval.\n\n### Related rules\n\n- Exporting Exchange Mailbox via PowerShell - 6aace640-e631-4870-ba8e-5fdda09325db\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If the involved host is not the Exchange server, isolate the host to prevent further post-compromise behavior.\n- Prioritize cases that involve personally identifiable information (PII) or other classified data.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Data Source: PowerShell Logs", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/dafthack/MailSniper/blob/master/MailSniper.ps1", + "https://github.com/center-for-threat-informed-defense/adversary_emulation_library/blob/master/apt29/Archive/CALDERA_DIY/evals/payloads/stepSeventeen_email.ps1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1114", + "name": "Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/", + "subtechnique": [ + { + "id": "T1114.001", + "name": "Local Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/001/" + }, + { + "id": "T1114.002", + "name": "Remote Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "861c7822-a0ed-4348-a170-37998f1ac7fd", + "rule_id": "a2d04374-187c-4fd9-b513-3ad4e7fdd67a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n (\n powershell.file.script_block_text : (\n \"Microsoft.Office.Interop.Outlook\" or\n \"Interop.Outlook.olDefaultFolders\" or\n \"::olFolderInBox\"\n ) or\n powershell.file.script_block_text : (\n \"Microsoft.Exchange.WebServices.Data.Folder\" or\n \"Microsoft.Exchange.WebServices.Data.FileAttachment\"\n )\n ) and not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "AWS IAM Assume Role Policy Update", + "description": "Identifies attempts to modify an AWS IAM Assume Role Policy. An adversary may attempt to modify the AssumeRolePolicy of a misconfigured role in order to gain the privileges of that role.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS IAM Assume Role Policy Update\n\nAn IAM role is an IAM identity that you can create in your account that has specific permissions. An IAM role is similar to an IAM user, in that it is an AWS identity with permission policies that determine what the identity can and cannot do in AWS. However, instead of being uniquely associated with one person, a role is intended to be assumable by anyone who needs it. Also, a role does not have standard long-term credentials such as a password or access keys associated with it. Instead, when you assume a role, it provides you with temporary security credentials for your role session.\n\nThe role trust policy is a JSON document in which you define the principals you trust to assume the role. This policy is a required resource-based policy that is attached to a role in IAM. An attacker may attempt to modify this policy by using the `UpdateAssumeRolePolicy` API action to gain the privileges of that role.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- False positives may occur due to the intended usage of the service. Tuning is needed in order to have higher confidence. Consider adding exceptions — preferably with a combination of the user agent and user ID conditions — to cover administrator activities and infrastructure as code tooling.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Use AWS [policy versioning](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-versioning.html) to restore the trust policy to the desired state.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Policy updates from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://labs.bishopfox.com/tech-blog/5-privesc-attack-vectors-in-aws" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "302f149f-3bab-4fa4-9a5d-ccfc97ba773d", + "rule_id": "a60326d7-dca7-4fb7-93eb-1ca03a1febbd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:UpdateAssumeRolePolicy and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Suspicious MS Office Child Process", + "description": "Identifies suspicious child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, Excel). These child processes are often launched during exploitation of Office applications or from documents with malicious macros.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious MS Office Child Process\n\nMicrosoft Office (MS Office) is a suite of applications designed to help with productivity and completing common tasks on a computer. You can create and edit documents containing text and images, work with data in spreadsheets and databases, and create presentations and posters. As it is some of the most-used software across companies, MS Office is frequently targeted for initial access. It also has a wide variety of capabilities that attackers can take advantage of.\n\nThis rule looks for suspicious processes spawned by MS Office programs. This is generally the result of the execution of malicious documents.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve MS Office documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/blog/vulnerability-summary-follina" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "b2794d6f-d24f-4e57-812f-58d8b41769e4", + "rule_id": "a624863f-a70d-417f-a7d2-7a404638d47f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"eqnedt32.exe\", \"excel.exe\", \"fltldr.exe\", \"msaccess.exe\", \"mspub.exe\", \"powerpnt.exe\", \"winword.exe\", \"outlook.exe\") and\n process.name : (\"Microsoft.Workflow.Compiler.exe\", \"arp.exe\", \"atbroker.exe\", \"bginfo.exe\", \"bitsadmin.exe\", \"cdb.exe\", \"certutil.exe\",\n \"cmd.exe\", \"cmstp.exe\", \"control.exe\", \"cscript.exe\", \"csi.exe\", \"dnx.exe\", \"dsget.exe\", \"dsquery.exe\", \"forfiles.exe\",\n \"fsi.exe\", \"ftp.exe\", \"gpresult.exe\", \"hostname.exe\", \"ieexec.exe\", \"iexpress.exe\", \"installutil.exe\", \"ipconfig.exe\",\n \"mshta.exe\", \"msxsl.exe\", \"nbtstat.exe\", \"net.exe\", \"net1.exe\", \"netsh.exe\", \"netstat.exe\", \"nltest.exe\", \"odbcconf.exe\",\n \"ping.exe\", \"powershell.exe\", \"pwsh.exe\", \"qprocess.exe\", \"quser.exe\", \"qwinsta.exe\", \"rcsi.exe\", \"reg.exe\", \"regasm.exe\",\n \"regsvcs.exe\", \"regsvr32.exe\", \"sc.exe\", \"schtasks.exe\", \"systeminfo.exe\", \"tasklist.exe\", \"tracert.exe\", \"whoami.exe\",\n \"wmic.exe\", \"wscript.exe\", \"xwizard.exe\", \"explorer.exe\", \"rundll32.exe\", \"hh.exe\", \"msdt.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Print Spooler SPL File Created", + "description": "Detects attempts to exploit privilege escalation vulnerabilities related to the Print Spooler service including CVE-2020-1048 and CVE-2020-1337.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Print Spooler SPL File Created\n\nPrint Spooler is a Windows service enabled by default in all Windows clients and servers. The service manages print jobs by loading printer drivers, receiving files to be printed, queuing them, scheduling, etc.\n\nThe Print Spooler service has some known vulnerabilities that attackers can abuse to escalate privileges to SYSTEM, like CVE-2020-1048 and CVE-2020-1337. This rule looks for unusual processes writing SPL files to the location `?:\\Windows\\System32\\spool\\PRINTERS\\`, which is an essential step in exploiting these vulnerabilities.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of process executable and file conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Ensure that the machine has the latest security updates and is not running legacy Windows versions.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://safebreach.com/Post/How-we-bypassed-CVE-2020-1048-Patch-and-got-CVE-2020-1337" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "d7c6379b-f4c5-42d4-8073-40c2583cd81e", + "rule_id": "a7ccae7b-9d2c-44b2-a061-98e5946971fa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.extension : \"spl\" and\n file.path : \"?:\\\\Windows\\\\System32\\\\spool\\\\PRINTERS\\\\*\" and\n not process.name : (\"spoolsv.exe\",\n \"printfilterpipelinesvc.exe\",\n \"PrintIsolationHost.exe\",\n \"splwow64.exe\",\n \"msiexec.exe\",\n \"poqexec.exe\") and\n not user.id : \"S-1-5-18\" and\n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\mmc.exe\",\n \"\\\\Device\\\\Mup\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Windows\\\\System32\\\\mmc.exe\",\n \"?:\\\\Windows\\\\System32\\\\printui.exe\",\n \"?:\\\\Windows\\\\System32\\\\mstsc.exe\",\n \"?:\\\\Windows\\\\System32\\\\spool\\\\*.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\PROGRA~1\\\\*.exe\",\n \"?:\\\\PROGRA~2\\\\*.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Persistence via Hidden Run Key Detected", + "description": "Identifies a persistence mechanism that utilizes the NtSetValueKey native API to create a hidden (null terminated) registry key. An adversary may use this method to hide from system utilities such as the Registry Editor (regedit).", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/outflanknl/SharpHide", + "https://github.com/ewhitehats/InvisiblePersistence/blob/master/InvisibleRegValues_Whitepaper.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "e0b831e3-37e9-40bf-bbcf-c980e394cbc4", + "rule_id": "a9b05c3b-b304-4bf9-970d-acdfaef2944c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "/* Registry Path ends with backslash */\nregistry where host.os.type == \"windows\" and /* length(registry.data.strings) > 0 and */\n registry.path : (\"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"HKU\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"HKLM\\\\Software\\\\WOW6432Node\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\\",\n \"HKU\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\WOW6432Node\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "IPSEC NAT Traversal Port Activity", + "description": "This rule detects events that could be describing IPSEC NAT Traversal traffic. IPSEC is a VPN technology that allows one system to talk to another using encrypted tunnels. NAT Traversal enables these tunnels to communicate over the Internet where one of the sides is behind a NAT router gateway. This may be common on your network, but this technique is also used by threat actors to avoid detection.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Tactic: Command and Control", + "Domain: Endpoint", + "Use Case: Threat Detection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Some networks may utilize these protocols but usage that is unfamiliar to local network administrators can be unexpected and suspicious. Because this port is in the ephemeral range, this rule may false under certain conditions, such as when an application server with a public IP address replies to a client which has used a UDP port in the range by coincidence. This is uncommon but such servers can be excluded." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [] + } + ], + "id": "25393177-2ba3-4fce-81af-097614f7d83d", + "rule_id": "a9cb3641-ff4b-4cdc-a063-b4b8d02a67c7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and network.transport:udp and destination.port:4500\n", + "language": "kuery" + }, + { + "name": "Threat Intel Hash Indicator Match", + "description": "This rule is triggered when a hash indicator from the Threat Intel Filebeat module or integrations has a match against an event that contains file hashes, such as antivirus alerts, process creation, library load, and file operation events.", + "risk_score": 99, + "severity": "critical", + "timeline_id": "495ad7a7-316e-4544-8a0f-9c098daee76e", + "timeline_title": "Generic Threat Match Timeline", + "license": "Elastic License v2", + "note": "## Triage and Analysis\n\n### Investigating Threat Intel Hash Indicator Match\n\nThreat Intel indicator match rules allow matching from a local observation, such as an endpoint event that records a file hash with an entry of a file hash stored within the Threat Intel integrations index. \n\nMatches are based on threat intelligence data that's been ingested during the last 30 days. Some integrations don't place expiration dates on their threat indicators, so we strongly recommend validating ingested threat indicators and reviewing match results. When reviewing match results, check associated activity to determine whether the event requires additional investigation.\n\nThis rule is triggered when a hash indicator from the Threat Intel Filebeat module or an indicator ingested from a threat intelligence integration matches against an event that contains file hashes, such as antivirus alerts, file operation events, etc.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Gain context about the field that matched the local observation. This information can be found in the `threat.indicator.matched.field` field.\n- Investigate the hash , which can be found in the `threat.indicator.matched.atomic` field:\n - Search for the existence and reputation of the hash in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n - Scope other potentially compromised hosts in your environment by mapping hosts with file operations involving the same hash.\n- Identify the process that created the file.\n - Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Enrich the information that you have right now by determining how the file was dropped, where it was downloaded from, etc. This can help you determine if the event is part of an ongoing campaign against the organization.\n- Retrieve the involved file and examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Using the data collected through the analysis, scope users targeted and other machines infected in the environment.\n\n### False Positive Analysis\n\n- Adversaries often use legitimate tools as network administrators, such as `PsExec` or `AdFind`. These tools are often included in indicator lists, which creates the potential for false positives.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nThis rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an [Elastic Agent integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#agent-ti-integration), the [Threat Intel module](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#ti-mod-integration), or a [custom integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#custom-ti-integration).\n\nMore information can be found [here](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html).", + "version": 4, + "tags": [ + "OS: Windows", + "Data Source: Elastic Endgame", + "Rule Type: Indicator Match" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "1h", + "from": "now-65m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-threatintel.html", + "https://www.elastic.co/guide/en/security/master/es-threat-intel-integrations.html", + "https://www.elastic.co/security/tip" + ], + "max_signals": 100, + "threat": [], + "id": "4655c9b1-78b5-49ef-b856-48734e8476e8", + "rule_id": "aab184d3-72b3-4639-b242-6597c99d8bca", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "dll.hash.*", + "type": "unknown", + "ecs": false + }, + { + "name": "file.hash.*", + "type": "unknown", + "ecs": false + }, + { + "name": "process.hash.*", + "type": "unknown", + "ecs": false + } + ], + "setup": "This rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an Elastic Agent integration, the Threat Intel module, or a custom integration.\n\nMore information can be found here.", + "type": "threat_match", + "query": "file.hash.*:* or process.hash.*:* or dll.hash.*:*\n", + "threat_query": "@timestamp >= \"now-30d/d\" and event.module:(threatintel or ti_*) and (threat.indicator.file.hash.*:* or threat.indicator.file.pe.imphash:*) and not labels.is_ioc_transform_source:\"true\"", + "threat_mapping": [ + { + "entries": [ + { + "field": "file.hash.md5", + "type": "mapping", + "value": "threat.indicator.file.hash.md5" + } + ] + }, + { + "entries": [ + { + "field": "file.hash.sha1", + "type": "mapping", + "value": "threat.indicator.file.hash.sha1" + } + ] + }, + { + "entries": [ + { + "field": "file.hash.sha256", + "type": "mapping", + "value": "threat.indicator.file.hash.sha256" + } + ] + }, + { + "entries": [ + { + "field": "dll.hash.md5", + "type": "mapping", + "value": "threat.indicator.file.hash.md5" + } + ] + }, + { + "entries": [ + { + "field": "dll.hash.sha1", + "type": "mapping", + "value": "threat.indicator.file.hash.sha1" + } + ] + }, + { + "entries": [ + { + "field": "dll.hash.sha256", + "type": "mapping", + "value": "threat.indicator.file.hash.sha256" + } + ] + }, + { + "entries": [ + { + "field": "process.hash.md5", + "type": "mapping", + "value": "threat.indicator.file.hash.md5" + } + ] + }, + { + "entries": [ + { + "field": "process.hash.sha1", + "type": "mapping", + "value": "threat.indicator.file.hash.sha1" + } + ] + }, + { + "entries": [ + { + "field": "process.hash.sha256", + "type": "mapping", + "value": "threat.indicator.file.hash.sha256" + } + ] + } + ], + "threat_index": [ + "filebeat-*", + "logs-ti_*" + ], + "index": [ + "auditbeat-*", + "endgame-*", + "filebeat-*", + "logs-*", + "winlogbeat-*" + ], + "threat_filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.category", + "negate": false, + "params": { + "query": "threat" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.category": "threat" + } + } + }, + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.kind", + "negate": false, + "params": { + "query": "enrichment" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.kind": "enrichment" + } + } + }, + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.type", + "negate": false, + "params": { + "query": "indicator" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.type": "indicator" + } + } + } + ], + "threat_indicator_path": "threat.indicator", + "threat_language": "kuery", + "language": "kuery" + }, + { + "name": "Suspicious WerFault Child Process", + "description": "A suspicious WerFault child process was detected, which may indicate an attempt to run via the SilentProcessExit registry key manipulation. Verify process details such as command line, network connections and file writes.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Custom Windows error reporting debugger or applications restarted by WerFault after a crash." + ], + "references": [ + "https://www.hexacorn.com/blog/2019/09/19/silentprocessexit-quick-look-under-the-hood/", + "https://www.hexacorn.com/blog/2019/09/20/werfault-command-line-switches-v0-1/", + "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Persistence/persistence_SilentProcessExit_ImageHijack_sysmon_13_1.evtx", + "https://blog.menasec.net/2021/01/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.012", + "name": "Image File Execution Options Injection", + "reference": "https://attack.mitre.org/techniques/T1546/012/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.012", + "name": "Image File Execution Options Injection", + "reference": "https://attack.mitre.org/techniques/T1546/012/" + } + ] + } + ] + } + ], + "id": "999fcbb4-5881-447d-85e3-c1f70ccc4d02", + "rule_id": "ac5012b8-8da8-440b-aaaf-aedafdea2dff", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n\n process.parent.name : \"WerFault.exe\" and \n \n /* args -s and -t used to execute a process via SilentProcessExit mechanism */\n (process.parent.args : \"-s\" and process.parent.args : \"-t\" and process.parent.args : \"-c\") and \n \n not process.executable : (\"?:\\\\Windows\\\\SysWOW64\\\\Initcrypt.exe\", \"?:\\\\Program Files (x86)\\\\Heimdal\\\\Heimdal.Guard.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Managed Code Hosting Process", + "description": "Identifies a suspicious managed code hosting process which could indicate code injection or other form of suspicious code execution.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.menasec.net/2019/07/interesting-difr-traces-of-net-clr.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + } + ], + "id": "ea690010-6af8-4956-b01e-a0c05b9cd356", + "rule_id": "acf738b5-b5b2-4acc-bad9-1e18ee234f40", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id with maxspan=5m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"wscript.exe\", \"cscript.exe\", \"mshta.exe\", \"wmic.exe\", \"regsvr32.exe\", \"svchost.exe\", \"dllhost.exe\", \"cmstp.exe\")]\n [file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.name : (\"wscript.exe.log\",\n \"cscript.exe.log\",\n \"mshta.exe.log\",\n \"wmic.exe.log\",\n \"svchost.exe.log\",\n \"dllhost.exe.log\",\n \"cmstp.exe.log\",\n \"regsvr32.exe.log\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Suspicious Portable Executable Encoded in Powershell Script", + "description": "Detects the presence of a portable executable (PE) in a PowerShell script by looking for its encoded header. Attackers embed PEs into PowerShell scripts to inject them into memory, avoiding defences by not writing to disk.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious Portable Executable Encoded in Powershell Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can abuse PowerShell in-memory capabilities to inject executables into memory without touching the disk, bypassing file-based security protections. These executables are generally base64 encoded.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the script using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- Suspicious .NET Reflection via PowerShell - e26f042e-c590-4e82-8e05-41e81bd822ad\n- PowerShell Suspicious Payload Encoded and Compressed - 81fe9dc6-a2d7-4192-a2d8-eed98afc766a\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Reimage the host operating system or restore the compromised files to clean versions.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + } + ], + "id": "9aed8efd-214a-41dd-ad31-dc79774b45f3", + "rule_id": "ad84d445-b1ce-4377-82d9-7c633f28bf9a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n TVqQAAMAAAAEAAAA\n ) and not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "File Transfer or Listener Established via Netcat", + "description": "A netcat process is engaging in network activity on a Linux host. Netcat is often used as a persistence mechanism by exporting a reverse shell or by serving a shell on a listening port. Netcat is also sometimes used for data exfiltration.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Netcat Network Activity\n\nNetcat is a dual-use command line tool that can be used for various purposes, such as port scanning, file transfers, and connection tests. Attackers can abuse its functionality for malicious purposes such creating bind shells or reverse shells to gain access to the target system.\n\nA reverse shell is a mechanism that's abused to connect back to an attacker-controlled system. It effectively redirects the system's input and output and delivers a fully functional remote shell to the attacker. Even private systems are vulnerable since the connection is outgoing.\n\nA bind shell is a type of backdoor that attackers set up on the target host and binds to a specific port to listen for an incoming connection from the attacker.\n\nThis rule identifies potential reverse shell or bind shell activity using Netcat by checking for the execution of Netcat followed by a network connection.\n\n#### Possible investigation steps\n\n- Examine the command line to identify if the command is suspicious.\n- Extract and examine the target domain or IP address.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - Scope other potentially compromised hosts in your environment by mapping hosts that also communicated with the domain or IP address.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, file modifications, and any spawned child processes.\n\n### False positive analysis\n\n- Netcat is a dual-use tool that can be used for benign or malicious activity. It is included in some Linux distributions, so its presence is not necessarily suspicious. Some normal use of this program, while uncommon, may originate from scripts, automation tools, and frameworks.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Block the identified indicators of compromise (IoCs).\n- Take actions to terminate processes and connections used by the attacker.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Netcat is a dual-use tool that can be used for benign or malicious activity. Netcat is included in some Linux distributions so its presence is not necessarily suspicious. Some normal use of this program, while uncommon, may originate from scripts, automation tools, and frameworks." + ], + "references": [ + "http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet", + "https://www.sans.org/security-resources/sec560/netcat_cheat_sheet_v1.pdf", + "https://en.wikipedia.org/wiki/Netcat", + "https://www.hackers-arise.com/hacking-fundamentals", + "https://null-byte.wonderhowto.com/how-to/hack-like-pro-use-netcat-swiss-army-knife-hacking-tools-0148657/", + "https://levelup.gitconnected.com/ethical-hacking-part-15-netcat-nc-and-netcat-f6a8f7df43fd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "5e8b60dc-a580-453e-9a10-cb3a8384b25b", + "rule_id": "adb961e0-cb74-42a0-af9e-29fc41f88f5f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"linux\" and event.type == \"start\" and\n process.name:(\"nc\",\"ncat\",\"netcat\",\"netcat.openbsd\",\"netcat.traditional\") and (\n /* bind shell to echo for command execution */\n (process.args:(\"-l\",\"-p\") and process.args:(\"-c\",\"echo\",\"$*\"))\n /* bind shell to specific port */\n or process.args:(\"-l\",\"-p\",\"-lp\")\n /* reverse shell to command-line interpreter used for command execution */\n or (process.args:(\"-e\") and process.args:(\"/bin/bash\",\"/bin/sh\"))\n /* file transfer via stdout */\n or process.args:(\">\",\"<\")\n /* file transfer via pipe */\n or (process.args:(\"|\") and process.args:(\"nc\",\"ncat\"))\n )]\n [network where host.os.type == \"linux\" and (process.name == \"nc\" or process.name == \"ncat\" or process.name == \"netcat\" or\n process.name == \"netcat.openbsd\" or process.name == \"netcat.traditional\")]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Shared Object Created or Changed by Previously Unknown Process", + "description": "This rule monitors the creation of shared object files by previously unknown processes. The creation of a shared object file involves compiling code into a dynamically linked library that can be loaded by other programs at runtime. While this process is typically used for legitimate purposes, malicious actors can leverage shared object files to execute unauthorized code, inject malicious functionality into legitimate processes, or bypass security controls. This allows malware to persist on the system, evade detection, and potentially compromise the integrity and confidentiality of the affected system and its data.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://threatpost.com/sneaky-malware-backdoors-linux/180158/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.006", + "name": "Dynamic Linker Hijacking", + "reference": "https://attack.mitre.org/techniques/T1574/006/" + } + ] + } + ] + } + ], + "id": "bdad6eb7-a340-4c18-af34-78ad072b0b90", + "rule_id": "aebaa51f-2a91-4f6a-850b-b601db2293f4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "host.os.type:linux and event.action:(creation or file_create_event or file_rename_event or rename) and \nfile.path:(/dev/shm/* or /usr/lib/*) and file.extension:so and \nprocess.name: ( * and not (\"5\" or \"dockerd\" or \"dpkg\" or \"rpm\" or \"snapd\" or \"exe\" or \"yum\" or \"vmis-launcher\"\n or \"pacman\" or \"apt-get\" or \"dnf\"))\n", + "new_terms_fields": [ + "host.id", + "file.path", + "process.executable" + ], + "history_window_start": "now-10d", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Remote File Copy via TeamViewer", + "description": "Identifies an executable or script file remotely downloaded via a TeamViewer transfer session.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remote File Copy via TeamViewer\n\nAttackers commonly transfer tooling or malware from external systems into a compromised environment using the command and control channel. However, they can also abuse legitimate utilities to drop these files.\n\nTeamViewer is a remote access and remote control tool used by helpdesks and system administrators to perform various support activities. It is also frequently used by attackers and scammers to deploy malware interactively and other malicious activities. This rule looks for the TeamViewer process creating files with suspicious extensions.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Contact the user to gather information about who and why was conducting the remote access.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check whether the company uses TeamViewer for the support activities and if there is a support ticket related to this access.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the company relies on TeamViewer to conduct remote access and the triage has not identified suspicious or malicious files.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.menasec.net/2019/11/hunting-for-suspicious-use-of.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + }, + { + "id": "T1219", + "name": "Remote Access Software", + "reference": "https://attack.mitre.org/techniques/T1219/" + } + ] + } + ], + "id": "414fb787-11dd-40d7-a2c6-99de88ab083f", + "rule_id": "b25a7df2-120a-4db2-bd3f-3e4b86b24bee", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and process.name : \"TeamViewer.exe\" and\n file.extension : (\"exe\", \"dll\", \"scr\", \"com\", \"bat\", \"ps1\", \"vbs\", \"vbe\", \"js\", \"wsh\", \"hta\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Network Connection via Compiled HTML File", + "description": "Compiled HTML files (.chm) are commonly distributed as part of the Microsoft HTML Help system. Adversaries may conceal malicious code in a CHM file and deliver it to a victim for execution. CHM content is loaded by the HTML Help executable program (hh.exe).", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Network Connection via Compiled HTML File\n\nCHM (Compiled HTML) files are a format for delivering online help files on Windows. CHM files are compressed compilations of various content, such as HTML documents, images, and scripting/web-related programming languages such as VBA, JScript, Java, and ActiveX.\n\nWhen users double-click CHM files, the HTML Help executable program (`hh.exe`) will execute them. `hh.exe` also can be used to execute code embedded in those files, PowerShell scripts, and executables. This makes it useful for attackers not only to proxy the execution of malicious payloads via a signed binary that could bypass security controls, but also to gain initial access to environments via social engineering methods.\n\nThis rule identifies network connections done by `hh.exe`, which can potentially indicate abuse to download malicious files or tooling, or masquerading.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Examine the command lines for suspicious activities.\n - Retrieve `.chm`, `.ps1`, and other files that were involved for further examination.\n - Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n - Investigate the file digital signature and process original filename, if suspicious, treat it as potential malware.\n- Investigate the target host that the signed binary is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executables, scripts and help files retrieved from the system using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.001", + "name": "Compiled HTML File", + "reference": "https://attack.mitre.org/techniques/T1218/001/" + } + ] + } + ] + } + ], + "id": "6d21dba8-a079-4e39-bd68-12095d8f63d7", + "rule_id": "b29ee2be-bf99-446c-ab1a-2dc0183394b8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"hh.exe\" and event.type == \"start\"]\n [network where host.os.type == \"windows\" and process.name : \"hh.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Suspicious Endpoint Security Parent Process", + "description": "A suspicious Endpoint Security parent process was detected. This may indicate a process hollowing or other form of code injection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + } + ], + "id": "d853b594-aef5-4db1-9454-8ccfaef37ee4", + "rule_id": "b41a13c6-ba45-4bab-a534-df53d0cfed6a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"esensor.exe\", \"elastic-endpoint.exe\") and\n process.parent.executable != null and\n /* add FPs here */\n not process.parent.executable : (\"C:\\\\Program Files\\\\Elastic\\\\*\",\n \"C:\\\\Windows\\\\System32\\\\services.exe\",\n \"C:\\\\Windows\\\\System32\\\\WerFault*.exe\",\n \"C:\\\\Windows\\\\System32\\\\wermgr.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Code Signing Policy Modification Through Built-in tools", + "description": "Identifies attempts to disable/modify the code signing policy through system native utilities. Code signing provides authenticity on a program, and grants the user with the ability to check whether the program has been tampered with. By allowing the execution of unsigned or self-signed code, threat actors can craft and execute malicious code.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Code Signing Policy Modification Through Built-in tools\n\nWindows Driver Signature Enforcement (DSE) is a security feature introduced by Microsoft to enforce that only signed drivers can be loaded and executed into the kernel (ring 0). This feature was introduced to prevent attackers from loading their malicious drivers on targets. If the driver has an invalid signature, the system will not allow it to be loaded.\n\nThis protection is essential for maintaining the security of the system. However, attackers or even administrators can disable this feature and load untrusted drivers, as this can put the system at risk. Therefore, it is important to keep this feature enabled and only load drivers from trusted sources to ensure the integrity and security of the system.\n\nThis rule identifies commands that can disable the Driver Signature Enforcement feature.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Use Osquery and endpoint driver events (`event.category = \"driver\"`) to investigate if suspicious drivers were loaded into the system after the command was executed.\n - !{osquery{\"label\":\"Osquery - Retrieve All Non-Microsoft Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE NOT (provider == \\\"Microsoft\\\" AND signed == \\\"1\\\")\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Unsigned Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE signed == \\\"0\\\"\\n\"}}\n- Identify the driver's `Device Name` and `Service Name`.\n- Check for alerts from the rules specified in the `Related Rules` section.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Related Rules\n\n- First Time Seen Driver Loaded - df0fd41e-5590-4965-ad5e-cd079ec22fa9\n- Untrusted Driver Loaded - d8ab1ec1-feeb-48b9-89e7-c12e189448aa\n- Code Signing Policy Modification Through Registry - da7733b1-fe08-487e-b536-0a04c6d8b0cd\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Disable and uninstall all suspicious drivers found in the system. This can be done via Device Manager. (Note that this step may require you to boot the system into Safe Mode.)\n- Remove the related services and registry keys found in the system. Note that the service will probably not stop if the driver is still installed.\n - This can be done via PowerShell `Remove-Service` cmdlet.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Remove and block malicious artifacts identified during triage.\n- Ensure that the Driver Signature Enforcement is enabled on the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1553", + "name": "Subvert Trust Controls", + "reference": "https://attack.mitre.org/techniques/T1553/", + "subtechnique": [ + { + "id": "T1553.006", + "name": "Code Signing Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1553/006/" + } + ] + } + ] + } + ], + "id": "f432de36-d82f-421a-bb1e-6fa4574b6949", + "rule_id": "b43570de-a908-4f7f-8bdb-b2df6ffd8c80", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name: \"bcdedit.exe\" or process.pe.original_file_name == \"bcdedit.exe\") and process.args: (\"-set\", \"/set\") and \n process.args: (\"TESTSIGNING\", \"nointegritychecks\", \"loadoptions\", \"DISABLE_INTEGRITY_CHECKS\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS STS GetSessionToken Abuse", + "description": "Identifies the suspicious use of GetSessionToken. Tokens could be created and used by attackers to move laterally and escalate privileges.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "GetSessionToken may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. GetSessionToken from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1550", + "name": "Use Alternate Authentication Material", + "reference": "https://attack.mitre.org/techniques/T1550/", + "subtechnique": [ + { + "id": "T1550.001", + "name": "Application Access Token", + "reference": "https://attack.mitre.org/techniques/T1550/001/" + } + ] + } + ] + } + ], + "id": "e733b9da-5fe6-44f9-a722-27ac2c232852", + "rule_id": "b45ab1d2-712f-4f01-a751-df3826969807", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "aws.cloudtrail.user_identity.type", + "type": "keyword", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:sts.amazonaws.com and event.action:GetSessionToken and\naws.cloudtrail.user_identity.type:IAMUser and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Clearing Windows Console History", + "description": "Identifies when a user attempts to clear console history. An adversary may clear the command history of a compromised account to conceal the actions undertaken during an intrusion.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Clearing Windows Console History\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can try to cover their tracks by clearing PowerShell console history. PowerShell has two different ways of logging commands: the built-in history and the command history managed by the PSReadLine module. This rule looks for the execution of commands that can clear the built-in PowerShell logs or delete the `ConsoleHost_history.txt` file.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Investigate the PowerShell logs on the SIEM to determine if there was suspicious behavior that an attacker may be trying to cover up.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n - Ensure that PowerShell auditing policies and log collection are in place to grant future visibility.", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://stefanos.cloud/kb/how-to-clear-the-powershell-command-history/", + "https://www.shellhacks.com/clear-history-powershell/", + "https://community.sophos.com/sophos-labs/b/blog/posts/powershell-command-history-forensics" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.003", + "name": "Clear Command History", + "reference": "https://attack.mitre.org/techniques/T1070/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "e2511d40-11c3-4506-9165-6d614611ab27", + "rule_id": "b5877334-677f-4fb9-86d5-a9721274223b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") or process.pe.original_file_name == \"PowerShell.EXE\") and\n (process.args : \"*Clear-History*\" or\n (process.args : (\"*Remove-Item*\", \"rm\") and process.args : (\"*ConsoleHost_history.txt*\", \"*(Get-PSReadlineOption).HistorySavePath*\")) or\n (process.args : \"*Set-PSReadlineOption*\" and process.args : \"*SaveNothing*\"))\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Elastic Agent Service Terminated", + "description": "Identifies the Elastic endpoint agent has stopped and is no longer running on the host. Adversaries may attempt to disable security monitoring tools in an attempt to evade detection or prevention capabilities during an intrusion. This may also indicate an issue with the agent itself and should be addressed to ensure defensive measures are back in a stable state.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: Windows", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "7f0bc96d-2a3a-4d83-a44a-8fee1315c9c9", + "rule_id": "b627cd12-dac4-11ec-9582-f661ea17fbcd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where\n/* net, sc or wmic stopping or deleting Elastic Agent on Windows */\n(event.type == \"start\" and\n process.name : (\"net.exe\", \"sc.exe\", \"wmic.exe\",\"powershell.exe\",\"taskkill.exe\",\"PsKill.exe\",\"ProcessHacker.exe\") and\n process.args : (\"stopservice\",\"uninstall\", \"stop\", \"disabled\",\"Stop-Process\",\"terminate\",\"suspend\") and\n process.args : (\"elasticendpoint\", \"Elastic Agent\",\"elastic-agent\",\"elastic-endpoint\"))\nor\n/* service or systemctl used to stop Elastic Agent on Linux */\n(event.type == \"end\" and\n (process.name : (\"systemctl\", \"service\") and\n process.args : \"elastic-agent\" and\n process.args : \"stop\")\n or\n /* pkill , killall used to stop Elastic Agent on Linux */\n ( event.type == \"end\" and process.name : (\"pkill\", \"killall\") and process.args: \"elastic-agent\")\n or\n /* Unload Elastic Agent extension on MacOS */\n (process.name : \"kextunload\" and\n process.args : \"com.apple.iokit.EndpointSecurity\" and\n event.action : \"end\"))\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Windows Script Interpreter Executing Process via WMI", + "description": "Identifies use of the built-in Windows script interpreters (cscript.exe or wscript.exe) being used to execute a process via Windows Management Instrumentation (WMI). This may be indicative of malicious activity.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.005", + "name": "Visual Basic", + "reference": "https://attack.mitre.org/techniques/T1059/005/" + } + ] + }, + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "4c2b427e-21af-4d8b-9c8c-394af39ef9bc", + "rule_id": "b64b183e-1a76-422d-9179-7b389513e74d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan = 5s\n [any where host.os.type == \"windows\" and \n (event.category : (\"library\", \"driver\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : \"wmiutils.dll\" or file.name : \"wmiutils.dll\") and process.name : (\"wscript.exe\", \"cscript.exe\")]\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"wmiprvse.exe\" and\n user.domain != \"NT AUTHORITY\" and\n (process.pe.original_file_name :\n (\n \"cscript.exe\",\n \"wscript.exe\",\n \"PowerShell.EXE\",\n \"Cmd.Exe\",\n \"MSHTA.EXE\",\n \"RUNDLL32.EXE\",\n \"REGSVR32.EXE\",\n \"MSBuild.exe\",\n \"InstallUtil.exe\",\n \"RegAsm.exe\",\n \"RegSvcs.exe\",\n \"msxsl.exe\",\n \"CONTROL.EXE\",\n \"EXPLORER.EXE\",\n \"Microsoft.Workflow.Compiler.exe\",\n \"msiexec.exe\"\n ) or\n process.executable : (\"C:\\\\Users\\\\*.exe\", \"C:\\\\ProgramData\\\\*.exe\")\n )\n ]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Administrator Privileges Assigned to an Okta Group", + "description": "Detects when an administrator role is assigned to an Okta group. An adversary may attempt to assign administrator privileges to an Okta group in order to assign additional permissions to compromised user accounts and maintain access to their target organization.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Administrator roles may be assigned to Okta users by a Super Admin user. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/administrators-admin-comparison.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "7147cc22-a902-43c9-9b58-0571efacc5a7", + "rule_id": "b8075894-0b62-46e5-977c-31275da34419", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:group.privilege.grant\n", + "language": "kuery" + }, + { + "name": "UAC Bypass Attempt with IEditionUpgradeManager Elevated COM Interface", + "description": "Identifies attempts to bypass User Account Control (UAC) by abusing an elevated COM Interface to launch a rogue Windows ClipUp program. Attackers may attempt to bypass UAC to stealthily execute code with elevated permissions.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/hfiref0x/UACME" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1559", + "name": "Inter-Process Communication", + "reference": "https://attack.mitre.org/techniques/T1559/", + "subtechnique": [ + { + "id": "T1559.001", + "name": "Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1559/001/" + } + ] + } + ] + } + ], + "id": "e297a638-8703-40ec-ae23-d916b6b47c28", + "rule_id": "b90cdde7-7e0d-4359-8bf0-2c112ce2008a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"Clipup.exe\" and\n not process.executable : \"C:\\\\Windows\\\\System32\\\\ClipUp.exe\" and process.parent.name : \"dllhost.exe\" and\n /* CLSID of the Elevated COM Interface IEditionUpgradeManager */\n process.parent.args : \"/Processid:{BD54C901-076B-434E-B6C7-17C531F4AB41}\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "SolarWinds Process Disabling Services via Registry", + "description": "Identifies a SolarWinds binary modifying the start type of a service to be disabled. An adversary may abuse this technique to manipulate relevant security services.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Initial Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + }, + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1195", + "name": "Supply Chain Compromise", + "reference": "https://attack.mitre.org/techniques/T1195/", + "subtechnique": [ + { + "id": "T1195.002", + "name": "Compromise Software Supply Chain", + "reference": "https://attack.mitre.org/techniques/T1195/002/" + } + ] + } + ] + } + ], + "id": "46dea7e7-bb76-4290-a342-99e0a15b3a72", + "rule_id": "b9960fef-82c6-4816-befa-44745030e917", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\Start\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\Start\"\n ) and\n registry.data.strings : (\"4\", \"0x00000004\") and\n process.name : (\n \"SolarWinds.BusinessLayerHost*.exe\",\n \"ConfigurationWizard*.exe\",\n \"NetflowDatabaseMaintenance*.exe\",\n \"NetFlowService*.exe\",\n \"SolarWinds.Administration*.exe\",\n \"SolarWinds.Collector.Service*.exe\",\n \"SolarwindsDiagnostics*.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Image Load (taskschd.dll) from MS Office", + "description": "Identifies a suspicious image load (taskschd.dll) from Microsoft Office processes. This behavior may indicate adversarial activity where a scheduled task is configured via Windows Component Object Model (COM). This technique can be used to configure persistence and evade monitoring by avoiding the usage of the traditional Windows binary (schtasks.exe) used to manage scheduled tasks.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16", + "https://www.clearskysec.com/wp-content/uploads/2020/10/Operation-Quicksand.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "9926572e-11ec-4882-aa83-787e01fcc974", + "rule_id": "baa5d22c-5e1c-4f33-bfc9-efa73bb53022", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "any where host.os.type == \"windows\" and\n (event.category : (\"library\", \"driver\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n process.name : (\"WINWORD.EXE\", \"EXCEL.EXE\", \"POWERPNT.EXE\", \"MSPUB.EXE\", \"MSACCESS.EXE\") and\n (dll.name : \"taskschd.dll\" or file.name : \"taskschd.dll\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS EC2 Encryption Disabled", + "description": "Identifies disabling of Amazon Elastic Block Store (EBS) encryption by default in the current region. Disabling encryption by default does not change the encryption status of your existing volumes.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Disabling encryption may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Disabling encryption by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/disable-ebs-encryption-by-default.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisableEbsEncryptionByDefault.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1565", + "name": "Data Manipulation", + "reference": "https://attack.mitre.org/techniques/T1565/", + "subtechnique": [ + { + "id": "T1565.001", + "name": "Stored Data Manipulation", + "reference": "https://attack.mitre.org/techniques/T1565/001/" + } + ] + } + ] + } + ], + "id": "7cbc260d-b1cd-48ed-a08c-856111202998", + "rule_id": "bb9b13b2-1700-48a8-a750-b43b0a72ab69", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:DisableEbsEncryptionByDefault and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential SYN-Based Network Scan Detected", + "description": "This rule identifies a potential SYN-Based port scan. A SYN port scan is a technique employed by attackers to scan a target network for open ports by sending SYN packets to multiple ports and observing the response. Attackers use this method to identify potential entry points or services that may be vulnerable to exploitation, allowing them to launch targeted attacks or gain unauthorized access to the system or network, compromising its security and potentially leading to data breaches or further malicious activities. This rule proposes threshold logic to check for connection attempts from one source host to 10 or more destination ports using 2 or less packets per port.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Network", + "Tactic: Discovery", + "Tactic: Reconnaissance", + "Use Case: Network Security Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 5, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1046", + "name": "Network Service Discovery", + "reference": "https://attack.mitre.org/techniques/T1046/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0043", + "name": "Reconnaissance", + "reference": "https://attack.mitre.org/tactics/TA0043/" + }, + "technique": [ + { + "id": "T1595", + "name": "Active Scanning", + "reference": "https://attack.mitre.org/techniques/T1595/", + "subtechnique": [ + { + "id": "T1595.001", + "name": "Scanning IP Blocks", + "reference": "https://attack.mitre.org/techniques/T1595/001/" + } + ] + } + ] + } + ], + "id": "c6e594b5-c901-4d6c-a020-42c78d7af293", + "rule_id": "bbaa96b9-f36c-4898-ace2-581acb00a409", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "network.packets", + "type": "long", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "destination.port : * and network.packets <= 2 and source.ip : (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n", + "threshold": { + "field": [ + "destination.ip", + "source.ip" + ], + "value": 1, + "cardinality": [ + { + "field": "destination.port", + "value": 250 + } + ] + }, + "index": [ + "logs-endpoint.events.network-*", + "logs-network_traffic.*", + "packetbeat-*", + "auditbeat-*", + "filebeat-*" + ], + "language": "kuery" + }, + { + "name": "AWS Root Login Without MFA", + "description": "Identifies attempts to login to AWS as the root user without using multi-factor authentication (MFA). Amazon AWS best practices indicate that the root user should be protected by MFA.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS Root Login Without MFA\n\nMulti-factor authentication (MFA) in AWS is a simple best practice that adds an extra layer of protection on top of your user name and password. With MFA enabled, when a user signs in to an AWS Management Console, they will be prompted for their user name and password, as well as for an authentication code from their AWS MFA device. Taken together, these multiple factors provide increased security for your AWS account settings and resources.\n\nFor more information about using MFA in AWS, access the [official documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa.html).\n\nThe AWS root account is the one identity that has complete access to all AWS services and resources in the account, which is created when the AWS account is created. AWS strongly recommends that you do not use the root user for your everyday tasks, even the administrative ones. Instead, adhere to the best practice of using the root user only to create your first IAM user. Then securely lock away the root user credentials and use them to perform only a few account and service management tasks. Amazon provides a [list of the tasks that require root user](https://docs.aws.amazon.com/general/latest/gr/root-vs-iam.html#aws_tasks-that-require-root).\n\nThis rule looks for attempts to log in to AWS as the root user without using multi-factor authentication (MFA), meaning the account is not secured properly.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Examine whether this activity is common in the environment by looking for past occurrences on your logs.\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user?\n- Examine the commands, API calls, and data management actions performed by the account in the last 24 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking access to servers,\nservices, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- While this activity is not inherently malicious, the root account must use MFA. The security team should address any potential benign true positive (B-TP), as this configuration can risk the entire cloud environment.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Identify the services or servers involved criticality.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify if there are any regulatory or legal ramifications related to this activity.\n- Configure multi-factor authentication for the user.\n- Follow security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Some organizations allow login with the root user without MFA, however, this is not considered best practice by AWS and increases the risk of compromised credentials." + ], + "references": [ + "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "175a9816-05c0-4db7-9672-e2cb26537ef9", + "rule_id": "bc0c6f0d-dab0-47a3-b135-0925f0a333bc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "aws.cloudtrail.console_login.additional_eventdata.mfa_used", + "type": "boolean", + "ecs": false + }, + { + "name": "aws.cloudtrail.user_identity.type", + "type": "keyword", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:signin.amazonaws.com and event.action:ConsoleLogin and\n aws.cloudtrail.user_identity.type:Root and\n aws.cloudtrail.console_login.additional_eventdata.mfa_used:false and\n event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential Non-Standard Port SSH connection", + "description": "Identifies potentially malicious processes communicating via a port paring typically not associated with SSH. For example, SSH over port 2200 or port 2222 as opposed to the traditional port 22. Adversaries may make changes to the standard port a protocol uses to bypass filtering or muddle analysis/parsing of network data.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "OS: macOS", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "SSH over ports apart from the traditional port 22 is highly uncommon. This rule alerts the usage of the such uncommon ports by the ssh service. Tuning is needed to have higher confidence. If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination whitelisted ports for such legitimate ssh activities." + ], + "references": [ + "https://attack.mitre.org/techniques/T1571/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1571", + "name": "Non-Standard Port", + "reference": "https://attack.mitre.org/techniques/T1571/" + } + ] + } + ], + "id": "e17bb076-6e10-448a-bd77-4b2e7e6c8610", + "rule_id": "bc8ca7e0-92fd-4b7c-b11e-ee0266b8d9c9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id with maxspan=1m\n [process where event.action == \"exec\" and process.name:\"ssh\" and not process.parent.name in (\n \"rsync\", \"pyznap\", \"git\", \"ansible-playbook\", \"scp\", \"pgbackrest\", \"git-lfs\", \"expect\", \"Sourcetree\", \"ssh-copy-id\",\n \"run\"\n )\n ]\n [network where process.name:\"ssh\" and event.action in (\"connection_attempted\", \"connection_accepted\") and \n destination.port != 22 and destination.ip != \"127.0.0.1\" and network.transport: \"tcp\"\n ]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Privileged Escalation via SamAccountName Spoofing", + "description": "Identifies a suspicious computer account name rename event, which may indicate an attempt to exploit CVE-2021-42278 to elevate privileges from a standard domain user to a user with domain admin privileges. CVE-2021-42278 is a security vulnerability that allows potential attackers to impersonate a domain controller via samAccountName attribute spoofing.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Use Case: Active Directory Monitoring", + "Data Source: Active Directory", + "Use Case: Vulnerability" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://support.microsoft.com/en-us/topic/kb5008102-active-directory-security-accounts-manager-hardening-changes-cve-2021-42278-5975b463-4c95-45e1-831a-d120004e258e", + "https://cloudbrothers.info/en/exploit-kerberos-samaccountname-spoofing/", + "https://github.com/cube0x0/noPac", + "https://twitter.com/exploitph/status/1469157138928914432", + "https://exploit.ph/cve-2021-42287-cve-2021-42278-weaponisation.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + }, + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "4d17fe9a-5178-4de9-9a94-f8b6fca23c37", + "rule_id": "bdcf646b-08d4-492c-870a-6c04e3700034", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.NewTargetUserName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.OldTargetUserName", + "type": "unknown", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "iam where event.action == \"renamed-user-account\" and\n /* machine account name renamed to user like account name */\n winlog.event_data.OldTargetUserName : \"*$\" and not winlog.event_data.NewTargetUserName : \"*$\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "AWS RDS Snapshot Restored", + "description": "Identifies when an attempt was made to restore an RDS Snapshot. Snapshots are sometimes shared by threat actors in order to exfiltrate bulk data or evade detection after performing malicious activities. If the permissions were modified, verify if the snapshot was shared with an unauthorized or unexpected AWS account.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Restoring snapshots may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Snapshot restoration by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceFromDBSnapshot.html", + "https://github.com/RhinoSecurityLabs/pacu/blob/master/pacu/modules/rds__explore_snapshots/main.py" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1578", + "name": "Modify Cloud Compute Infrastructure", + "reference": "https://attack.mitre.org/techniques/T1578/", + "subtechnique": [ + { + "id": "T1578.004", + "name": "Revert Cloud Instance", + "reference": "https://attack.mitre.org/techniques/T1578/004/" + } + ] + } + ] + } + ], + "id": "cf3ec842-e96b-4d5e-a0f0-9667fcd76bab", + "rule_id": "bf1073bf-ce26-4607-b405-ba1ed8e9e204", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:RestoreDBInstanceFromDBSnapshot and\nevent.outcome:success\n", + "language": "kuery" + }, + { + "name": "Creation or Modification of a new GPO Scheduled Task or Service", + "description": "Detects the creation or modification of a new Group Policy based scheduled task or service. These methods are used for legitimate system administration, but can also be abused by an attacker with domain admin permissions to execute a malicious payload remotely on all or a subset of the domain joined machines.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1484", + "name": "Domain Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1484/", + "subtechnique": [ + { + "id": "T1484.001", + "name": "Group Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1484/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "d0a15c33-39c3-4ecc-a984-f3d34adcdb56", + "rule_id": "c0429aa8-9974-42da-bfb6-53a0a515a145", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.path : (\"?:\\\\Windows\\\\SYSVOL\\\\domain\\\\Policies\\\\*\\\\MACHINE\\\\Preferences\\\\ScheduledTasks\\\\ScheduledTasks.xml\",\n \"?:\\\\Windows\\\\SYSVOL\\\\domain\\\\Policies\\\\*\\\\MACHINE\\\\Preferences\\\\Services\\\\Services.xml\") and\n not process.name : \"dfsrs.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Renaming of ESXI index.html File", + "description": "Identifies instances where the \"index.html\" file within the \"/usr/lib/vmware/*\" directory is renamed on a Linux system. The rule monitors for the \"rename\" event action associated with this specific file and path, which could indicate malicious activity.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.003", + "name": "Rename System Utilities", + "reference": "https://attack.mitre.org/techniques/T1036/003/" + } + ] + } + ] + } + ], + "id": "ae9e1522-481e-43de-aede-2b82a712992c", + "rule_id": "c125e48f-6783-41f0-b100-c3bf1b114d16", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.original.path", + "type": "unknown", + "ecs": false + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "file where host.os.type == \"linux\" and event.action == \"rename\" and file.name : \"index.html\" and\nfile.Ext.original.path : \"/usr/lib/vmware/*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "AWS EC2 Full Network Packet Capture Detected", + "description": "Identifies potential Traffic Mirroring in an Amazon Elastic Compute Cloud (EC2) instance. Traffic Mirroring is an Amazon VPC feature that you can use to copy network traffic from an Elastic network interface. This feature can potentially be abused to exfiltrate sensitive data from unencrypted internal traffic.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Network Security Monitoring", + "Tactic: Exfiltration", + "Tactic: Collection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Traffic Mirroring may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Traffic Mirroring from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TrafficMirrorFilter.html", + "https://github.com/easttimor/aws-incident-response" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1020", + "name": "Automated Exfiltration", + "reference": "https://attack.mitre.org/techniques/T1020/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1074", + "name": "Data Staged", + "reference": "https://attack.mitre.org/techniques/T1074/" + } + ] + } + ], + "id": "d34b86b9-0881-49c6-9da0-8d5bdfc55f6d", + "rule_id": "c1812764-0788-470f-8e74-eb4a14d47573", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and\nevent.action:(CreateTrafficMirrorFilter or CreateTrafficMirrorFilterRule or CreateTrafficMirrorSession or CreateTrafficMirrorTarget) and\nevent.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential Remote Desktop Shadowing Activity", + "description": "Identifies the modification of the Remote Desktop Protocol (RDP) Shadow registry or the execution of processes indicative of an active RDP shadowing session. An adversary may abuse the RDP Shadowing feature to spy on or control other users active RDP sessions.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://bitsadm.in/blog/spying-on-users-using-rdp-shadowing", + "https://swarm.ptsecurity.com/remote-desktop-services-shadowing/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.001", + "name": "Remote Desktop Protocol", + "reference": "https://attack.mitre.org/techniques/T1021/001/" + } + ] + } + ] + } + ], + "id": "d3883a42-3675-4e82-8ce8-fbf0926afa12", + "rule_id": "c57f8579-e2a5-4804-847f-f2732edc5156", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "/* Identifies the modification of RDP Shadow registry or\n the execution of processes indicative of active shadow RDP session */\n\nany where host.os.type == \"windows\" and\n(\n (event.category == \"registry\" and\n registry.path : (\n \"HKLM\\\\Software\\\\Policies\\\\Microsoft\\\\Windows NT\\\\Terminal Services\\\\Shadow\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Policies\\\\Microsoft\\\\Windows NT\\\\Terminal Services\\\\Shadow\"\n )\n ) or\n (event.category == \"process\" and event.type == \"start\" and\n (process.name : (\"RdpSaUacHelper.exe\", \"RdpSaProxy.exe\") and process.parent.name : \"svchost.exe\") or\n (process.pe.original_file_name : \"mstsc.exe\" and process.args : \"/shadow:*\")\n )\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Microsoft Build Engine Started by an Office Application", + "description": "An instance of MSBuild, the Microsoft Build Engine, was started by Excel or Word. This is unusual behavior for the Build Engine and could have been caused by an Excel or Word document executing a malicious script payload.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Microsoft Build Engine Started by an Office Application\n\nMicrosoft Office (MS Office) is a suite of applications designed to help with productivity and completing common tasks on a computer. You can create and edit documents containing text and images, work with data in spreadsheets and databases, and create presentations and posters. As it is some of the most-used software across companies, MS Office is frequently targeted for initial access. It also has a wide variety of capabilities that attackers can take advantage of.\n\nThe Microsoft Build Engine is a platform for building applications. This engine, also known as MSBuild, provides an XML schema for a project file that controls how the build platform processes and builds software, and can be abused to proxy execution of code.\n\nThis rule looks for the `Msbuild.exe` utility spawned by MS Office programs. This is generally the result of the execution of malicious documents.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve MS Office documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual. It is quite unusual for this program to be started by an Office application like Word or Excel." + ], + "references": [ + "https://blog.talosintelligence.com/2020/02/building-bypass-with-msbuild.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [] + } + ], + "id": "6b6aecb4-b2ef-4171-ad90-cfb4001e71ea", + "rule_id": "c5dc3223-13a2-44a2-946c-e9dc0aa0449c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"MSBuild.exe\" and\n process.parent.name : (\"eqnedt32.exe\",\n \"excel.exe\",\n \"fltldr.exe\",\n \"msaccess.exe\",\n \"mspub.exe\",\n \"outlook.exe\",\n \"powerpnt.exe\",\n \"winword.exe\" )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Remote File Download via MpCmdRun", + "description": "Identifies the Windows Defender configuration utility (MpCmdRun.exe) being used to download a remote file.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remote File Download via MpCmdRun\n\nAttackers commonly transfer tooling or malware from external systems into a compromised environment using the command and control channel. However, they can also abuse signed utilities to drop these files.\n\nThe `MpCmdRun.exe` is a command-line tool part of Windows Defender and is used to manage various Microsoft Windows Defender Antivirus settings and perform certain tasks. It can also be abused by attackers to download remote files, including malware and offensive tooling. This rule looks for the patterns used to perform downloads using the utility.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check the reputation of the domain or IP address used to host the downloaded file.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://twitter.com/mohammadaskar2/status/1301263551638761477", + "https://www.bleepingcomputer.com/news/microsoft/microsoft-defender-can-ironically-be-used-to-download-malware/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + } + ], + "id": "99ebadd9-aa28-49ed-b1ad-645f685bccb6", + "rule_id": "c6453e73-90eb-4fe7-a98c-cde7bbfc504a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"MpCmdRun.exe\" or process.pe.original_file_name == \"MpCmdRun.exe\") and\n process.args : \"-DownloadFile\" and process.args : \"-url\" and process.args : \"-path\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Attempt to Modify an Okta Application", + "description": "Detects attempts to modify an Okta application. An adversary may attempt to modify, deactivate, or delete an Okta application in order to weaken an organization's security controls or disrupt their business operations.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if your organization's Okta applications are regularly modified and the behavior is expected." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Apps/Apps_Apps.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [] + } + ], + "id": "f45cd327-0037-4783-857b-16cfd6457804", + "rule_id": "c74fd275-ab2c-4d49-8890-e2943fa65c09", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:application.lifecycle.update\n", + "language": "kuery" + }, + { + "name": "Unusual File Modification by dns.exe", + "description": "Identifies an unexpected file being modified by dns.exe, the process responsible for Windows DNS Server services, which may indicate activity related to remote code execution or other forms of exploitation.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual File Write\nDetection alerts from this rule indicate potential unusual/abnormal file writes from the DNS Server service process (`dns.exe`) after exploitation from CVE-2020-1350 (SigRed) has occurred. Here are some possible avenues of investigation:\n- Post-exploitation, adversaries may write additional files or payloads to the system as additional discovery/exploitation/persistence mechanisms.\n- Any suspicious or abnormal files written from `dns.exe` should be reviewed and investigated with care.", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/", + "https://msrc-blog.microsoft.com/2020/07/14/july-2020-security-update-cve-2020-1350-vulnerability-in-windows-domain-name-system-dns-server/", + "https://www.elastic.co/security-labs/detection-rules-for-sigred-vulnerability" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "4df37982-b626-489e-953a-6c347a80de3e", + "rule_id": "c7ce36c0-32ff-4f9a-bfc2-dcb242bf99f9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and process.name : \"dns.exe\" and event.type in (\"creation\", \"deletion\", \"change\") and\n not file.name : \"dns.log\" and not\n (file.extension : (\"old\", \"temp\", \"bak\", \"dns\", \"arpa\") and file.path : \"C:\\\\Windows\\\\System32\\\\dns\\\\*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "SMB (Windows File Sharing) Activity to the Internet", + "description": "This rule detects network events that may indicate the use of Windows file sharing (also called SMB or CIFS) traffic to the Internet. SMB is commonly used within networks to share files, printers, and other system resources amongst trusted systems. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector or for data exfiltration.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Tactic: Initial Access", + "Domain: Endpoint", + "Use Case: Threat Detection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1048", + "name": "Exfiltration Over Alternative Protocol", + "reference": "https://attack.mitre.org/techniques/T1048/" + } + ] + } + ], + "id": "cba0f52a-b4c8-4c82-8ae2-91f67c25ab1b", + "rule_id": "c82b2bd8-d701-420c-ba43-f11a155b681a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and (destination.port:(139 or 445) or event.dataset:zeek.smb) and\n source.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n ) and\n not destination.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n )\n", + "language": "kuery" + }, + { + "name": "Direct Outbound SMB Connection", + "description": "Identifies unexpected processes making network connections over port 445. Windows File Sharing is typically implemented over Server Message Block (SMB), which communicates between hosts using port 445. When legitimate, these network connections are established by the kernel. Processes making 445/tcp connections may be port scanners, exploits, or suspicious user-level processes moving laterally.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Direct Outbound SMB Connection\n\nThis rule looks for unexpected processes making network connections over port 445. Windows file sharing is typically implemented over Server Message Block (SMB), which communicates between hosts using port 445. When legitimate, these network connections are established by the kernel (PID 4). Occurrences of non-system processes using this port can indicate port scanners, exploits, and tools used to move laterally on the environment.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.002", + "name": "SMB/Windows Admin Shares", + "reference": "https://attack.mitre.org/techniques/T1021/002/" + } + ] + } + ] + } + ], + "id": "4f5fe0ce-44d5-4142-8170-bf3ec6e3609b", + "rule_id": "c82c7d8f-fb9e-4874-a4bd-fd9e3f9becf1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.pid != 4 and\n not (process.executable : \"D:\\\\EnterpriseCare\\\\tools\\\\jre.1\\\\bin\\\\java.exe\" and process.args : \"com.emeraldcube.prism.launcher.Invoker\") and\n not (process.executable : \"C:\\\\Docusnap 11\\\\Tools\\\\nmap\\\\nmap.exe\" and process.args : \"smb-os-discovery.nse\") and\n not process.executable :\n (\"?:\\\\Program Files\\\\SentinelOne\\\\Sentinel Agent *\\\\Ranger\\\\SentinelRanger.exe\",\n \"?:\\\\Program Files\\\\Ivanti\\\\Security Controls\\\\ST.EngineHost.exe\",\n \"?:\\\\Program Files (x86)\\\\Fortinet\\\\FSAE\\\\collectoragent.exe\",\n \"?:\\\\Program Files (x86)\\\\Nmap\\\\nmap.exe\",\n \"?:\\\\Program Files\\\\Azure Advanced Threat Protection Sensor\\\\*\\\\Microsoft.Tri.Sensor.exe\",\n \"?:\\\\Program Files\\\\CloudMatters\\\\auvik\\\\AuvikService-release-*\\\\AuvikService.exe\",\n \"?:\\\\Program Files\\\\uptime software\\\\uptime\\\\UptimeDataCollector.exe\",\n \"?:\\\\Program Files\\\\CloudMatters\\\\auvik\\\\AuvikAgentService.exe\",\n \"?:\\\\Program Files\\\\Rumble\\\\rumble-agent-*.exe\")]\n [network where host.os.type == \"windows\" and destination.port == 445 and process.pid != 4 and\n not cidrmatch(destination.ip, \"127.0.0.1\", \"::1\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Parent Process PID Spoofing", + "description": "Identifies parent process spoofing used to thwart detection. Adversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.didierstevens.com/2017/03/20/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/", + "subtechnique": [ + { + "id": "T1134.004", + "name": "Parent PID Spoofing", + "reference": "https://attack.mitre.org/techniques/T1134/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/", + "subtechnique": [ + { + "id": "T1134.004", + "name": "Parent PID Spoofing", + "reference": "https://attack.mitre.org/techniques/T1134/004/" + } + ] + } + ] + } + ], + "id": "a92d7919-f3f1-4049-b30e-d470eac3fd11", + "rule_id": "c88d4bd0-5649-4c52-87ea-9be59dbfbcf2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.token.integrity_level_name", + "type": "unknown", + "ecs": false + }, + { + "name": "process.code_signature.exists", + "type": "boolean", + "ecs": true + }, + { + "name": "process.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.Ext.real.pid", + "type": "unknown", + "ecs": false + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "/* This rule is compatible with Elastic Endpoint only */\n\nsequence by host.id, user.id with maxspan=3m \n\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.Ext.token.integrity_level_name != \"system\" and \n (\n process.pe.original_file_name : (\"winword.exe\", \"excel.exe\", \"outlook.exe\", \"powerpnt.exe\", \"eqnedt32.exe\",\n \"fltldr.exe\", \"mspub.exe\", \"msaccess.exe\", \"powershell.exe\", \"pwsh.exe\",\n \"cscript.exe\", \"wscript.exe\", \"rundll32.exe\", \"regsvr32.exe\", \"msbuild.exe\",\n \"mshta.exe\", \"wmic.exe\", \"cmstp.exe\", \"msxsl.exe\") or \n \n (process.executable : (\"?:\\\\Users\\\\*.exe\",\n \"?:\\\\ProgramData\\\\*.exe\",\n \"?:\\\\Windows\\\\Temp\\\\*.exe\",\n \"?:\\\\Windows\\\\Tasks\\\\*\") and \n (process.code_signature.exists == false or process.code_signature.status : \"errorBadDigest\")) or \n \n process.executable : \"?:\\\\Windows\\\\Microsoft.NET\\\\*.exe\" \n ) and \n \n not process.executable : \n (\"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\", \n \"?:\\\\WINDOWS\\\\SysWOW64\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\")\n ] by process.pid\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.Ext.real.pid > 0 and \n \n /* process.parent.Ext.real.pid is only populated if the parent process pid doesn't match */\n not (process.name : \"msedge.exe\" and process.parent.name : \"sihost.exe\") and \n \n not process.executable : \n (\"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\", \n \"?:\\\\WINDOWS\\\\SysWOW64\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\")\n ] by process.parent.Ext.real.pid\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Disabling Windows Defender Security Settings via PowerShell", + "description": "Identifies use of the Set-MpPreference PowerShell command to disable or weaken certain Windows Defender settings.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Disabling Windows Defender Security Settings via PowerShell\n\nMicrosoft Windows Defender is an antivirus product built into Microsoft Windows, which makes it popular across multiple environments. Disabling it is a common step in threat actor playbooks.\n\nThis rule monitors the execution of commands that can tamper the Windows Defender antivirus features.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to determine which action was executed. Based on that, examine exceptions, antivirus state, sample submission, etc.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity, the configuration is justified (for example, it is being used to deploy other security solutions or troubleshooting), and no other suspicious activity has been observed.\n\n### Related rules\n\n- Windows Defender Disabled via Registry Modification - 2ffa1f1e-b6db-47fa-994b-1512743847eb\n- Microsoft Windows Defender Tampering - fe794edd-487f-4a90-b285-3ee54f2af2d3\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Based on the command line, take actions to restore the appropriate Windows Defender antivirus configurations.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Planned Windows Defender configuration changes." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/defender/set-mppreference?view=windowsserver2019-ps" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "db4edb49-8efa-4fac-ab2c-0b5f9522963c", + "rule_id": "c8cccb06-faf2-4cd5-886e-2c9636cfcb87", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") or process.pe.original_file_name in (\"powershell.exe\", \"pwsh.dll\", \"powershell_ise.exe\")) and\n process.args : \"Set-MpPreference\" and process.args : (\"-Disable*\", \"Disabled\", \"NeverSend\", \"-Exclusion*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Masquerading as Communication Apps", + "description": "Identifies suspicious instances of communications apps, both unsigned and renamed ones, that can indicate an attempt to conceal malicious activity, bypass security features such as allowlists, or trick users into executing malware.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + }, + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1554", + "name": "Compromise Client Software Binary", + "reference": "https://attack.mitre.org/techniques/T1554/" + } + ] + } + ], + "id": "5ae37f0a-12d0-4931-92cc-07cf4f2dbce5", + "rule_id": "c9482bfa-a553-4226-8ea2-4959bd4f7923", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and\n event.type == \"start\" and\n (\n /* Slack */\n (process.name : \"slack.exe\" and not\n (process.code_signature.subject_name in (\n \"Slack Technologies, Inc.\",\n \"Slack Technologies, LLC\"\n ) and process.code_signature.trusted == true)\n ) or\n\n /* WebEx */\n (process.name : \"WebexHost.exe\" and not\n (process.code_signature.subject_name in (\"Cisco WebEx LLC\", \"Cisco Systems, Inc.\") and process.code_signature.trusted == true)\n ) or\n\n /* Teams */\n (process.name : \"Teams.exe\" and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Discord */\n (process.name : \"Discord.exe\" and not\n (process.code_signature.subject_name == \"Discord Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* RocketChat */\n (process.name : \"Rocket.Chat.exe\" and not\n (process.code_signature.subject_name == \"Rocket.Chat Technologies Corp.\" and process.code_signature.trusted == true)\n ) or\n\n /* Mattermost */\n (process.name : \"Mattermost.exe\" and not\n (process.code_signature.subject_name == \"Mattermost, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* WhatsApp */\n (process.name : \"WhatsApp.exe\" and not\n (process.code_signature.subject_name in (\n \"WhatsApp LLC\",\n \"WhatsApp, Inc\",\n \"24803D75-212C-471A-BC57-9EF86AB91435\"\n ) and process.code_signature.trusted == true)\n ) or\n\n /* Zoom */\n (process.name : \"Zoom.exe\" and not\n (process.code_signature.subject_name == \"Zoom Video Communications, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Outlook */\n (process.name : \"outlook.exe\" and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Thunderbird */\n (process.name : \"thunderbird.exe\" and not\n (process.code_signature.subject_name == \"Mozilla Corporation\" and process.code_signature.trusted == true)\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unsigned DLL Side-Loading from a Suspicious Folder", + "description": "Identifies a Windows trusted program running from locations often abused by adversaries to masquerade as a trusted program and loading a recently dropped DLL. This behavior may indicate an attempt to evade defenses via side-loading a malicious DLL within the memory space of a signed processes.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + } + ] + }, + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.002", + "name": "DLL Side-Loading", + "reference": "https://attack.mitre.org/techniques/T1574/002/" + } + ] + } + ] + } + ], + "id": "152dc801-8d1c-4b8a-a8af-07693669d4dc", + "rule_id": "ca98c7cf-a56e-4057-a4e8-39603f7f0389", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.Ext.relative_file_creation_time", + "type": "unknown", + "ecs": false + }, + { + "name": "dll.Ext.relative_file_name_modify_time", + "type": "unknown", + "ecs": false + }, + { + "name": "dll.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "library where host.os.type == \"windows\" and\n\n process.code_signature.trusted == true and \n \n (dll.Ext.relative_file_creation_time <= 500 or dll.Ext.relative_file_name_modify_time <= 500) and \n \n not dll.code_signature.status : (\"trusted\", \"errorExpired\", \"errorCode_endpoint*\", \"errorChaining\") and \n \n /* Suspicious Paths */\n dll.path : (\"?:\\\\PerfLogs\\\\*.dll\",\n \"?:\\\\Users\\\\*\\\\Pictures\\\\*.dll\",\n \"?:\\\\Users\\\\*\\\\Music\\\\*.dll\",\n \"?:\\\\Users\\\\Public\\\\*.dll\",\n \"?:\\\\Users\\\\*\\\\Documents\\\\*.dll\",\n \"?:\\\\Windows\\\\Tasks\\\\*.dll\",\n \"?:\\\\Windows\\\\System32\\\\Tasks\\\\*.dll\",\n \"?:\\\\Intel\\\\*.dll\",\n \"?:\\\\AMD\\\\Temp\\\\*.dll\",\n \"?:\\\\Windows\\\\AppReadiness\\\\*.dll\",\n \"?:\\\\Windows\\\\ServiceState\\\\*.dll\",\n \"?:\\\\Windows\\\\security\\\\*.dll\",\n\t\t \"?:\\\\Windows\\\\System\\\\*.dll\",\n \"?:\\\\Windows\\\\IdentityCRL\\\\*.dll\",\n \"?:\\\\Windows\\\\Branding\\\\*.dll\",\n \"?:\\\\Windows\\\\csc\\\\*.dll\",\n \"?:\\\\Windows\\\\DigitalLocker\\\\*.dll\",\n \"?:\\\\Windows\\\\en-US\\\\*.dll\",\n \"?:\\\\Windows\\\\wlansvc\\\\*.dll\",\n \"?:\\\\Windows\\\\Prefetch\\\\*.dll\",\n \"?:\\\\Windows\\\\Fonts\\\\*.dll\",\n \"?:\\\\Windows\\\\diagnostics\\\\*.dll\",\n \"?:\\\\Windows\\\\TAPI\\\\*.dll\",\n \"?:\\\\Windows\\\\INF\\\\*.dll\",\n \"?:\\\\windows\\\\tracing\\\\*.dll\",\n \"?:\\\\windows\\\\IME\\\\*.dll\",\n \"?:\\\\Windows\\\\Performance\\\\*.dll\",\n \"?:\\\\windows\\\\intel\\\\*.dll\",\n \"?:\\\\windows\\\\ms\\\\*.dll\",\n \"?:\\\\Windows\\\\dot3svc\\\\*.dll\",\n \"?:\\\\Windows\\\\ServiceProfiles\\\\*.dll\",\n \"?:\\\\Windows\\\\panther\\\\*.dll\",\n \"?:\\\\Windows\\\\RemotePackages\\\\*.dll\",\n \"?:\\\\Windows\\\\OCR\\\\*.dll\",\n \"?:\\\\Windows\\\\appcompat\\\\*.dll\",\n \"?:\\\\Windows\\\\apppatch\\\\*.dll\",\n \"?:\\\\Windows\\\\addins\\\\*.dll\",\n \"?:\\\\Windows\\\\Setup\\\\*.dll\",\n \"?:\\\\Windows\\\\Help\\\\*.dll\",\n \"?:\\\\Windows\\\\SKB\\\\*.dll\",\n \"?:\\\\Windows\\\\Vss\\\\*.dll\",\n \"?:\\\\Windows\\\\Web\\\\*.dll\",\n \"?:\\\\Windows\\\\servicing\\\\*.dll\",\n \"?:\\\\Windows\\\\CbsTemp\\\\*.dll\",\n \"?:\\\\Windows\\\\Logs\\\\*.dll\",\n \"?:\\\\Windows\\\\WaaS\\\\*.dll\",\n \"?:\\\\Windows\\\\twain_32\\\\*.dll\",\n \"?:\\\\Windows\\\\ShellExperiences\\\\*.dll\",\n \"?:\\\\Windows\\\\ShellComponents\\\\*.dll\",\n \"?:\\\\Windows\\\\PLA\\\\*.dll\",\n \"?:\\\\Windows\\\\Migration\\\\*.dll\",\n \"?:\\\\Windows\\\\debug\\\\*.dll\",\n \"?:\\\\Windows\\\\Cursors\\\\*.dll\",\n \"?:\\\\Windows\\\\Containers\\\\*.dll\",\n \"?:\\\\Windows\\\\Boot\\\\*.dll\",\n \"?:\\\\Windows\\\\bcastdvr\\\\*.dll\",\n \"?:\\\\Windows\\\\TextInput\\\\*.dll\",\n \"?:\\\\Windows\\\\schemas\\\\*.dll\",\n \"?:\\\\Windows\\\\SchCache\\\\*.dll\",\n \"?:\\\\Windows\\\\Resources\\\\*.dll\",\n \"?:\\\\Windows\\\\rescache\\\\*.dll\",\n \"?:\\\\Windows\\\\Provisioning\\\\*.dll\",\n \"?:\\\\Windows\\\\PrintDialog\\\\*.dll\",\n \"?:\\\\Windows\\\\PolicyDefinitions\\\\*.dll\",\n \"?:\\\\Windows\\\\media\\\\*.dll\",\n \"?:\\\\Windows\\\\Globalization\\\\*.dll\",\n \"?:\\\\Windows\\\\L2Schemas\\\\*.dll\",\n \"?:\\\\Windows\\\\LiveKernelReports\\\\*.dll\",\n \"?:\\\\Windows\\\\ModemLogs\\\\*.dll\",\n \"?:\\\\Windows\\\\ImmersiveControlPanel\\\\*.dll\",\n \"?:\\\\$Recycle.Bin\\\\*.dll\") and \n\t \n\t /* DLL loaded from the process.executable current directory */\n\t endswith~(substring(dll.path, 0, length(dll.path) - (length(dll.name) + 1)), substring(process.executable, 0, length(process.executable) - (length(process.name) + 1)))\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Kernel Module Removal", + "description": "Kernel modules are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. This rule identifies attempts to remove a kernel module.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "There is usually no reason to remove modules, but some buggy modules require it. These can be exempted by username. Note that some Linux distributions are not built to support the removal of modules at all." + ], + "references": [ + "http://man7.org/linux/man-pages/man8/modprobe.8.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.006", + "name": "Kernel Modules and Extensions", + "reference": "https://attack.mitre.org/techniques/T1547/006/" + } + ] + } + ] + } + ], + "id": "11155cb1-3e36-4dfe-855d-778c7783bccb", + "rule_id": "cd66a5af-e34b-4bb0-8931-57d0a043f2ef", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and process.name == \"rmmod\" or\n(process.name == \"modprobe\" and process.args in (\"--remove\", \"-r\")) and \nprocess.parent.name in (\"sudo\", \"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "New ActiveSyncAllowedDeviceID Added via PowerShell", + "description": "Identifies the use of the Exchange PowerShell cmdlet, Set-CASMailbox, to add a new ActiveSync allowed device. Adversaries may target user email to collect sensitive information.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate exchange system administration activity." + ], + "references": [ + "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/", + "https://docs.microsoft.com/en-us/powershell/module/exchange/set-casmailbox?view=exchange-ps" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.002", + "name": "Additional Email Delegate Permissions", + "reference": "https://attack.mitre.org/techniques/T1098/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "76ea2acc-757a-44d2-bdc3-db98af51885d", + "rule_id": "ce64d965-6cb0-466d-b74f-8d2c76f47f05", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name: (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and process.args : \"Set-CASMailbox*ActiveSyncAllowedDeviceIDs*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Cobalt Strike Command and Control Beacon", + "description": "Cobalt Strike is a threat emulation platform commonly modified and used by adversaries to conduct network attack and exploitation campaigns. This rule detects a network activity algorithm leveraged by Cobalt Strike implant beacons for command and control.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Threat intel\n\nThis activity has been observed in FIN7 campaigns.", + "version": 105, + "tags": [ + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Domain: Endpoint" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "This rule should be tailored to either exclude systems, as sources or destinations, in which this behavior is expected." + ], + "references": [ + "https://blog.morphisec.com/fin7-attacks-restaurant-industry", + "https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html", + "https://www.elastic.co/security-labs/collecting-cobalt-strike-beacons-with-the-elastic-stack" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + }, + { + "id": "T1568", + "name": "Dynamic Resolution", + "reference": "https://attack.mitre.org/techniques/T1568/", + "subtechnique": [ + { + "id": "T1568.002", + "name": "Domain Generation Algorithms", + "reference": "https://attack.mitre.org/techniques/T1568/002/" + } + ] + } + ] + } + ], + "id": "6024faa1-bc7a-433b-80bf-392fbfe87de5", + "rule_id": "cf53f532-9cc9-445a-9ae7-fced307ec53c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "((event.category: (network OR network_traffic) AND type: (tls OR http))\n OR event.dataset: (network_traffic.tls OR network_traffic.http)\n) AND destination.domain:/[a-z]{3}.stage.[0-9]{8}\\..*/\n", + "language": "lucene" + }, + { + "name": "Execution from Unusual Directory - Command Line", + "description": "Identifies process execution from suspicious default Windows directories. This may be abused by adversaries to hide malware in trusted paths.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Execution from Unusual Directory - Command Line\n\nThis rule looks for the execution of scripts from unusual directories. Attackers can use system or application paths to hide malware and make the execution less suspicious.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to determine which commands or scripts were executed.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the script using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of parent process executable and command line conditions.\n\n### Related rules\n\n- Process Execution from an Unusual Directory - ebfe1448-7fac-4d59-acea-181bd89b1f7f\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + } + ], + "id": "dfb48928-ab8a-45fa-ae8a-73ef32220ec6", + "rule_id": "cff92c41-2225-4763-b4ce-6f71e5bda5e6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"wscript.exe\",\n \"cscript.exe\",\n \"rundll32.exe\",\n \"regsvr32.exe\",\n \"cmstp.exe\",\n \"RegAsm.exe\",\n \"installutil.exe\",\n \"mshta.exe\",\n \"RegSvcs.exe\",\n \"powershell.exe\",\n \"pwsh.exe\",\n \"cmd.exe\") and\n\n /* add suspicious execution paths here */\n process.args : (\"C:\\\\PerfLogs\\\\*\",\n \"C:\\\\Users\\\\Public\\\\*\",\n \"C:\\\\Windows\\\\Tasks\\\\*\",\n \"C:\\\\Intel\\\\*\",\n \"C:\\\\AMD\\\\Temp\\\\*\",\n \"C:\\\\Windows\\\\AppReadiness\\\\*\",\n \"C:\\\\Windows\\\\ServiceState\\\\*\",\n \"C:\\\\Windows\\\\security\\\\*\",\n \"C:\\\\Windows\\\\IdentityCRL\\\\*\",\n \"C:\\\\Windows\\\\Branding\\\\*\",\n \"C:\\\\Windows\\\\csc\\\\*\",\n \"C:\\\\Windows\\\\DigitalLocker\\\\*\",\n \"C:\\\\Windows\\\\en-US\\\\*\",\n \"C:\\\\Windows\\\\wlansvc\\\\*\",\n \"C:\\\\Windows\\\\Prefetch\\\\*\",\n \"C:\\\\Windows\\\\Fonts\\\\*\",\n \"C:\\\\Windows\\\\diagnostics\\\\*\",\n \"C:\\\\Windows\\\\TAPI\\\\*\",\n \"C:\\\\Windows\\\\INF\\\\*\",\n \"C:\\\\Windows\\\\System32\\\\Speech\\\\*\",\n \"C:\\\\windows\\\\tracing\\\\*\",\n \"c:\\\\windows\\\\IME\\\\*\",\n \"c:\\\\Windows\\\\Performance\\\\*\",\n \"c:\\\\windows\\\\intel\\\\*\",\n \"c:\\\\windows\\\\ms\\\\*\",\n \"C:\\\\Windows\\\\dot3svc\\\\*\",\n \"C:\\\\Windows\\\\panther\\\\*\",\n \"C:\\\\Windows\\\\RemotePackages\\\\*\",\n \"C:\\\\Windows\\\\OCR\\\\*\",\n \"C:\\\\Windows\\\\appcompat\\\\*\",\n \"C:\\\\Windows\\\\apppatch\\\\*\",\n \"C:\\\\Windows\\\\addins\\\\*\",\n \"C:\\\\Windows\\\\Setup\\\\*\",\n \"C:\\\\Windows\\\\Help\\\\*\",\n \"C:\\\\Windows\\\\SKB\\\\*\",\n \"C:\\\\Windows\\\\Vss\\\\*\",\n \"C:\\\\Windows\\\\servicing\\\\*\",\n \"C:\\\\Windows\\\\CbsTemp\\\\*\",\n \"C:\\\\Windows\\\\Logs\\\\*\",\n \"C:\\\\Windows\\\\WaaS\\\\*\",\n \"C:\\\\Windows\\\\twain_32\\\\*\",\n \"C:\\\\Windows\\\\ShellExperiences\\\\*\",\n \"C:\\\\Windows\\\\ShellComponents\\\\*\",\n \"C:\\\\Windows\\\\PLA\\\\*\",\n \"C:\\\\Windows\\\\Migration\\\\*\",\n \"C:\\\\Windows\\\\debug\\\\*\",\n \"C:\\\\Windows\\\\Cursors\\\\*\",\n \"C:\\\\Windows\\\\Containers\\\\*\",\n \"C:\\\\Windows\\\\Boot\\\\*\",\n \"C:\\\\Windows\\\\bcastdvr\\\\*\",\n \"C:\\\\Windows\\\\TextInput\\\\*\",\n \"C:\\\\Windows\\\\security\\\\*\",\n \"C:\\\\Windows\\\\schemas\\\\*\",\n \"C:\\\\Windows\\\\SchCache\\\\*\",\n \"C:\\\\Windows\\\\Resources\\\\*\",\n \"C:\\\\Windows\\\\rescache\\\\*\",\n \"C:\\\\Windows\\\\Provisioning\\\\*\",\n \"C:\\\\Windows\\\\PrintDialog\\\\*\",\n \"C:\\\\Windows\\\\PolicyDefinitions\\\\*\",\n \"C:\\\\Windows\\\\media\\\\*\",\n \"C:\\\\Windows\\\\Globalization\\\\*\",\n \"C:\\\\Windows\\\\L2Schemas\\\\*\",\n \"C:\\\\Windows\\\\LiveKernelReports\\\\*\",\n \"C:\\\\Windows\\\\ModemLogs\\\\*\",\n \"C:\\\\Windows\\\\ImmersiveControlPanel\\\\*\",\n \"C:\\\\$Recycle.Bin\\\\*\") and\n\n /* noisy FP patterns */\n\n not process.parent.executable : (\"C:\\\\WINDOWS\\\\System32\\\\DriverStore\\\\FileRepository\\\\*\\\\igfxCUIService*.exe\",\n \"C:\\\\Windows\\\\System32\\\\spacedeskService.exe\",\n \"C:\\\\Program Files\\\\Dell\\\\SupportAssistAgent\\\\SRE\\\\SRE.exe\") and\n not (process.name : \"rundll32.exe\" and\n process.args : (\"uxtheme.dll,#64\",\n \"PRINTUI.DLL,PrintUIEntry\",\n \"?:\\\\Windows\\\\System32\\\\FirewallControlPanel.dll,ShowNotificationDialog\",\n \"?:\\\\WINDOWS\\\\system32\\\\Speech\\\\SpeechUX\\\\sapi.cpl\",\n \"?:\\\\Windows\\\\system32\\\\shell32.dll,OpenAs_RunDLL\")) and\n\n not (process.name : \"cscript.exe\" and process.args : \"?:\\\\WINDOWS\\\\system32\\\\calluxxprovider.vbs\") and\n\n not (process.name : \"cmd.exe\" and process.args : \"?:\\\\WINDOWS\\\\system32\\\\powercfg.exe\" and process.args : \"?:\\\\WINDOWS\\\\inf\\\\PowerPlan.log\") and\n\n not (process.name : \"regsvr32.exe\" and process.args : \"?:\\\\Windows\\\\Help\\\\OEM\\\\scripts\\\\checkmui.dll\") and\n\n not (process.name : \"cmd.exe\" and\n process.parent.executable : (\"?:\\\\Windows\\\\System32\\\\oobe\\\\windeploy.exe\",\n \"?:\\\\Program Files (x86)\\\\ossec-agent\\\\wazuh-agent.exe\",\n \"?:\\\\Windows\\\\System32\\\\igfxCUIService.exe\",\n \"?:\\\\Windows\\\\Temp\\\\IE*.tmp\\\\IE*-support\\\\ienrcore.exe\"))\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Namespace Manipulation Using Unshare", + "description": "Identifies suspicious usage of unshare to manipulate system namespaces. Unshare can be utilized to escalate privileges or escape container security boundaries. Threat actors have utilized this binary to allow themselves to escape to the host and access other resources or escalate privileges.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://man7.org/linux/man-pages/man1/unshare.1.html", + "https://www.crowdstrike.com/blog/cve-2022-0185-kubernetes-container-escape-using-linux-kernel-exploit/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/" + } + ] + } + ], + "id": "b6384394-2dda-49db-9dee-609f13e0b63d", + "rule_id": "d00f33e7-b57d-4023-9952-2db91b1767c4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action : (\"exec\", \"exec_event\") and\nprocess.executable: \"/usr/bin/unshare\" and\nnot process.parent.executable: (\"/usr/bin/udevadm\", \"*/lib/systemd/systemd-udevd\", \"/usr/bin/unshare\") and\nnot process.args : \"/usr/bin/snap\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Symbolic Link to Shadow Copy Created", + "description": "Identifies the creation of symbolic links to a shadow copy. Symbolic links can be used to access files in the shadow copy, including sensitive files such as ntds.dit, System Boot Key and browser offline credentials.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Symbolic Link to Shadow Copy Created\n\nShadow copies are backups or snapshots of an endpoint's files or volumes while they are in use. Adversaries may attempt to discover and create symbolic links to these shadow copies in order to copy sensitive information offline. If Active Directory (AD) is in use, often the ntds.dit file is a target as it contains password hashes, but an offline copy is needed to extract these hashes and potentially conduct lateral movement.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Determine if a volume shadow copy was recently created on this endpoint.\n- Review privileges of the end user as this requires administrative access.\n- Verify if the ntds.dit file was successfully copied and determine its copy destination.\n- Investigate for registry SYSTEM file copies made recently or saved via Reg.exe.\n- Investigate recent deletions of volume shadow copies.\n- Identify other files potentially copied from volume shadow copy paths directly.\n\n### False positive analysis\n\n- This rule should cause very few false positives. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- NTDS or SAM Database File Copied - 3bc6deaa-fbd4-433a-ae21-3e892f95624f\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the entire domain or the `krbtgt` user was compromised:\n - Activate your incident response plan for total Active Directory compromise which should include, but not be limited to, a password reset (twice) of the `krbtgt` user.\n- Locate and remove static files copied from volume shadow copies.\n- Command-Line tool mklink should require administrative access by default unless in developer mode.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nEnsure advanced audit policies for Windows are enabled, specifically:\nObject Access policies [Event ID 4656](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4656) (Handle to an Object was Requested)\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nSystem Audit Policies >\nObject Access >\nAudit File System (Success,Failure)\nAudit Handle Manipulation (Success,Failure)\n```\n\nThis event will only trigger if symbolic links are created from a new process spawning cmd.exe or powershell.exe with the correct arguments.\nDirect access to a shell and calling symbolic link creation tools will not generate an event matching this rule.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Legitimate administrative activity related to shadow copies." + ], + "references": [ + "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink", + "https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf", + "https://blog.netwrix.com/2021/11/30/extracting-password-hashes-from-the-ntds-dit-file/", + "https://www.hackingarticles.in/credential-dumping-ntds-dit/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.002", + "name": "Security Account Manager", + "reference": "https://attack.mitre.org/techniques/T1003/002/" + }, + { + "id": "T1003.003", + "name": "NTDS", + "reference": "https://attack.mitre.org/techniques/T1003/003/" + } + ] + } + ] + } + ], + "id": "1d6f8059-14db-4bc1-91f7-afca4446f847", + "rule_id": "d117cbb4-7d56-41b4-b999-bdf8c25648a0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "Ensure advanced audit policies for Windows are enabled, specifically:\nObject Access policies Event ID 4656 (Handle to an Object was Requested)\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nSystem Audit Policies >\nObject Access >\nAudit File System (Success,Failure)\nAudit Handle Manipulation (Success,Failure)\n```\n\nThis event will only trigger if symbolic links are created from a new process spawning cmd.exe or powershell.exe with the correct arguments.\nDirect access to a shell and calling symbolic link creation tools will not generate an event matching this rule.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name in (\"Cmd.Exe\",\"PowerShell.EXE\") and\n\n /* Create Symbolic Link to Shadow Copies */\n process.args : (\"*mklink*\", \"*SymbolicLink*\") and process.command_line : (\"*HarddiskVolumeShadowCopy*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Disabling User Account Control via Registry Modification", + "description": "User Account Control (UAC) can help mitigate the impact of malware on Windows hosts. With UAC, apps and tasks always run in the security context of a non-administrator account, unless an administrator specifically authorizes administrator-level access to the system. This rule identifies registry value changes to bypass User Access Control (UAC) protection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Disabling User Account Control via Registry Modification\n\nWindows User Account Control (UAC) allows a program to elevate its privileges (tracked as low to high integrity levels) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. UAC can deny an operation under high-integrity enforcement, or allow the user to perform the action if they are in the local administrators group and enter an administrator password when prompted.\n\nFor more information about the UAC and how it works, check the [official Microsoft docs page](https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works).\n\nAttackers may disable UAC to execute code directly in high integrity. This rule identifies registry value changes to bypass the UAC protection.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behaviors in the alert timeframe.\n- Investigate abnormal behaviors observed by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Analyze non-system processes executed with high integrity after UAC was disabled for unknown or suspicious processes.\n- Retrieve the suspicious processes' executables and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled tasks creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Restore UAC settings to the desired state.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.greyhathacker.net/?p=796", + "https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/user-account-control-group-policy-and-registry-key-settings", + "https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/user-account-control-overview" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + }, + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + }, + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "aff8eff2-3a3f-4ca6-b2ad-e5fa154c9603", + "rule_id": "d31f183a-e5b1-451b-8534-ba62bca0b404", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path :\n (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\EnableLUA\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\ConsentPromptBehaviorAdmin\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\PromptOnSecureDesktop\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\EnableLUA\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\ConsentPromptBehaviorAdmin\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\PromptOnSecureDesktop\"\n ) and\n registry.data.strings : (\"0\", \"0x00000000\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Clearing Windows Event Logs", + "description": "Identifies attempts to clear or disable Windows event log stores using Windows wevetutil command. This is often done by attackers in an attempt to evade detection or destroy forensic evidence on a system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Clearing Windows Event Logs\n\nWindows event logs are a fundamental data source for security monitoring, forensics, and incident response. Adversaries can tamper, clear, and delete this data to break SIEM detections, cover their tracks, and slow down incident response.\n\nThis rule looks for the execution of the `wevtutil.exe` utility or the `Clear-EventLog` cmdlet to clear event logs.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Investigate the event logs prior to the action for suspicious behaviors that an attacker may be trying to cover up.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and there are justifications for this action.\n- Analyze whether the cleared event log is pertinent to security and general monitoring. Administrators can clear non-relevant event logs using this mechanism. If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n - This activity is potentially done after the adversary achieves its objectives on the host. Ensure that previous actions, if any, are investigated accordingly with their response playbooks.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.001", + "name": "Clear Windows Event Logs", + "reference": "https://attack.mitre.org/techniques/T1070/001/" + }, + { + "id": "T1562.002", + "name": "Disable Windows Event Logging", + "reference": "https://attack.mitre.org/techniques/T1562/002/" + } + ] + } + ] + } + ], + "id": "bdddf66b-f1eb-4005-b013-bc2d15946c8c", + "rule_id": "d331bbe2-6db4-4941-80a5-8270db72eb61", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (\n (process.name : \"wevtutil.exe\" or process.pe.original_file_name == \"wevtutil.exe\") and\n process.args : (\"/e:false\", \"cl\", \"clear-log\")\n ) or\n (\n process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and\n process.args : \"Clear-EventLog\"\n )\n)\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Attempt to Delete an Okta Application", + "description": "Detects attempts to delete an Okta application. An adversary may attempt to modify, deactivate, or delete an Okta application in order to weaken an organization's security controls or disrupt their business operations.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Consider adding exceptions to this rule to filter false positives if your organization's Okta applications are regularly deleted and the behavior is expected." + ], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1489", + "name": "Service Stop", + "reference": "https://attack.mitre.org/techniques/T1489/" + } + ] + } + ], + "id": "7973c657-98c4-47b6-927c-5c4b729a2aa0", + "rule_id": "d48e1c13-4aca-4d1f-a7b1-a9161c0ad86f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:application.lifecycle.delete\n", + "language": "kuery" + }, + { + "name": "AWS CloudWatch Log Stream Deletion", + "description": "Identifies the deletion of an AWS CloudWatch log stream, which permanently deletes all associated archived log events with the stream.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS CloudWatch Log Stream Deletion\n\nAmazon CloudWatch is a monitoring and observability service that collects monitoring and operational data in the form of logs, metrics, and events for resources and applications. This data can be used to detect anomalous behavior in your environments, set alarms, visualize logs and metrics side by side, take automated actions, troubleshoot issues, and discover insights to keep your applications running smoothly.\n\nA log stream is a sequence of log events that share the same source. Each separate source of logs in CloudWatch Logs makes up a separate log stream.\n\nThis rule looks for the deletion of a log stream using the API `DeleteLogStream` action. Attackers can do this to cover their tracks and impact security monitoring that relies on these sources.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Investigate the deleted log stream's criticality and whether the responsible team is aware of the deletion.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Log Auditing", + "Tactic: Impact", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A log stream may be deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Log stream deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/logs/delete-log-stream.html", + "https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteLogStream.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "327e4748-7857-4961-b62b-93f8340c201d", + "rule_id": "d624f0ae-3dd1-4856-9aad-ccfe4d4bfa17", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:logs.amazonaws.com and event.action:DeleteLogStream and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Command Execution via SolarWinds Process", + "description": "A suspicious SolarWinds child process (Cmd.exe or Powershell.exe) was detected.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Initial Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trusted SolarWinds child processes. Verify process details such as network connections and file writes." + ], + "references": [ + "https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html", + "https://github.com/mandiant/sunburst_countermeasures/blob/main/rules/SUNBURST/hxioc/SUNBURST%20SUSPICIOUS%20FILEWRITES%20(METHODOLOGY).ioc" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1195", + "name": "Supply Chain Compromise", + "reference": "https://attack.mitre.org/techniques/T1195/", + "subtechnique": [ + { + "id": "T1195.002", + "name": "Compromise Software Supply Chain", + "reference": "https://attack.mitre.org/techniques/T1195/002/" + } + ] + } + ] + } + ], + "id": "d33c69a3-7408-40b0-8824-9986fa925e7e", + "rule_id": "d72e33fc-6e91-42ff-ac8b-e573268c5a87", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name: (\"cmd.exe\", \"powershell.exe\") and\nprocess.parent.name: (\n \"ConfigurationWizard*.exe\",\n \"NetflowDatabaseMaintenance*.exe\",\n \"NetFlowService*.exe\",\n \"SolarWinds.Administration*.exe\",\n \"SolarWinds.Collector.Service*.exe\",\n \"SolarwindsDiagnostics*.exe\"\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "SMTP on Port 26/TCP", + "description": "This rule detects events that may indicate use of SMTP on TCP port 26. This port is commonly used by several popular mail transfer agents to deconflict with the default SMTP port 25. This port has also been used by a malware family called BadPatch for command and control of Windows systems.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Tactic: Command and Control", + "Domain: Endpoint", + "Use Case: Threat Detection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Servers that process email traffic may cause false positives and should be excluded from this rule as this is expected behavior." + ], + "references": [ + "https://unit42.paloaltonetworks.com/unit42-badpatch/", + "https://isc.sans.edu/forums/diary/Next+up+whats+up+with+TCP+port+26/25564/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1048", + "name": "Exfiltration Over Alternative Protocol", + "reference": "https://attack.mitre.org/techniques/T1048/" + } + ] + } + ], + "id": "a1a8fa09-8a11-47ba-95be-30ad14f5e2f8", + "rule_id": "d7e62693-aab9-4f66-a21a-3d79ecdd603d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and (destination.port:26 or (event.dataset:zeek.smtp and destination.port:26))\n", + "language": "kuery" + }, + { + "name": "AWS IAM Deactivation of MFA Device", + "description": "Identifies the deactivation of a specified multi-factor authentication (MFA) device and removes it from association with the user name for which it was originally enabled. In AWS Identity and Access Management (IAM), a device must be deactivated before it can be deleted.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS IAM Deactivation of MFA Device\n\nMulti-factor authentication (MFA) in AWS is a simple best practice that adds an extra layer of protection on top of your user name and password. With MFA enabled, when a user signs in to an AWS Management Console, they will be prompted for their user name and password (the first factor—what they know), as well as for an authentication code from their AWS MFA device (the second factor—what they have). Taken together, these multiple factors provide increased security for your AWS account settings and resources.\n\nFor more information about using MFA in AWS, access the [official documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa.html).\n\nThis rule looks for the deactivation or deletion of AWS MFA devices. These modifications weaken account security and can lead to the compromise of accounts and other assets.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- While this activity can be done by administrators, all users must use MFA. The security team should address any potential benign true positive (B-TP), as this configuration can risk the user and domain.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate multi-factor authentication for the user.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Resources: Investigation Guide", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "A MFA device may be deactivated by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. MFA device deactivations from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/deactivate-mfa-device.html", + "https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeactivateMFADevice.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1531", + "name": "Account Access Removal", + "reference": "https://attack.mitre.org/techniques/T1531/" + } + ] + } + ], + "id": "24b897cd-bd62-4359-b0e9-45785ac25ad1", + "rule_id": "d8fc1cca-93ed-43c1-bbb6-c0dd3eff2958", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:(DeactivateMFADevice or DeleteVirtualMFADevice) and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Volume Shadow Copy Deletion via PowerShell", + "description": "Identifies the use of the Win32_ShadowCopy class and related cmdlets to achieve shadow copy deletion. This commonly occurs in tandem with ransomware or other destructive attacks.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Volume Shadow Copy Deletion via PowerShell\n\nThe Volume Shadow Copy Service (VSS) is a Windows feature that enables system administrators to take snapshots of volumes that can later be restored or mounted to recover specific files or folders.\n\nA typical step in the playbook of an attacker attempting to deploy ransomware is to delete Volume Shadow Copies to ensure that victims have no alternative to paying the ransom, making any action that deletes shadow copies worth monitoring.\n\nThis rule monitors the execution of PowerShell cmdlets to interact with the Win32_ShadowCopy WMI class, retrieve shadow copy objects, and delete them.\n\n#### Possible investigation steps\n\n- Investigate the program execution chain (parent process tree).\n- Check whether the account is authorized to perform this operation.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- If unsigned files are found on the process tree, retrieve them and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Use process name, command line, and file hash to search for occurrences in other hosts.\n- Check if any files on the host machine have been encrypted.\n\n\n### False positive analysis\n\n- This rule has chances of producing benign true positives (B-TPs). If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Related rules\n\n- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921\n- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- Priority should be given due to the advanced stage of this activity on the attack.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- If data was encrypted, deleted, or modified, activate your data recovery plan.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Impact", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/previous-versions/windows/desktop/vsswmi/win32-shadowcopy", + "https://powershell.one/wmi/root/cimv2/win32_shadowcopy", + "https://www.fortinet.com/blog/threat-research/stomping-shadow-copies-a-second-look-into-deletion-methods" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "2a117e91-bbf7-400a-8e35-f8d2776ef0a0", + "rule_id": "d99a037b-c8e2-47a5-97b9-170d076827c4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and\n process.args : (\"*Get-WmiObject*\", \"*gwmi*\", \"*Get-CimInstance*\", \"*gcim*\") and\n process.args : (\"*Win32_ShadowCopy*\") and\n process.args : (\"*.Delete()*\", \"*Remove-WmiObject*\", \"*rwmi*\", \"*Remove-CimInstance*\", \"*rcim*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Hidden Process via Mount Hidepid", + "description": "Identifies the execution of mount process with hidepid parameter, which can make processes invisible to other users from the system. Adversaries using Linux kernel version 3.2+ (or RHEL/CentOS v6.5+ above) can hide the process from other users. When hidepid=2 option is executed to mount the /proc filesystem, only the root user can see all processes and the logged-in user can only see their own process. This provides a defense evasion mechanism for the adversaries to hide their process executions from all other commands such as ps, top, pgrep and more. With the Linux kernel hardening hidepid option all the user has to do is remount the /proc filesystem with the option, which can now be monitored and detected.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.cyberciti.biz/faq/linux-hide-processes-from-other-users/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1564", + "name": "Hide Artifacts", + "reference": "https://attack.mitre.org/techniques/T1564/" + } + ] + } + ], + "id": "0efb7e14-465a-4c9c-8dcd-c7ae58c12608", + "rule_id": "dc71c186-9fe4-4437-a4d0-85ebb32b8204", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and process.name == \"mount\" and event.action == \"exec\" and\nprocess.args == \"/proc\" and process.args == \"-o\" and process.args : \"*hidepid=2*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Volume Shadow Copy Deletion via WMIC", + "description": "Identifies use of wmic.exe for shadow copy deletion on endpoints. This commonly occurs in tandem with ransomware or other destructive attacks.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Volume Shadow Copy Deletion via WMIC\n\nThe Volume Shadow Copy Service (VSS) is a Windows feature that enables system administrators to take snapshots of volumes that can later be restored or mounted to recover specific files or folders.\n\nA typical step in the playbook of an attacker attempting to deploy ransomware is to delete Volume Shadow Copies to ensure that victims have no alternative to paying the ransom, making any action that deletes shadow copies worth monitoring.\n\nThis rule monitors the execution of `wmic.exe` to interact with VSS via the `shadowcopy` alias and delete parameter.\n\n#### Possible investigation steps\n\n- Investigate the program execution chain (parent process tree).\n- Check whether the account is authorized to perform this operation.\n- Contact the account owner and confirm whether they are aware of this activity.\n- In the case of a resize operation, check if the resize value is equal to suspicious values, like 401MB.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- If unsigned files are found on the process tree, retrieve them and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Use process name, command line, and file hash to search for occurrences in other hosts.\n- Check if any files on the host machine have been encrypted.\n\n\n### False positive analysis\n\n- This rule has chances of producing benign true positives (B-TPs). If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Related rules\n\n- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921\n- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Priority should be given due to the advanced stage of this activity on the attack.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- If data was encrypted, deleted, or modified, activate your data recovery plan.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Impact", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "ce2fd1ed-848f-4ec6-884b-3282bc1e9ec0", + "rule_id": "dc9c1f74-dac3-48e3-b47f-eb79db358f57", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"WMIC.exe\" or process.pe.original_file_name == \"wmic.exe\") and\n process.args : \"delete\" and process.args : \"shadowcopy\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Attempt to Install Kali Linux via WSL", + "description": "Detects attempts to install or use Kali Linux via Windows Subsystem for Linux. Adversaries may enable and use WSL for Linux to avoid detection.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://learn.microsoft.com/en-us/windows/wsl/wsl-config" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1202", + "name": "Indirect Command Execution", + "reference": "https://attack.mitre.org/techniques/T1202/" + } + ] + } + ], + "id": "4b8380f5-edfa-43ef-bd8c-b2eba603ab1e", + "rule_id": "dd34b062-b9e3-4a6b-8c0c-6c8ca6dd450e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (process.name : \"wsl.exe\" and process.args : (\"-d\", \"--distribution\", \"-i\", \"--install\") and process.args : \"kali*\") or \n process.executable : \n (\"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\packages\\\\kalilinux*\", \n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps\\\\kali.exe\",\n \"?:\\\\Program Files*\\\\WindowsApps\\\\KaliLinux.*\\\\kali.exe\")\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "NullSessionPipe Registry Modification", + "description": "Identifies NullSessionPipe registry modifications that specify which pipes can be accessed anonymously. This could be indicative of adversary lateral movement preparation by making the added pipe available to everyone.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/", + "https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/network-access-restrict-anonymous-access-to-named-pipes-and-shares" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.002", + "name": "SMB/Windows Admin Shares", + "reference": "https://attack.mitre.org/techniques/T1021/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "7ac6f97c-aece-48fc-8418-52427c35f416", + "rule_id": "ddab1f5f-7089-44f5-9fda-de5b11322e77", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\nregistry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\services\\\\LanmanServer\\\\Parameters\\\\NullSessionPipes\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\services\\\\LanmanServer\\\\Parameters\\\\NullSessionPipes\"\n) and length(registry.data.strings) > 0\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Base16 or Base32 Encoding/Decoding Activity", + "description": "Adversaries may encode/decode data in an attempt to evade detection by host- or network-based security controls.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Automated tools such as Jenkins may encode or decode files as part of their normal behavior. These events can be filtered by the process executable or username values." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1027", + "name": "Obfuscated Files or Information", + "reference": "https://attack.mitre.org/techniques/T1027/" + }, + { + "id": "T1140", + "name": "Deobfuscate/Decode Files or Information", + "reference": "https://attack.mitre.org/techniques/T1140/" + } + ] + } + ], + "id": "fac30532-24fb-422c-9eec-aebb6164479e", + "rule_id": "debff20a-46bc-4a4d-bae5-5cdd14222795", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ], + "query": "event.category:process and host.os.type:linux and event.type:(start or process_started) and\n process.name:(base16 or base32 or base32plain or base32hex)\n", + "language": "kuery" + }, + { + "name": "Dynamic Linker Copy", + "description": "Detects the copying of the Linux dynamic loader binary and subsequent file creation for the purpose of creating a backup copy. This technique was seen recently being utilized by Linux malware prior to patching the dynamic loader in order to inject and preload a malicious shared object file. This activity should never occur and if it does then it should be considered highly suspicious or malicious.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Threat: Orbit", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.intezer.com/blog/incident-response/orbit-new-undetected-linux-threat/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.006", + "name": "Dynamic Linker Hijacking", + "reference": "https://attack.mitre.org/techniques/T1574/006/" + } + ] + } + ] + } + ], + "id": "e0be0a93-bf77-4b2f-82b7-2728a9d82b3a", + "rule_id": "df6f62d9-caab-4b88-affa-044f4395a1e0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by process.entity_id with maxspan=1m\n[process where host.os.type == \"linux\" and event.type == \"start\" and process.name : (\"cp\", \"rsync\") and\n process.args : (\"/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2\", \"/etc/ld.so.preload\")]\n[file where host.os.type == \"linux\" and event.action == \"creation\" and file.extension == \"so\"]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "System Service Discovery through built-in Windows Utilities", + "description": "Detects the usage of commonly used system service discovery techniques, which attackers may use during the reconnaissance phase after compromising a system in order to gain a better understanding of the environment and/or escalate privileges.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend", + "Data Source: Elastic Endgame", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1007", + "name": "System Service Discovery", + "reference": "https://attack.mitre.org/techniques/T1007/" + } + ] + } + ], + "id": "45003c75-1bf6-448d-a664-817dda161618", + "rule_id": "e0881d20-54ac-457f-8733-fe0bc5d44c55", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n ((process.name: \"net.exe\" or process.pe.original_file_name == \"net.exe\" or (process.name : \"net1.exe\" and \n not process.parent.name : \"net.exe\")) and process.args : (\"start\", \"use\") and process.args_count == 2) or\n ((process.name: \"sc.exe\" or process.pe.original_file_name == \"sc.exe\") and process.args: (\"query\", \"q*\")) or\n ((process.name: \"tasklist.exe\" or process.pe.original_file_name == \"tasklist.exe\") and process.args: \"/svc\") or\n (process.name : \"psservice.exe\" or process.pe.original_file_name == \"psservice.exe\")\n ) and not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS Route Table Created", + "description": "Identifies when an AWS Route Table has been created.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Network Security Monitoring", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Route Tables may be created by a system or network administrators. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Route Table creation by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule. Automated processes that use Terraform may lead to false positives." + ], + "references": [ + "https://docs.datadoghq.com/security_platform/default_rules/aws-ec2-route-table-modified/", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateRoute.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateRouteTable" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "id": "cd532bdb-f1be-48a1-bd33-c2a658c3b363", + "rule_id": "e12c0318-99b1-44f2-830c-3a38a43207ca", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:(CreateRoute or CreateRouteTable) and\nevent.outcome:success\n", + "language": "kuery" + }, + { + "name": "AWS RDS Cluster Creation", + "description": "Identifies the creation of a new Amazon Relational Database Service (RDS) Aurora DB cluster or global database spread across multiple regions.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Valid clusters may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Cluster creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/create-db-cluster.html", + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/create-global-cluster.html", + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateGlobalCluster.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1133", + "name": "External Remote Services", + "reference": "https://attack.mitre.org/techniques/T1133/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [] + } + ], + "id": "f5b20739-835f-4d97-a934-2aa199780dfc", + "rule_id": "e14c5fd7-fdd7-49c2-9e5b-ec49d817bc8d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:(CreateDBCluster or CreateGlobalCluster) and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Connection to External Network via Telnet", + "description": "Telnet provides a command line interface for communication with a remote device or server. This rule identifies Telnet network connections to publicly routable IP addresses.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Telnet can be used for both benign or malicious purposes. Telnet is included by default in some Linux distributions, so its presence is not inherently suspicious. The use of Telnet to manage devices remotely has declined in recent years in favor of more secure protocols such as SSH. Telnet usage by non-automated tools or frameworks may be suspicious." + ], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + } + ], + "id": "96ea725b-25dc-486e-baea-ce9a85ff67af", + "rule_id": "e19e64ee-130e-4c07-961f-8a339f0b8362", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"linux\" and process.name == \"telnet\" and event.type == \"start\"]\n [network where host.os.type == \"linux\" and process.name == \"telnet\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\",\n \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\",\n \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Mining Process Creation Event", + "description": "Identifies service creation events of common mining services, possibly indicating the infection of a system with a cryptominer.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "6e76c563-32fc-41ca-91fe-7143f1ef8756", + "rule_id": "e2258f48-ba75-4248-951b-7c885edf18c2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "file where host.os.type == \"linux\" and event.type == \"creation\" and\nevent.action : (\"creation\", \"file_create_event\") and \nfile.name : (\"aliyun.service\", \"moneroocean_miner.service\", \"c3pool_miner.service\", \"pnsd.service\", \"apache4.service\", \"pastebin.service\", \"xvf.service\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "AWS Management Console Root Login", + "description": "Identifies a successful login to the AWS Management Console by the Root user.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS Management Console Root Login\n\nThe AWS root account is the one identity that has complete access to all AWS services and resources in the account, which is created when the AWS account is created. AWS strongly recommends that you do not use the root user for your everyday tasks, even the administrative ones. Instead, adhere to the best practice of using the root user only to create your first IAM user. Then securely lock away the root user credentials and use them to perform only a few account and service management tasks. AWS provides a [list of the tasks that require root user](https://docs.aws.amazon.com/general/latest/gr/root-vs-iam.html#aws_tasks-that-require-root).\n\nThis rule looks for attempts to log in to the AWS Management Console as the root user.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Examine whether this activity is common in the environment by looking for past occurrences on your logs.\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user?\n- Examine the commands, API calls, and data management actions performed by the account in the last 24 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking access to servers,\nservices, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- The alert can be dismissed if this operation is done under change management and approved according to the organization's policy for performing a task that needs this privilege level.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Identify the services or servers involved criticality.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify if there are any regulatory or legal ramifications related to this activity.\n- Configure multi-factor authentication for the user.\n- Follow security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "It's strongly recommended that the root user is not used for everyday tasks, including the administrative ones. Verify whether the IP address, location, and/or hostname should be logging in as root in your environment. Unfamiliar root logins should be investigated immediately. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "e0130718-b37a-4f2a-a0cc-11afa27902bd", + "rule_id": "e2a67480-3b79-403d-96e3-fdd2992c50ef", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "aws.cloudtrail.user_identity.type", + "type": "keyword", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:signin.amazonaws.com and event.action:ConsoleLogin and aws.cloudtrail.user_identity.type:Root and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Process Activity via Compiled HTML File", + "description": "Compiled HTML files (.chm) are commonly distributed as part of the Microsoft HTML Help system. Adversaries may conceal malicious code in a CHM file and deliver it to a victim for execution. CHM content is loaded by the HTML Help executable program (hh.exe).", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Process Activity via Compiled HTML File\n\nCHM (Compiled HTML) files are a format for delivering online help files on Windows. CHM files are compressed compilations of various content, such as HTML documents, images, and scripting/web-related programming languages such as VBA, JScript, Java, and ActiveX.\n\nWhen users double-click CHM files, the HTML Help executable program (`hh.exe`) will execute them. `hh.exe` also can be used to execute code embedded in those files, PowerShell scripts, and executables. This makes it useful for attackers not only to proxy the execution of malicious payloads via a signed binary that could bypass security controls, but also to gain initial access to environments via social engineering methods.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate the parent process to gain understanding of what triggered this behavior.\n - Retrieve `.chm`, `.ps1`, and other files that were involved to further examination.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executables, scripts and help files retrieved from the system using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "The HTML Help executable program (hh.exe) runs whenever a user clicks a compiled help (.chm) file or menu item that opens the help file inside the Help Viewer. This is not always malicious, but adversaries may abuse this technology to conceal malicious code." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.001", + "name": "Compiled HTML File", + "reference": "https://attack.mitre.org/techniques/T1218/001/" + } + ] + } + ] + } + ], + "id": "74c6603d-65cd-4d59-a948-9fc92a20a344", + "rule_id": "e3343ab9-4245-4715-b344-e11c56b0a47f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"hh.exe\" and\n process.name : (\"mshta.exe\", \"cmd.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\", \"cscript.exe\", \"wscript.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS Route53 private hosted zone associated with a VPC", + "description": "Identifies when a Route53 private hosted zone has been associated with VPC.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "A private hosted zone may be asssociated with a VPC by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/Route53/latest/APIReference/API_AssociateVPCWithHostedZone.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "17d58f58-bc36-4400-8c83-6e5f41d9828e", + "rule_id": "e3c27562-709a-42bd-82f2-3ed926cced19", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:route53.amazonaws.com and event.action:AssociateVPCWithHostedZone and\nevent.outcome:success\n", + "language": "kuery" + }, + { + "name": "Kerberos Pre-authentication Disabled for User", + "description": "Identifies the modification of an account's Kerberos pre-authentication options. An adversary with GenericWrite/GenericAll rights over the account can maliciously modify these settings to perform offline password cracking attacks such as AS-REP roasting.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Kerberos Pre-authentication Disabled for User\n\nKerberos pre-authentication is an account protection against offline password cracking. When enabled, a user requesting access to a resource initiates communication with the Domain Controller (DC) by sending an Authentication Server Request (AS-REQ) message with a timestamp that is encrypted with the hash of their password. If and only if the DC is able to successfully decrypt the timestamp with the hash of the user’s password, it will then send an Authentication Server Response (AS-REP) message that contains the Ticket Granting Ticket (TGT) to the user. Part of the AS-REP message is signed with the user’s password. Microsoft's security monitoring [recommendations](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738) state that `'Don't Require Preauth' – Enabled` should not be enabled for user accounts because it weakens security for the account’s Kerberos authentication.\n\nAS-REP roasting is an attack against Kerberos for user accounts that do not require pre-authentication, which means that if the target user has pre-authentication disabled, an attacker can request authentication data for it and get a TGT that can be brute-forced offline, similarly to Kerberoasting.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Determine if the target account is sensitive or privileged.\n- Inspect the account activities for suspicious or abnormal behaviors in the alert timeframe.\n\n### False positive analysis\n\n- Disabling pre-authentication is a bad security practice and should not be allowed in the domain. The security team should map and monitor any potential benign true positives (B-TPs), especially if the target account is privileged.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Reset the target account's password if there is any risk of TGTs having been retrieved.\n- Re-enable the preauthentication option or disable the target account.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Defense Evasion", + "Tactic: Privilege Escalation", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring", + "Data Source: Active Directory" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://harmj0y.medium.com/roasting-as-reps-e6179a65216b", + "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738", + "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0026_windows_audit_user_account_management.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/", + "subtechnique": [ + { + "id": "T1558.004", + "name": "AS-REP Roasting", + "reference": "https://attack.mitre.org/techniques/T1558/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + } + ] + } + ] + } + ], + "id": "ea5762d0-439c-49f4-8a06-7c0c40ca5ffa", + "rule_id": "e514d8cd-ed15-4011-84e2-d15147e059f1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "message", + "type": "match_only_text", + "ecs": true + }, + { + "name": "winlog.api", + "type": "keyword", + "ecs": false + } + ], + "setup": "The 'Audit User Account Management' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nAccount Management >\nAudit User Account Management (Success,Failure)\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.code:4738 and winlog.api:\"wineventlog\" and message:\"'Don't Require Preauth' - Enabled\"\n", + "language": "kuery" + }, + { + "name": "Bash Shell Profile Modification", + "description": "Both ~/.bash_profile and ~/.bashrc are files containing shell commands that are run when Bash is invoked. These files are executed in a user's context, either interactively or non-interactively, when a user logs in so that their environment is set correctly. Adversaries may abuse this to establish persistence by executing malicious content triggered by a user’s shell.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Changes to the Shell Profile tend to be noisy, a tuning per your environment will be required." + ], + "references": [ + "https://www.anomali.com/blog/pulling-linux-rabbit-rabbot-malware-out-of-a-hat" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.004", + "name": "Unix Shell Configuration Modification", + "reference": "https://attack.mitre.org/techniques/T1546/004/" + } + ] + } + ] + } + ], + "id": "6cc3d627-4599-48d6-a76f-3f55f82e00fa", + "rule_id": "e6c1a552-7776-44ad-ae0f-8746cc07773c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "logs-endpoint.events.*", + "auditbeat-*" + ], + "query": "event.category:file and event.type:change and\n process.name:(* and not (sudo or vim or zsh or env or nano or bash or Terminal or xpcproxy or login or cat or cp or\n launchctl or java or dnf or tailwatchd or ldconfig or yum or semodule or cpanellogd or dockerd or authselect or chmod or\n dnf-automatic or git or dpkg or platform-python)) and\n not process.executable:(/Applications/* or /private/var/folders/* or /usr/local/* or /opt/saltstack/salt/bin/*) and\n file.path:(/private/etc/rc.local or\n /etc/rc.local or\n /home/*/.profile or\n /home/*/.profile1 or\n /home/*/.bash_profile or\n /home/*/.bash_profile1 or\n /home/*/.bashrc or\n /Users/*/.bash_profile or\n /Users/*/.zshenv)\n", + "language": "kuery" + }, + { + "name": "Possible Okta DoS Attack", + "description": "Detects possible Denial of Service (DoS) attacks against an Okta organization. An adversary may attempt to disrupt an organization's business operations by performing a DoS attack against its Okta service.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1498", + "name": "Network Denial of Service", + "reference": "https://attack.mitre.org/techniques/T1498/" + }, + { + "id": "T1499", + "name": "Endpoint Denial of Service", + "reference": "https://attack.mitre.org/techniques/T1499/" + } + ] + } + ], + "id": "b3d9da6e-c4c2-4c13-a8ad-08c619234e3d", + "rule_id": "e6e3ecff-03dd-48ec-acbd-54a04de10c68", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:(application.integration.rate_limit_exceeded or system.org.rate_limit.warning or system.org.rate_limit.violation or core.concurrency.org.limit.violation)\n", + "language": "kuery" + }, + { + "name": "AWS Route Table Modified or Deleted", + "description": "Identifies when an AWS Route Table has been modified or deleted.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Network Security Monitoring", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Route Table could be modified or deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Route Table being modified from unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule. Also automated processes that use Terraform may lead to false positives." + ], + "references": [ + "https://github.com/easttimor/aws-incident-response#network-routing", + "https://docs.datadoghq.com/security_platform/default_rules/aws-ec2-route-table-modified/", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReplaceRoute.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReplaceRouteTableAssociation", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRouteTable.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRoute.html", + "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateRouteTable.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "id": "23c9dfeb-105f-475f-bbd0-cb349a2176bc", + "rule_id": "e7cd5982-17c8-4959-874c-633acde7d426", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:(ReplaceRoute or ReplaceRouteTableAssociation or\nDeleteRouteTable or DeleteRoute or DisassociateRouteTable) and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Installation of Security Support Provider", + "description": "Identifies registry modifications related to the Windows Security Support Provider (SSP) configuration. Adversaries may abuse this to establish persistence in an environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.005", + "name": "Security Support Provider", + "reference": "https://attack.mitre.org/techniques/T1547/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "578ec3f0-8fce-4008-8660-09f2fffc0725", + "rule_id": "e86da94d-e54b-4fb5-b96c-cecff87e8787", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\Security Packages*\",\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\OSConfig\\\\Security Packages*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\Security Packages*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\OSConfig\\\\Security Packages*\"\n ) and\n not process.executable : (\"C:\\\\Windows\\\\System32\\\\msiexec.exe\", \"C:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS EC2 VM Export Failure", + "description": "Identifies an attempt to export an AWS EC2 instance. A virtual machine (VM) export may indicate an attempt to extract or exfiltrate information.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Exfiltration", + "Tactic: Collection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "VM exports may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. VM exports from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#export-instance" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1537", + "name": "Transfer Data to Cloud Account", + "reference": "https://attack.mitre.org/techniques/T1537/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1005", + "name": "Data from Local System", + "reference": "https://attack.mitre.org/techniques/T1005/" + } + ] + } + ], + "id": "34e4d8fe-5bd3-4470-b2b4-d4704cb5cd06", + "rule_id": "e919611d-6b6f-493b-8314-7ed6ac2e413b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:CreateInstanceExportTask and event.outcome:failure\n", + "language": "kuery" + }, + { + "name": "AWS IAM Brute Force of Assume Role Policy", + "description": "Identifies a high number of failed attempts to assume an AWS Identity and Access Management (IAM) role. IAM roles are used to delegate access to users or services. An adversary may attempt to enumerate IAM roles in order to determine if a role exists before attempting to assume or hijack the discovered role.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS IAM Brute Force of Assume Role Policy\n\nAn IAM role is an IAM identity that you can create in your account that has specific permissions. An IAM role is similar to an IAM user, in that it is an AWS identity with permission policies that determine what the identity can and cannot do in AWS. However, instead of being uniquely associated with one person, a role is intended to be assumable by anyone who needs it. Also, a role does not have standard long-term credentials such as a password or access keys associated with it. Instead, when you assume a role, it provides you with temporary security credentials for your role session.\n\nAttackers may attempt to enumerate IAM roles in order to determine if a role exists before attempting to assume or hijack the discovered role.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Verify if the `RoleName` parameter contains a unique value in all requests or if the activity is potentially a brute force attack.\n- Verify if the user account successfully updated a trust policy in the last 24 hours.\n- Examine whether this role existed in the environment by looking for past occurrences in your logs.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Examine the account's commands, API calls, and data management actions in the last 24 hours.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- Verify the roles targeted in the failed attempts, and whether the subject role previously existed in the environment. If only one role was targeted in the requests and that role previously existed, it may be a false positive, since automations can continue targeting roles that existed in the environment in the past and cause false positives (FPs).\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-20m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.praetorian.com/blog/aws-iam-assume-role-vulnerabilities", + "https://rhinosecuritylabs.com/aws/assume-worst-aws-assume-role-enumeration/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "8d6a4d74-9aa4-4650-9f8f-672e3076d268", + "rule_id": "ea248a02-bc47-4043-8e94-2885b19b2636", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "aws.cloudtrail.error_code", + "type": "keyword", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "threshold", + "query": "event.dataset:aws.cloudtrail and\n event.provider:iam.amazonaws.com and event.action:UpdateAssumeRolePolicy and\n aws.cloudtrail.error_code:MalformedPolicyDocumentException and event.outcome:failure\n", + "threshold": { + "field": [], + "value": 25 + }, + "index": [ + "filebeat-*", + "logs-aws*" + ], + "language": "kuery" + }, + { + "name": "PowerShell Kerberos Ticket Request", + "description": "Detects PowerShell scripts that have the capability of requesting kerberos tickets, which is a common step in Kerberoasting toolkits to crack service accounts.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Kerberos Ticket Request\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks, making it available for use in various environments, creating an attractive way for attackers to execute code.\n\nAccounts associated with a service principal name (SPN) are viable targets for Kerberoasting attacks, which use brute force to crack the user password, which is used to encrypt a Kerberos TGS ticket.\n\nAttackers can use PowerShell to request these Kerberos tickets, with the intent of extracting them from memory to perform Kerberoasting.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate if the script was executed, and if so, which account was targeted.\n- Validate if the account has an SPN associated with it.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Check if the script has any other functionality that can be potentially malicious.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Review event ID [4769](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4769) related to this account and service name for additional information.\n\n### False positive analysis\n\n- A possible false positive can be identified if the script content is not malicious/harmful or does not request Kerberos tickets for user accounts, as computer accounts are not vulnerable to Kerberoasting due to complex password requirements and policy.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services. Prioritize privileged accounts.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://cobalt.io/blog/kerberoast-attack-techniques", + "https://github.com/EmpireProject/Empire/blob/master/data/module_source/credentials/Invoke-Kerberoast.ps1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + }, + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/", + "subtechnique": [ + { + "id": "T1558.003", + "name": "Kerberoasting", + "reference": "https://attack.mitre.org/techniques/T1558/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "b8ac856d-7ce9-4f1e-90a3-5615a70a4900", + "rule_id": "eb610e70-f9e6-4949-82b9-f1c5bcd37c39", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n KerberosRequestorSecurityToken\n ) and not user.id : (\"S-1-5-18\" or \"S-1-5-20\") and\n not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n", + "language": "kuery" + }, + { + "name": "Potential Disabling of SELinux", + "description": "Identifies potential attempts to disable Security-Enhanced Linux (SELinux), which is a Linux kernel security feature to support access control policies. Adversaries may disable security tools to avoid possible detection of their tools and activities.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "b0f97990-5265-45b8-8587-d95db4aa8c23", + "rule_id": "eb9eb8ba-a983-41d9-9c93-a1c05112ca5e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*", + "endgame-*" + ], + "query": "event.category:process and host.os.type:linux and event.type:(start or process_started) and process.name:setenforce and process.args:0\n", + "language": "kuery" + }, + { + "name": "AWS RDS Instance/Cluster Stoppage", + "description": "Identifies that an Amazon Relational Database Service (RDS) cluster or instance has been stopped.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Valid clusters or instances may be stopped by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Cluster or instance stoppages from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/stop-db-cluster.html", + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_StopDBCluster.html", + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/stop-db-instance.html", + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_StopDBInstance.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1489", + "name": "Service Stop", + "reference": "https://attack.mitre.org/techniques/T1489/" + } + ] + } + ], + "id": "6b48dd07-28cb-4e91-925a-e35f37f21fdf", + "rule_id": "ecf2b32c-e221-4bd4-aa3b-c7d59b3bc01d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:(StopDBCluster or StopDBInstance) and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "AdFind Command Activity", + "description": "This rule detects the Active Directory query tool, AdFind.exe. AdFind has legitimate purposes, but it is frequently leveraged by threat actors to perform post-exploitation Active Directory reconnaissance. The AdFind tool has been observed in Trickbot, Ryuk, Maze, and FIN6 campaigns. For Winlogbeat, this rule requires Sysmon.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AdFind Command Activity\n\n[AdFind](http://www.joeware.net/freetools/tools/adfind/) is a freely available command-line tool used to retrieve information from Active Directory (AD). Network discovery and enumeration tools like `AdFind` are useful to adversaries in the same ways they are effective for network administrators. This tool provides quick ability to scope AD person/computer objects and understand subnets and domain information. There are many [examples](https://thedfirreport.com/category/adfind/) of this tool being adopted by ransomware and criminal groups and used in compromises.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Examine the command line to determine what information was retrieved by the tool.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- This rule has a high chance to produce false positives as it is a legitimate tool used by network administrators.\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Malicious behavior with `AdFind` should be investigated as part of a step within an attack chain. It doesn't happen in isolation, so reviewing previous logs/activity from impacted machines can be very telling.\n\n### Related rules\n\n- Windows Network Enumeration - 7b8bfc26-81d2-435e-965c-d722ee397ef1\n- Enumeration of Administrator Accounts - 871ea072-1b71-4def-b016-6278b505138d\n- Enumeration Command Spawned via WMIPrvSE - 770e0c4d-b998-41e5-a62e-c7901fd7f470\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "http://www.joeware.net/freetools/tools/adfind/", + "https://thedfirreport.com/2020/05/08/adfind-recon/", + "https://www.fireeye.com/blog/threat-research/2020/05/tactics-techniques-procedures-associated-with-maze-ransomware-incidents.html", + "https://www.cybereason.com/blog/dropping-anchor-from-a-trickbot-infection-to-the-discovery-of-the-anchor-malware", + "https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html", + "https://usa.visa.com/dam/VCOM/global/support-legal/documents/fin6-cybercrime-group-expands-threat-To-ecommerce-merchants.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1018", + "name": "Remote System Discovery", + "reference": "https://attack.mitre.org/techniques/T1018/" + }, + { + "id": "T1069", + "name": "Permission Groups Discovery", + "reference": "https://attack.mitre.org/techniques/T1069/", + "subtechnique": [ + { + "id": "T1069.002", + "name": "Domain Groups", + "reference": "https://attack.mitre.org/techniques/T1069/002/" + } + ] + }, + { + "id": "T1087", + "name": "Account Discovery", + "reference": "https://attack.mitre.org/techniques/T1087/", + "subtechnique": [ + { + "id": "T1087.002", + "name": "Domain Account", + "reference": "https://attack.mitre.org/techniques/T1087/002/" + } + ] + }, + { + "id": "T1482", + "name": "Domain Trust Discovery", + "reference": "https://attack.mitre.org/techniques/T1482/" + }, + { + "id": "T1016", + "name": "System Network Configuration Discovery", + "reference": "https://attack.mitre.org/techniques/T1016/" + } + ] + } + ], + "id": "93aa4e08-89cb-4b86-93de-38864dee9608", + "rule_id": "eda499b8-a073-4e35-9733-22ec71f57f3a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"AdFind.exe\" or process.pe.original_file_name == \"AdFind.exe\") and\n process.args : (\"objectcategory=computer\", \"(objectcategory=computer)\",\n \"objectcategory=person\", \"(objectcategory=person)\",\n \"objectcategory=subnet\", \"(objectcategory=subnet)\",\n \"objectcategory=group\", \"(objectcategory=group)\",\n \"objectcategory=organizationalunit\", \"(objectcategory=organizationalunit)\",\n \"objectcategory=attributeschema\", \"(objectcategory=attributeschema)\",\n \"domainlist\", \"dcmodes\", \"adinfo\", \"dclist\", \"computers_pwnotreqd\", \"trustdmp\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "ImageLoad via Windows Update Auto Update Client", + "description": "Identifies abuse of the Windows Update Auto Update Client (wuauclt.exe) to load an arbitrary DLL. This behavior is used as a defense evasion technique to blend-in malicious activity with legitimate Windows software.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "timeline_id": "e70679c2-6cde-4510-9764-4823df18f7db", + "timeline_title": "Comprehensive Process Timeline", + "license": "Elastic License v2", + "note": "", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://dtm.uk/wuauclt/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "5d29f3e5-c293-49f7-a712-2b0701c4d9fb", + "rule_id": "edf8ee23-5ea7-4123-ba19-56b41e424ae3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.pe.original_file_name == \"wuauclt.exe\" or process.name : \"wuauclt.exe\") and\n /* necessary windows update client args to load a dll */\n process.args : \"/RunHandlerComServer\" and process.args : \"/UpdateDeploymentProvider\" and\n /* common paths writeable by a standard user where the target DLL can be placed */\n process.args : (\"C:\\\\Users\\\\*.dll\", \"C:\\\\ProgramData\\\\*.dll\", \"C:\\\\Windows\\\\Temp\\\\*.dll\", \"C:\\\\Windows\\\\Tasks\\\\*.dll\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "BPF filter applied using TC", + "description": "Detects when the tc (transmission control) binary is utilized to set a BPF (Berkeley Packet Filter) on a network interface. Tc is used to configure Traffic Control in the Linux kernel. It can shape, schedule, police and drop traffic. A threat actor can utilize tc to set a bpf filter on an interface for the purpose of manipulating the incoming traffic. This technique is not at all common and should indicate abnormal, suspicious or malicious activity.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Threat: TripleCross", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/h3xduck/TripleCross/blob/master/src/helpers/deployer.sh", + "https://man7.org/linux/man-pages/man8/tc.8.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "9100291c-c9dd-4503-82df-f31482e8e787", + "rule_id": "ef04a476-07ec-48fc-8f3d-5e1742de76d3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type != \"end\" and process.executable : \"/usr/sbin/tc\" and process.args : \"filter\" and process.args : \"add\" and process.args : \"bpf\" and not process.parent.executable: \"/usr/sbin/libvirtd\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Potential Linux Credential Dumping via Proc Filesystem", + "description": "Identifies the execution of the mimipenguin exploit script which is linux adaptation of Windows tool mimikatz. Mimipenguin exploit script is used to dump clear text passwords from a currently logged-in user. The tool exploits a known vulnerability CVE-2018-20781. Malicious actors can exploit the cleartext credentials in memory by dumping the process and extracting lines that have a high probability of containing cleartext passwords.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/huntergregal/mimipenguin", + "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20781" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.007", + "name": "Proc Filesystem", + "reference": "https://attack.mitre.org/techniques/T1003/007/" + } + ] + }, + { + "id": "T1212", + "name": "Exploitation for Credential Access", + "reference": "https://attack.mitre.org/techniques/T1212/" + } + ] + } + ], + "id": "c1225b61-b162-4e0f-80e3-619b0663039e", + "rule_id": "ef100a2e-ecd4-4f72-9d1e-2f779ff3c311", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by process.parent.name,host.name with maxspan=1m\n[process where host.os.type == \"linux\" and process.name == \"ps\" and event.action == \"exec\"\n and process.args in (\"-eo\", \"pid\", \"command\") ]\n\n[process where host.os.type == \"linux\" and process.name == \"strings\" and event.action == \"exec\"\n and process.args : \"/tmp/*\" ]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Administrator Role Assigned to an Okta User", + "description": "Identifies when an administrator role is assigned to an Okta user. An adversary may attempt to assign an administrator role to an Okta user in order to assign additional permissions to a user account and maintain access to their target's environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Data Source: Okta", + "Use Case: Identity and Access Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Administrator roles may be assigned to Okta users by a Super Admin user. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://help.okta.com/en/prod/Content/Topics/Security/administrators-admin-comparison.htm", + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "ce2f301f-a403-42cd-97fe-ad645cc08abe", + "rule_id": "f06414a6-f2a4-466d-8eba-10f85e8abf71", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:user.account.privilege.grant\n", + "language": "kuery" + }, + { + "name": "LSASS Memory Dump Creation", + "description": "Identifies the creation of a Local Security Authority Subsystem Service (lsass.exe) default memory dump. This may indicate a credential access attempt via trusted system utilities such as Task Manager (taskmgr.exe) and SQL Dumper (sqldumper.exe) or known pentesting tools such as Dumpert and AndrewSpecial.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "timeline_id": "4d4c0b59-ea83-483f-b8c1-8c360ee53c5c", + "timeline_title": "Comprehensive File Timeline", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating LSASS Memory Dump Creation\n\nLocal Security Authority Server Service (LSASS) is a process in Microsoft Windows operating systems that is responsible for enforcing security policy on the system. It verifies users logging on to a Windows computer or server, handles password changes, and creates access tokens.\n\nThis rule looks for the creation of memory dump files with file names compatible with credential dumping tools or that start with `lsass`.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the process responsible for creating the dump file.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/outflanknl/Dumpert", + "https://github.com/hoangprod/AndrewSpecial" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "dc3f3979-90d0-4079-abb8-1f76171257af", + "rule_id": "f2f46686-6f3c-4724-bd7d-24e31c70f98f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and file.name : (\"lsass*.dmp\", \"dumpert.dmp\", \"Andrew.dmp\", \"SQLDmpr*.mdmp\", \"Coredump.dmp\") and\n\n not (process.executable : (\"?:\\\\Program Files\\\\Microsoft SQL Server\\\\*\\\\Shared\\\\SqlDumper.exe\", \"?:\\\\Windows\\\\System32\\\\dllhost.exe\") and\n file.path : (\"?:\\\\Program Files\\\\Microsoft SQL Server\\\\*\\\\Shared\\\\ErrorDumps\\\\SQLDmpr*.mdmp\",\n \"?:\\\\*\\\\Reporting Services\\\\Logfiles\\\\SQLDmpr*.mdmp\")) and\n\n not (process.executable : \"?:\\\\WINDOWS\\\\system32\\\\WerFault.exe\" and\n file.path : \"?:\\\\Windows\\\\System32\\\\config\\\\systemprofile\\\\AppData\\\\Local\\\\CrashDumps\\\\lsass.exe.*.dmp\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS RDS Instance Creation", + "description": "Identifies the creation of an Amazon Relational Database Service (RDS) Aurora database instance.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Use Case: Asset Visibility", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "A database instance may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Instances creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "id": "9a40f1e6-2181-4d94-8005-3a9e511af7ec", + "rule_id": "f30f3443-4fbb-4c27-ab89-c3ad49d62315", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:CreateDBInstance and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Persistence via Microsoft Office AddIns", + "description": "Detects attempts to establish persistence on an endpoint by abusing Microsoft Office add-ins.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://labs.withsecure.com/publications/add-in-opportunities-for-office-persistence" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1137", + "name": "Office Application Startup", + "reference": "https://attack.mitre.org/techniques/T1137/", + "subtechnique": [ + { + "id": "T1137.006", + "name": "Add-ins", + "reference": "https://attack.mitre.org/techniques/T1137/006/" + } + ] + } + ] + } + ], + "id": "17cbccf2-fa24-4c45-a35c-a4f46ccfcf34", + "rule_id": "f44fa4b6-524c-4e87-8d9e-a32599e4fb7c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.extension : (\"wll\",\"xll\",\"ppa\",\"ppam\",\"xla\",\"xlam\") and\n file.path :\n (\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Word\\\\Startup\\\\*\",\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\AddIns\\\\*\",\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Excel\\\\XLSTART\\\\*\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Sensitive Privilege SeEnableDelegationPrivilege assigned to a User", + "description": "Identifies the assignment of the SeEnableDelegationPrivilege sensitive \"user right\" to a user. The SeEnableDelegationPrivilege \"user right\" enables computer and user accounts to be trusted for delegation. Attackers can abuse this right to compromise Active Directory accounts and elevate their privileges.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Sensitive Privilege SeEnableDelegationPrivilege assigned to a User\n\nKerberos delegation is an Active Directory feature that allows user and computer accounts to impersonate other accounts, act on their behalf, and use their privileges. Delegation (constrained and unconstrained) can be configured for user and computer objects.\n\nEnabling unconstrained delegation for a computer causes the computer to store the ticket-granting ticket (TGT) in memory at any time an account connects to the computer, so it can be used by the computer for impersonation when needed. Risk is heightened if an attacker compromises computers with unconstrained delegation enabled, as they could extract TGTs from memory and then replay them to move laterally on the domain. If the attacker coerces a privileged user to connect to the server, or if the user does so routinely, the account will be compromised and the attacker will be able to pass-the-ticket to privileged assets.\n\nSeEnableDelegationPrivilege is a user right that is controlled within the Local Security Policy of a domain controller and is managed through Group Policy. This setting is named **Enable computer and user accounts to be trusted for delegation**.\n\nIt is critical to control the assignment of this privilege. A user with this privilege and write access to a computer can control delegation settings, perform the attacks described above, and harvest TGTs from any user that connects to the system.\n\n#### Possible investigation steps\n\n- Investigate how the privilege was assigned to the user and who assigned it.\n- Investigate other potentially malicious activity that was performed by the user that assigned the privileges using the `user.id` and `winlog.activity_id` fields as a filter during the past 48 hours.\n- Investigate other alerts associated with the users/host during the past 48 hours.\n\n### False positive analysis\n\n- The SeEnableDelegationPrivilege privilege should not be assigned to users. If this rule is triggered in your environment legitimately, the security team should notify the administrators about the risks of using it.\n\n### Related rules\n\n- KRBTGT Delegation Backdoor - e052c845-48d0-4f46-8a13-7d0aba05df82\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Remove the privilege from the account.\n- Review the privileges of the administrator account that performed the action.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 108, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Persistence", + "Data Source: Active Directory", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.harmj0y.net/activedirectory/the-most-dangerous-user-right-you-probably-have-never-heard-of/", + "https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_alert_active_directory_user_control.yml", + "https://twitter.com/_nwodtuhs/status/1454049485080907776", + "https://www.thehacker.recipes/ad/movement/kerberos/delegations", + "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0105_windows_audit_authorization_policy_change.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "4942dc95-09fc-430d-9e69-2aa52a7d1e07", + "rule_id": "f494c678-3c33-43aa-b169-bb3d5198c41d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.PrivilegeList", + "type": "keyword", + "ecs": false + } + ], + "setup": "The 'Audit Authorization Policy Change' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policy Configuration >\nAudit Policies >\nPolicy Change >\nAudit Authorization Policy Change (Success,Failure)\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.action:\"Authorization Policy Change\" and event.code:4704 and\n winlog.event_data.PrivilegeList:\"SeEnableDelegationPrivilege\"\n", + "language": "kuery" + }, + { + "name": "Windows Script Executing PowerShell", + "description": "Identifies a PowerShell process launched by either cscript.exe or wscript.exe. Observing Windows scripting processes executing a PowerShell script, may be indicative of malicious activity.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Windows Script Executing PowerShell\n\nThe Windows Script Host (WSH) is an Windows automation technology, which is ideal for non-interactive scripting needs, such as logon scripting, administrative scripting, and machine automation.\n\nAttackers commonly use WSH scripts as their initial access method, acting like droppers for second stage payloads, but can also use them to download tools and utilities needed to accomplish their goals.\n\nThis rule looks for the spawn of the `powershell.exe` process with `cscript.exe` or `wscript.exe` as its parent process.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate commands executed by the spawned PowerShell process.\n- If unsigned files are found on the process tree, retrieve them and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Determine how the script file was delivered (email attachment, dropped by other processes, etc.).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- The usage of these script engines by regular users is unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Reimage the host operating system and restore compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.005", + "name": "Visual Basic", + "reference": "https://attack.mitre.org/techniques/T1059/005/" + } + ] + } + ] + } + ], + "id": "a3fee6f0-ba68-45ac-a21c-3d8e54bb0787", + "rule_id": "f545ff26-3c94-4fd0-bd33-3c7f95a3a0fc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"cscript.exe\", \"wscript.exe\") and process.name : \"powershell.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Windows Firewall Disabled via PowerShell", + "description": "Identifies when the Windows Firewall is disabled using PowerShell cmdlets, which can help attackers evade network constraints, like internet and network lateral communication restrictions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Windows Firewall Disabled via PowerShell\n\nWindows Defender Firewall is a native component that provides host-based, two-way network traffic filtering for a device and blocks unauthorized network traffic flowing into or out of the local device.\n\nAttackers can disable the Windows firewall or its rules to enable lateral movement and command and control activity.\n\nThis rule identifies patterns related to disabling the Windows firewall or its rules using the `Set-NetFirewallProfile` PowerShell cmdlet.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Check whether the user is an administrator and is legitimately performing troubleshooting.\n- In case of an allowed benign true positive (B-TP), assess adding rules to allow needed traffic and re-enable the firewall.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Re-enable the firewall with its desired configurations.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Windows Firewall can be disabled by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Windows Profile being disabled by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/netsecurity/set-netfirewallprofile?view=windowsserver2019-ps", + "https://www.tutorialspoint.com/how-to-get-windows-firewall-profile-settings-using-powershell", + "http://powershellhelp.space/commands/set-netfirewallrule-psv5.php", + "http://woshub.com/manage-windows-firewall-powershell/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.004", + "name": "Disable or Modify System Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "6155eec0-deae-4c58-bbc3-b2012deaac46", + "rule_id": "f63c8e3c-d396-404f-b2ea-0379d3942d73", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.action == \"start\" and\n (process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") or process.pe.original_file_name == \"PowerShell.EXE\") and\n process.args : \"*Set-NetFirewallProfile*\" and\n (process.args : \"*-Enabled*\" and process.args : \"*False*\") and\n (process.args : \"*-All*\" or process.args : (\"*Public*\", \"*Domain*\", \"*Private*\"))\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Delete Volume USN Journal with Fsutil", + "description": "Identifies use of the fsutil.exe to delete the volume USNJRNL. This technique is used by attackers to eliminate evidence of files created during post-exploitation activities.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Delete Volume USN Journal with Fsutil\n\nThe Update Sequence Number (USN) Journal is a feature in the NTFS file system used by Microsoft Windows operating systems to keep track of changes made to files and directories on a disk volume. The journal records metadata for changes such as file creation, deletion, modification, and permission changes. It is used by the operating system for various purposes, including backup and recovery, file indexing, and file replication.\n\nThis artifact can provide valuable information in forensic analysis, such as programs executed (prefetch file operations), file modification events in suspicious directories, deleted files, etc. Attackers may delete this artifact in an attempt to cover their tracks, and this rule identifies the usage of the `fsutil.exe` utility to accomplish it.\n\nConsider using the Elastic Defend integration instead of USN Journal, as the Elastic Defend integration provides more visibility and context in the file operations it records.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Review file operation logs from Elastic Defend for suspicious activity the attacker tried to hide.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.004", + "name": "File Deletion", + "reference": "https://attack.mitre.org/techniques/T1070/004/" + } + ] + } + ] + } + ], + "id": "e2acf638-6c50-43a4-9cab-cadb1ed614fd", + "rule_id": "f675872f-6d85-40a3-b502-c0d2ef101e92", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"fsutil.exe\" or process.pe.original_file_name == \"fsutil.exe\") and\n process.args : \"deletejournal\" and process.args : \"usn\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "AWS CloudWatch Alarm Deletion", + "description": "Identifies the deletion of an AWS CloudWatch alarm. An adversary may delete alarms in an attempt to evade defenses.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating AWS CloudWatch Alarm Deletion\n\nAmazon CloudWatch is a monitoring and observability service that collects monitoring and operational data in the form of\nlogs, metrics, and events for resources and applications. This data can be used to detect anomalous behavior in your environments, set alarms, visualize\nlogs and metrics side by side, take automated actions, troubleshoot issues, and discover insights to keep your\napplications running smoothly.\n\nCloudWatch Alarms is a feature that allows you to watch CloudWatch metrics and to receive notifications when the metrics\nfall outside of the levels (high or low thresholds) that you configure.\n\nThis rule looks for the deletion of a alarm using the API `DeleteAlarms` action. Attackers can do this to cover their\ntracks and evade security defenses.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if there is a justification for this behavior.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 208, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Resources: Investigation Guide", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Alarm deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudwatch/delete-alarms.html", + "https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DeleteAlarms.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "8e6aff68-3507-442e-8b40-2b6f3fc9e255", + "rule_id": "f772ec8a-e182-483c-91d2-72058f76a44c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:monitoring.amazonaws.com and event.action:DeleteAlarms and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Microsoft Exchange Worker Spawning Suspicious Processes", + "description": "Identifies suspicious processes being spawned by the Microsoft Exchange Server worker process (w3wp). This activity may indicate exploitation activity or access to an existing web shell backdoor.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers", + "https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities", + "https://discuss.elastic.co/t/detection-and-response-for-hafnium-activity/266289" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + }, + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + } + ], + "id": "0b9b2e4d-51b0-4309-9e52-0a1d29ccc099", + "rule_id": "f81ee52c-297e-46d9-9205-07e66931df26", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"w3wp.exe\" and process.parent.args : \"MSExchange*AppPool\" and\n (process.name : (\"cmd.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") or\n process.pe.original_file_name in (\"cmd.exe\", \"powershell.exe\", \"pwsh.dll\", \"powershell_ise.exe\"))\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Modification of AmsiEnable Registry Key", + "description": "Identifies modifications of the AmsiEnable registry key to 0, which disables the Antimalware Scan Interface (AMSI). An adversary can modify this key to disable AMSI protections.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Modification of AmsiEnable Registry Key\n\nThe Windows Antimalware Scan Interface (AMSI) is a versatile interface standard that allows your applications and services to integrate with any antimalware product on a machine. AMSI integrates with multiple Windows components, ranging from User Account Control (UAC) to VBA macros and PowerShell.\n\nSince AMSI is widely used across security products for increased visibility, attackers can disable it to evade detections that rely on it.\n\nThis rule monitors the modifications to the Software\\Microsoft\\Windows Script\\Settings\\AmsiEnable registry key.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the execution of scripts and macros after the registry modification.\n- Retrieve scripts or Microsoft Office files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Use process name, command line, and file hash to search for occurrences on other hosts.\n\n### False positive analysis\n\n- This modification should not happen legitimately. Any potential benign true positive (B-TP) should be mapped and monitored by the security team as these modifications expose the host to malware infections.\n\n### Related rules\n\n- Microsoft Windows Defender Tampering - fe794edd-487f-4a90-b285-3ee54f2af2d3\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Delete or set the key to its default value.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://hackinparis.com/data/slides/2019/talks/HIP2019-Dominic_Chell-Cracking_The_Perimeter_With_Sharpshooter.pdf", + "https://docs.microsoft.com/en-us/windows/win32/amsi/antimalware-scan-interface-portal" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + }, + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "2c88fbd3-7b16-442b-8952-9555c4fbf75a", + "rule_id": "f874315d-5188-4b4a-8521-d1c73093a7e4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n registry.path : (\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows Script\\\\Settings\\\\AmsiEnable\",\n \"HKU\\\\*\\\\Software\\\\Microsoft\\\\Windows Script\\\\Settings\\\\AmsiEnable\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows Script\\\\Settings\\\\AmsiEnable\"\n ) and\n registry.data.strings: (\"0\", \"0x00000000\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Unusual Linux Network Configuration Discovery", + "description": "Looks for commands related to system network configuration discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used by a threat actor to engage in system network configuration discovery in order to increase their understanding of connected networks and hosts. This information may be used to shape follow-up behaviors such as lateral movement or additional discovery.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Discovery" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon user command activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1016", + "name": "System Network Configuration Discovery", + "reference": "https://attack.mitre.org/techniques/T1016/" + } + ] + } + ], + "id": "ed9741ec-8678-4ff9-9b04-9a94b855b927", + "rule_id": "f9590f47-6bd5-4a49-bd49-a2f886476fb9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 25, + "machine_learning_job_id": [ + "v3_linux_network_configuration_discovery" + ] + }, + { + "name": "Privileged Account Brute Force", + "description": "Identifies multiple consecutive logon failures targeting an Admin account from the same source address and within a short time interval. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to accounts.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Privileged Account Brute Force\n\nAdversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to guess the password using a repetitive or iterative mechanism systematically. More details can be found [here](https://attack.mitre.org/techniques/T1110/001/).\n\nThis rule identifies potential password guessing/brute force activity from a single address against an account that contains the `admin` pattern on its name, which is likely a highly privileged account.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the logon failure reason code and the targeted user name.\n - Prioritize the investigation if the account is critical or has administrative privileges over the domain.\n- Investigate the source IP address of the failed Network Logon attempts.\n - Identify whether these attempts are coming from the internet or are internal.\n- Investigate other alerts associated with the involved users and source host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Examine the source host for derived artifacts that indicate compromise:\n - Observe and collect information about the following activities in the alert source host:\n - Attempts to contact external domains and addresses.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the host which is the source of this activity.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Domain trust relationship issues.\n- Infrastructure or availability issues.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the source host to prevent further post-compromise behavior.\n- If the asset is exposed to the internet with RDP or other remote services available, take the necessary measures to restrict access to the asset. If not possible, limit the access via the firewall to only the needed IP addresses. Also, ensure the system uses robust authentication mechanisms and is patched regularly.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/", + "subtechnique": [ + { + "id": "T1110.001", + "name": "Password Guessing", + "reference": "https://attack.mitre.org/techniques/T1110/001/" + }, + { + "id": "T1110.003", + "name": "Password Spraying", + "reference": "https://attack.mitre.org/techniques/T1110/003/" + } + ] + } + ] + } + ], + "id": "85560ca9-695c-4e02-9acd-9e312c09d431", + "rule_id": "f9790abf-bd0c-45f9-8b5f-d0b74015e029", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.Status", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.logon.type", + "type": "unknown", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "sequence by winlog.computer_name, source.ip with maxspan=10s\n [authentication where event.action == \"logon-failed\" and winlog.logon.type : \"Network\" and\n source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and user.name : \"*admin*\" and\n\n /* noisy failure status codes often associated to authentication misconfiguration */\n not winlog.event_data.Status : (\"0xC000015B\", \"0XC000005E\", \"0XC0000133\", \"0XC0000192\")] with runs=5\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Suspicious Activity Reported by Okta User", + "description": "Detects when a user reports suspicious activity for their Okta account. These events should be investigated, as they can help security teams identify when an adversary is attempting to gain access to their network.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Use Case: Identity and Access Audit", + "Data Source: Okta", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A user may report suspicious activity on their Okta account in error." + ], + "references": [ + "https://developer.okta.com/docs/reference/api/system-log/", + "https://developer.okta.com/docs/reference/api/event-types/", + "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "e2e80f6d-f5e2-4d1b-bd72-b394ef624dda", + "rule_id": "f994964f-6fce-4d75-8e79-e16ccc412588", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "okta", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-okta*" + ], + "query": "event.dataset:okta.system and event.action:user.account.report_suspicious_activity_by_enduser\n", + "language": "kuery" + }, + { + "name": "Potential External Linux SSH Brute Force Detected", + "description": "Identifies multiple external consecutive login failures targeting a user account from the same source address within a short time interval. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to these accounts.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential External Linux SSH Brute Force Detected\n\nThe rule identifies consecutive SSH login failures targeting a user account from the same source IP address to the same target host indicating brute force login attempts.\n\nThis rule will generate a lot of noise for systems with a front-facing SSH service, as adversaries scan the internet for remotely accessible SSH services and try to brute force them to gain unauthorized access. \n\nIn case this rule generates too much noise and external brute forcing is of not much interest, consider turning this rule off and enabling \"Potential Internal Linux SSH Brute Force Detected\" to detect internal brute force attempts.\n\n#### Possible investigation steps\n\n- Investigate the login failure user name(s).\n- Investigate the source IP address of the failed ssh login attempt(s).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Infrastructure or availability issue.\n\n### Related Rules\n\n- Potential Internal Linux SSH Brute Force Detected - 1c27fa22-7727-4dd3-81c0-de6da5555feb\n- Potential SSH Password Guessing - 8cb84371-d053-4f4f-bce0-c74990e28f28\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 5, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/", + "subtechnique": [ + { + "id": "T1110.001", + "name": "Password Guessing", + "reference": "https://attack.mitre.org/techniques/T1110/001/" + }, + { + "id": "T1110.003", + "name": "Password Spraying", + "reference": "https://attack.mitre.org/techniques/T1110/003/" + } + ] + } + ] + } + ], + "id": "ff8f6d87-a2aa-4daa-afb3-1764ba4bcc1a", + "rule_id": "fa210b61-b627-4e5e-86f4-17e8270656ab", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, source.ip, user.name with maxspan=15s\n [ authentication where host.os.type == \"linux\" and \n event.action in (\"ssh_login\", \"user_login\") and event.outcome == \"failure\" and\n not cidrmatch(source.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \n \"::1\", \"FE80::/10\", \"FF00::/8\") ] with runs = 10\n", + "language": "eql", + "index": [ + "logs-system.auth-*" + ] + }, + { + "name": "AWS Configuration Recorder Stopped", + "description": "Identifies an AWS configuration change to stop recording a designated set of resources.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: AWS", + "Data Source: Amazon Web Services", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Recording changes from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configservice/stop-configuration-recorder.html", + "https://docs.aws.amazon.com/config/latest/APIReference/API_StopConfigurationRecorder.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "977680e3-2f5b-4107-bc22-5fa6007694d3", + "rule_id": "fbd44836-0d69-4004-a0b4-03c20370c435", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "aws", + "version": "^2.0.0", + "integration": "cloudtrail" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-aws*" + ], + "query": "event.dataset:aws.cloudtrail and event.provider:config.amazonaws.com and event.action:StopConfigurationRecorder and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "UAC Bypass Attempt via Elevated COM Internet Explorer Add-On Installer", + "description": "Identifies User Account Control (UAC) bypass attempts by abusing an elevated COM Interface to launch a malicious program. Attackers may attempt to bypass UAC to stealthily execute code with elevated permissions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://swapcontext.blogspot.com/2020/11/uac-bypasses-from-comautoapprovallist.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.002", + "name": "Bypass User Account Control", + "reference": "https://attack.mitre.org/techniques/T1548/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1559", + "name": "Inter-Process Communication", + "reference": "https://attack.mitre.org/techniques/T1559/", + "subtechnique": [ + { + "id": "T1559.001", + "name": "Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1559/001/" + } + ] + } + ] + } + ], + "id": "643b9eb3-7de0-4a2c-9fd1-b410eb3d281a", + "rule_id": "fc7c0fa4-8f03-4b3e-8336-c5feab0be022", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.executable : \"C:\\\\*\\\\AppData\\\\*\\\\Temp\\\\IDC*.tmp\\\\*.exe\" and\n process.parent.name : \"ieinstal.exe\" and process.parent.args : \"-Embedding\"\n\n /* uncomment once in winlogbeat */\n /* and not (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true) */\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious CertUtil Commands", + "description": "Identifies suspicious commands being used with certutil.exe. CertUtil is a native Windows component which is part of Certificate Services. CertUtil is often abused by attackers to live off the land for stealthier command and control or data exfiltration.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "timeline_id": "e70679c2-6cde-4510-9764-4823df18f7db", + "timeline_title": "Comprehensive Process Timeline", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Suspicious CertUtil Commands\n\n`certutil.exe` is a command line utility program that is included with Microsoft Windows operating systems. It is used to manage and manipulate digital certificates and certificate services on computers running Windows.\n\nAttackers can abuse `certutil.exe` utility to download and/or deobfuscate malware, offensive security tools, and certificates from external sources to take the next steps in a compromised environment. This rule identifies command line arguments used to accomplish these behaviors.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to determine the nature of the execution.\n - If files were downloaded, retrieve them and check whether they were run, and under which security context.\n - If files were obfuscated or deobfuscated, retrieve them.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the involved files using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://twitter.com/Moriarty_Meng/status/984380793383370752", + "https://twitter.com/egre55/status/1087685529016193025", + "https://www.sysadmins.lv/blog-en/certutil-tips-and-tricks-working-with-x509-file-format.aspx", + "https://docs.microsoft.com/en-us/archive/blogs/pki/basic-crl-checking-with-certutil" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1140", + "name": "Deobfuscate/Decode Files or Information", + "reference": "https://attack.mitre.org/techniques/T1140/" + } + ] + } + ], + "id": "6b0159c1-530d-4964-993b-e173896da111", + "rule_id": "fd70c98a-c410-42dc-a2e3-761c71848acf", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"certutil.exe\" or process.pe.original_file_name == \"CertUtil.exe\") and\n process.args : (\"?decode\", \"?encode\", \"?urlcache\", \"?verifyctl\", \"?encodehex\", \"?decodehex\", \"?exportPFX\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Microsoft Windows Defender Tampering", + "description": "Identifies when one or more features on Microsoft Defender are disabled. Adversaries may disable or tamper with Microsoft Defender features to evade detection and conceal malicious behavior.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Microsoft Windows Defender Tampering\n\nMicrosoft Windows Defender is an antivirus product built into Microsoft Windows, which makes it popular across multiple environments. Disabling it is a common step in threat actor playbooks.\n\nThis rule monitors the registry for modifications that disable Windows Defender features.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine which features have been disabled, and check if this operation is done under change management and approved according to the organization's policy.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity, the configuration is justified (for example, it is being used to deploy other security solutions or troubleshooting), and no other suspicious activity has been observed.\n\n### Related rules\n\n- Windows Defender Disabled via Registry Modification - 2ffa1f1e-b6db-47fa-994b-1512743847eb\n- Disabling Windows Defender Security Settings via PowerShell - c8cccb06-faf2-4cd5-886e-2c9636cfcb87\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Take actions to restore the appropriate Windows Defender antivirus configurations.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Legitimate Windows Defender configuration changes" + ], + "references": [ + "https://thedfirreport.com/2021/10/18/icedid-to-xinglocker-ransomware-in-24-hours/", + "https://www.tenforums.com/tutorials/32236-enable-disable-microsoft-defender-pua-protection-windows-10-a.html", + "https://www.tenforums.com/tutorials/104025-turn-off-core-isolation-memory-integrity-windows-10-a.html", + "https://www.tenforums.com/tutorials/105533-enable-disable-windows-defender-exploit-protection-settings.html", + "https://www.tenforums.com/tutorials/123792-turn-off-tamper-protection-microsoft-defender-antivirus.html", + "https://www.tenforums.com/tutorials/51514-turn-off-microsoft-defender-periodic-scanning-windows-10-a.html", + "https://www.tenforums.com/tutorials/3569-turn-off-real-time-protection-microsoft-defender-antivirus.html", + "https://www.tenforums.com/tutorials/99576-how-schedule-scan-microsoft-defender-antivirus-windows-10-a.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + }, + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "1324f811-4e0a-40cc-b2f7-0fa96f7f3a8c", + "rule_id": "fe794edd-487f-4a90-b285-3ee54f2af2d3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\PUAProtection\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender Security Center\\\\App and Browser protection\\\\DisallowExploitProtectionOverride\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\DisableAntiSpyware\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Features\\\\TamperProtection\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Real-Time Protection\\\\DisableRealtimeMonitoring\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Real-Time Protection\\\\DisableIntrusionPreventionSystem\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Real-Time Protection\\\\DisableScriptScanning\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Windows Defender Exploit Guard\\\\Controlled Folder Access\\\\EnableControlledFolderAccess\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Real-Time Protection\\\\DisableIOAVProtection\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Reporting\\\\DisableEnhancedNotifications\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\SpyNet\\\\DisableBlockAtFirstSeen\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\SpyNet\\\\SpynetReporting\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\SpyNet\\\\SubmitSamplesConsent\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Real-Time Protection\\\\DisableBehaviorMonitoring\" and\n registry.data.strings : (\"1\", \"0x00000001\"))\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "LSASS Process Access via Windows API", + "description": "Identifies access attempts to the LSASS handle, which may indicate an attempt to dump credentials from LSASS memory.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.001/T1003.001.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + } + ], + "id": "7003a21d-7f5d-4d81-98b1-cc4950d8e8a9", + "rule_id": "ff4599cb-409f-4910-a239-52e4e6f532ff", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "Target.process.name", + "type": "unknown", + "ecs": false + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.api.name", + "type": "unknown", + "ecs": false + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "api where host.os.type == \"windows\" and \n process.Ext.api.name in (\"OpenProcess\", \"OpenThread\") and Target.process.name : \"lsass.exe\" and \n not process.executable : \n (\"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\*\\\\MsMpEng.exe\", \n \"?:\\\\Program Files\\\\Microsoft Security Client\\\\MsMpEng.exe\", \n \"?:\\\\Program Files*\\\\Windows Defender\\\\MsMpEng.exe\", \n \"?:\\\\Program Files (x86)\\\\N-able Technologies\\\\Windows Agent\\\\bin\\\\agent.exe\", \n \"?:\\\\Windows\\\\System32\\\\wbem\\\\WmiPrvSE.exe\", \n \"?:\\\\Windows\\\\SysWOW64\\\\wbem\\\\WmiPrvSE.exe\",\n \"?:\\\\Program Files\\\\VMware\\\\VMware Tools\\\\vmtoolsd.exe\", \n \"?:\\\\Program Files (x86)\\\\N-able Technologies\\\\Reactive\\\\bin\\\\NableReactiveManagement.exe\", \n \"?:\\\\Program Files\\\\EA\\\\AC\\\\EAAntiCheat.GameService.exe\", \n \"?:\\\\Program Files\\\\Cisco\\\\AMP\\\\*\\\\sfc.exe\", \n \"?:\\\\Program Files\\\\TDAgent\\\\ossec-agent\\\\ossec-agent.exe\", \n \"?:\\\\Windows\\\\System32\\\\MRT.exe\", \n \"?:\\\\Program Files\\\\Elastic\\\\Agent\\\\data\\\\elastic-agent-*\\\\components\\\\metricbeat.exe\", \n \"?:\\\\Program Files\\\\Elastic\\\\Agent\\\\data\\\\elastic-agent-*\\\\components\\\\osqueryd.exe\", \n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\", \n \"?:\\\\Program Files\\\\Common Files\\\\McAfee\\\\AVSolution\\\\mcshield.exe\", \n \"?:\\\\Program Files\\\\Fortinet\\\\FortiClient\\\\FortiProxy.exe\", \n \"?:\\\\Program Files\\\\LogicMonitor\\\\Agent\\\\bin\\\\sbshutdown.exe\", \n \"?:\\\\Program Files (x86)\\\\Google\\\\Update\\\\GoogleUpdate.exe\", \n \"?:\\\\Program Files (x86)\\\\Blackpoint\\\\SnapAgent\\\\SnapAgent.exe\", \n \"?:\\\\Program Files\\\\ESET\\\\ESET Security\\\\ekrn.exe\", \n \"?:\\\\Program Files\\\\Huntress\\\\HuntressAgent.exe\", \n \"?:\\\\Program Files (x86)\\\\eScan\\\\reload.exe\", \n \"?:\\\\Program Files\\\\Topaz OFD\\\\Warsaw\\\\core.exe\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Cookies Theft via Browser Debugging", + "description": "Identifies the execution of a Chromium based browser with the debugging process argument, which may indicate an attempt to steal authentication cookies. An adversary may steal web application or service session cookies and use them to gain access web applications or Internet services as an authenticated user without needing credentials.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: Windows", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Developers performing browsers plugin or extension debugging." + ], + "references": [ + "https://github.com/defaultnamehere/cookie_crimes", + "https://embracethered.com/blog/posts/2020/cookie-crimes-on-mirosoft-edge/", + "https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/post/multi/gather/chrome_cookies.md", + "https://posts.specterops.io/hands-in-the-cookie-jar-dumping-cookies-with-chromiums-remote-debugger-port-34c4f468844e" + ], + "max_signals": 33, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1539", + "name": "Steal Web Session Cookie", + "reference": "https://attack.mitre.org/techniques/T1539/" + } + ] + } + ], + "id": "40c28e39-43d1-444c-9ae1-0128c21bd303", + "rule_id": "027ff9ea-85e7-42e3-99d2-bbb7069e02eb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where event.type in (\"start\", \"process_started\", \"info\") and\n process.name in (\n \"Microsoft Edge\",\n \"chrome.exe\",\n \"Google Chrome\",\n \"google-chrome-stable\",\n \"google-chrome-beta\",\n \"google-chrome\",\n \"msedge.exe\") and\n process.args : (\"--remote-debugging-port=*\",\n \"--remote-debugging-targets=*\",\n \"--remote-debugging-pipe=*\") and\n process.args : \"--user-data-dir=*\" and not process.args:\"--remote-debugging-port=0\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Process Created with an Elevated Token", + "description": "Identifies the creation of a process running as SYSTEM and impersonating a Windows core binary privileges. Adversaries may create a new process with a different token to escalate privileges and bypass access controls.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://lengjibo.github.io/token/", + "https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createprocesswithtokenw" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/", + "subtechnique": [ + { + "id": "T1134.002", + "name": "Create Process with Token", + "reference": "https://attack.mitre.org/techniques/T1134/002/" + } + ] + } + ] + } + ], + "id": "2109ef41-fc81-4f61-906b-9e789e808a77", + "rule_id": "02a23ee7-c8f8-4701-b99d-e9038ce313cb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.effective_parent.executable", + "type": "unknown", + "ecs": false + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "/* This rule is only compatible with Elastic Endpoint 8.4+ */\n\nprocess where host.os.type == \"windows\" and event.action == \"start\" and\n\n /* CreateProcessWithToken and effective parent is a privileged MS native binary used as a target for token theft */\n user.id : \"S-1-5-18\" and\n\n /* Token Theft target process usually running as service are located in one of the following paths */\n process.Ext.effective_parent.executable :\n (\"?:\\\\Windows\\\\*.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\ProgramData\\\\*\") and\n\n/* Ignores Utility Manager in Windows running in debug mode */\n not (process.Ext.effective_parent.executable : \"?:\\\\Windows\\\\System32\\\\Utilman.exe\" and\n process.parent.executable : \"?:\\\\Windows\\\\System32\\\\Utilman.exe\" and process.parent.args : \"/debug\") and\n\n/* Ignores Windows print spooler service with correlation to Access Intelligent Form */\nnot (process.parent.executable : \"?\\\\Windows\\\\System32\\\\spoolsv.exe\" and\n process.executable: \"?:\\\\Program Files*\\\\Access\\\\Intelligent Form\\\\*\\\\LaunchCreate.exe\") and \n\n/* Ignores Windows error reporting executables */\n not process.executable : (\"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFaultSecure.exe\",\n \"?:\\\\windows\\\\system32\\\\WerMgr.exe\",\n \"?:\\\\Windows\\\\SoftwareDistribution\\\\Download\\\\Install\\\\securityhealthsetup.exe\") and\n\n /* Ignores Windows updates from TiWorker.exe that runs with elevated privileges */\n not (process.parent.executable : \"?:\\\\Windows\\\\WinSxS\\\\*\\\\TiWorker.exe\" and\n process.executable : (\"?:\\\\Windows\\\\Microsoft.NET\\\\Framework*.exe\",\n \"?:\\\\Windows\\\\WinSxS\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\iissetup.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\inetsrv\\\\iissetup.exe\",\n \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\aspnetca.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\inetsrv\\\\aspnetca.exe\",\n \"?:\\\\Windows\\\\System32\\\\lodctr.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\lodctr.exe\",\n \"?:\\\\Windows\\\\System32\\\\netcfg.exe\",\n \"?:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\*\\\\ngen.exe\",\n \"?:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\*\\\\aspnet_regiis.exe\")) and\n\n\n/* Ignores additional parent executables that run with elevated privileges */\n not process.parent.executable : \n (\"?:\\\\Windows\\\\System32\\\\AtBroker.exe\", \n \"?:\\\\Windows\\\\system32\\\\svchost.exe\", \n \"?:\\\\Program Files (x86)\\\\*.exe\", \n \"?:\\\\Program Files\\\\*.exe\", \n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\DriverStore\\\\*\") and\n\n/* Ignores Windows binaries with a trusted signature and specific signature name */\n not (process.code_signature.trusted == true and\n process.code_signature.subject_name : \n (\"philandro Software GmbH\", \n \"Freedom Scientific Inc.\", \n \"TeamViewer Germany GmbH\", \n \"Projector.is, Inc.\", \n \"TeamViewer GmbH\", \n \"Cisco WebEx LLC\", \n \"Dell Inc\"))\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Dumping Account Hashes via Built-In Commands", + "description": "Identifies the execution of macOS built-in commands used to dump user account hashes. Adversaries may attempt to dump credentials to obtain account login information in the form of a hash. These hashes can be cracked or leveraged for lateral movement.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://apple.stackexchange.com/questions/186893/os-x-10-9-where-are-password-hashes-stored", + "https://www.unix.com/man-page/osx/8/mkpassdb/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + } + ] + } + ], + "id": "181493c6-b70a-4968-a73f-514fd9a4f4ba", + "rule_id": "02ea4563-ec10-4974-b7de-12e65aa4f9b3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:start and\n process.name:(defaults or mkpassdb) and process.args:(ShadowHashData or \"-dump\")\n", + "language": "kuery" + }, + { + "name": "High Number of Process and/or Service Terminations", + "description": "This rule identifies a high number (10) of process terminations (stop, delete, or suspend) from the same host within a short time period.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating High Number of Process and/or Service Terminations\n\nAttackers can stop services and kill processes for a variety of purposes. For example, they can stop services associated with business applications and databases to release the lock on files used by these applications so they may be encrypted, or stop security and backup solutions, etc.\n\nThis rule identifies a high number (10) of service and/or process terminations (stop, delete, or suspend) from the same host within a short time period.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check if any files on the host machine have been encrypted.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further destructive behavior, which is commonly associated with this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system or restore it to the operational state.\n- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Impact", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/security-labs/luna-ransomware-attack-pattern" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1489", + "name": "Service Stop", + "reference": "https://attack.mitre.org/techniques/T1489/" + } + ] + } + ], + "id": "9ad86ea0-669c-4f1b-b95b-ba32bf917857", + "rule_id": "035889c4-2686-4583-a7df-67f89c292f2c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "event.category:process and host.os.type:windows and event.type:start and process.name:(net.exe or sc.exe or taskkill.exe) and\n process.args:(stop or pause or delete or \"/PID\" or \"/IM\" or \"/T\" or \"/F\" or \"/t\" or \"/f\" or \"/im\" or \"/pid\") and\n not process.parent.name:osquerybeat.exe\n", + "threshold": { + "field": [ + "host.id" + ], + "value": 10 + }, + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Microsoft IIS Service Account Password Dumped", + "description": "Identifies the Internet Information Services (IIS) command-line tool, AppCmd, being used to list passwords. An attacker with IIS web server access via a web shell can decrypt and dump the IIS AppPool service account password using AppCmd.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.netspi.com/decrypting-iis-passwords-to-break-out-of-the-dmz-part-1/" + ], + "max_signals": 33, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + } + ] + } + ], + "id": "559ef12b-6271-451a-8b0e-301123078b31", + "rule_id": "0564fb9d-90b9-4234-a411-82a546dc1343", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"appcmd.exe\" or process.pe.original_file_name == \"appcmd.exe\") and\n process.args : \"/list\" and process.args : \"/text*password\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Remote Desktop Enabled in Windows Firewall by Netsh", + "description": "Identifies use of the network shell utility (netsh.exe) to enable inbound Remote Desktop Protocol (RDP) connections in the Windows Firewall.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remote Desktop Enabled in Windows Firewall by Netsh\n\nMicrosoft Remote Desktop Protocol (RDP) is a proprietary Microsoft protocol that enables remote connections to other computers, typically over TCP port 3389.\n\nAttackers can use RDP to conduct their actions interactively. Ransomware operators frequently use RDP to access victim servers, often using privileged accounts.\n\nThis rule detects the creation of a Windows Firewall inbound rule that would allow inbound RDP traffic using the `netsh.exe` utility.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the user to check if they are aware of the operation.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check whether it makes sense to enable RDP to this host, given its role in the environment.\n- Check if the host is directly exposed to the internet.\n- Check whether privileged accounts accessed the host shortly after the modification.\n- Review network events within a short timespan of this alert for incoming RDP connection attempts.\n\n### False positive analysis\n\n- The `netsh.exe` utility can be used legitimately. Check whether the user should be performing this kind of activity, whether the user is aware of it, whether RDP should be open, and whether the action exposes the environment to unnecessary risks.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If RDP is needed, make sure to secure it:\n - Allowlist RDP traffic to specific trusted hosts.\n - Restrict RDP logins to authorized non-administrator accounts, where possible.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.004", + "name": "Disable or Modify System Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/004/" + } + ] + } + ] + } + ], + "id": "4292aa88-889d-40b1-a097-0092628207d5", + "rule_id": "074464f9-f30d-4029-8c03-0ed237fffec7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"netsh.exe\" or process.pe.original_file_name == \"netsh.exe\") and\n process.args : (\"localport=3389\", \"RemoteDesktop\", \"group=\\\"remote desktop\\\"\") and\n process.args : (\"action=allow\", \"enable=Yes\", \"enable\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Google Drive Ownership Transferred via Google Workspace", + "description": "Drive and Docs is a Google Workspace service that allows users to leverage Google Drive and Google Docs. Access to files is based on inherited permissions from the child organizational unit the user belongs to which is scoped by administrators. Typically if a user is removed, their files can be transferred to another user by the administrator. This service can also be abused by adversaries to transfer files to an adversary account for potential exfiltration.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Drive Ownership Transferred via Google Workspace\n\nGoogle Drive is a cloud storage service that allows users to store and access files. It is available to users with a Google Workspace account.\n\nGoogle Workspace administrators consider users' roles and organizational units when assigning permissions to files or shared drives. Owners of sensitive files and folders can grant permissions to users who make internal or external access requests. Adversaries abuse this trust system by accessing Google Drive resources with improperly scoped permissions and shared settings. Distributing phishing emails is another common approach to sharing malicious Google Drive documents. With this approach, adversaries aim to inherit the recipient's Google Workspace privileges when an external entity grants ownership.\n\nThis rule identifies when the ownership of a shared drive within a Google Workspace organization is transferred to another internal user.\n\n#### Possible investigation steps\n\n- From the admin console, review admin logs for involved user accounts. To find admin logs, go to `Security > Reporting > Audit and investigation > Admin log events`.\n- Determine if involved user accounts are active. To view user activity, go to `Directory > Users`.\n- Check if the involved user accounts were recently disabled, then re-enabled.\n- Review involved user accounts for potentially misconfigured permissions or roles.\n- Review the involved shared drive or files and related policies to determine if this action was expected and appropriate.\n- If a shared drive, access requirements based on Organizational Units in `Apps > Google Workspace > Drive and Docs > Manage shared drives`.\n- Triage potentially related alerts based on the users involved. To find alerts, go to `Security > Alerts`.\n\n### False positive analysis\n\n- Transferring drives requires Google Workspace administration permissions related to Google Drive. Check if this action was planned/expected from the requester and is appropriately targeting the correct receiver.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 106, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Tactic: Collection", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Administrators may transfer file ownership during employee leave or absence to ensure continued operations by a new or existing employee." + ], + "references": [ + "https://support.google.com/a/answer/1247799?hl=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1074", + "name": "Data Staged", + "reference": "https://attack.mitre.org/techniques/T1074/", + "subtechnique": [ + { + "id": "T1074.002", + "name": "Remote Data Staging", + "reference": "https://attack.mitre.org/techniques/T1074/002/" + } + ] + } + ] + } + ], + "id": "fa7680c8-84c0-493a-9259-c64759a9fa46", + "rule_id": "07b5f85a-240f-11ed-b3d9-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.admin.application.name", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:\"google_workspace.admin\" and event.action:\"CREATE_DATA_TRANSFER_REQUEST\"\n and event.category:\"iam\" and google_workspace.admin.application.name:Drive*\n", + "language": "kuery" + }, + { + "name": "Suspicious Browser Child Process", + "description": "Identifies the execution of a suspicious browser child process. Adversaries may gain access to a system through a user visiting a website over the normal course of browsing. With this technique, the user's web browser is typically targeted for exploitation.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://objective-see.com/blog/blog_0x43.html", + "https://fr.slideshare.net/codeblue_jp/cb19-recent-apt-attack-on-crypto-exchange-employees-by-heungsoo-kang" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1203", + "name": "Exploitation for Client Execution", + "reference": "https://attack.mitre.org/techniques/T1203/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1189", + "name": "Drive-by Compromise", + "reference": "https://attack.mitre.org/techniques/T1189/" + } + ] + } + ], + "id": "6437898e-9e1b-4e4e-8613-97dccbc43f54", + "rule_id": "080bc66a-5d56-4d1f-8071-817671716db9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.parent.name : (\"Google Chrome\", \"Google Chrome Helper*\", \"firefox\", \"Opera\", \"Safari\", \"com.apple.WebKit.WebContent\", \"Microsoft Edge\") and\n process.name : (\"sh\", \"bash\", \"dash\", \"ksh\", \"tcsh\", \"zsh\", \"curl\", \"wget\", \"python*\", \"perl*\", \"php*\", \"osascript\", \"pwsh\") and\n process.command_line != null and\n not process.command_line : \"*/Library/Application Support/Microsoft/MAU*/Microsoft AutoUpdate.app/Contents/MacOS/msupdate*\" and\n not process.args :\n (\n \"hw.model\",\n \"IOPlatformExpertDevice\",\n \"/Volumes/Google Chrome/Google Chrome.app/Contents/Frameworks/*/Resources/install.sh\",\n \"--defaults-torrc\",\n \"*Chrome.app\",\n \"Framework.framework/Versions/*/Resources/keystone_promote_preflight.sh\",\n \"/Users/*/Library/Application Support/Google/Chrome/recovery/*/ChromeRecovery\",\n \"$DISPLAY\",\n \"*GIO_LAUNCHED_DESKTOP_FILE_PID=$$*\",\n \"/opt/homebrew/*\",\n \"/usr/local/*brew*\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Launch Agent Creation or Modification and Immediate Loading", + "description": "An adversary can establish persistence by installing a new launch agent that executes at login by using launchd or launchctl to load a plist into the appropriate directories.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trusted applications persisting via LaunchAgent" + ], + "references": [ + "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.001", + "name": "Launch Agent", + "reference": "https://attack.mitre.org/techniques/T1543/001/" + } + ] + } + ] + } + ], + "id": "48e033fe-a75f-49a1-b206-ae6f5cbbf76a", + "rule_id": "082e3f8c-6f80-485c-91eb-5b112cb79b28", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=1m\n [file where host.os.type == \"macos\" and event.type != \"deletion\" and\n file.path : (\"/System/Library/LaunchAgents/*\", \"/Library/LaunchAgents/*\", \"/Users/*/Library/LaunchAgents/*\")\n ]\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name == \"launchctl\" and process.args == \"load\"]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Hidden Child Process of Launchd", + "description": "Identifies the execution of a launchd child process with a hidden file. An adversary can establish persistence by installing a new logon item, launch agent, or daemon that executes upon login.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://objective-see.com/blog/blog_0x61.html", + "https://www.intezer.com/blog/research/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/", + "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.001", + "name": "Launch Agent", + "reference": "https://attack.mitre.org/techniques/T1543/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1564", + "name": "Hide Artifacts", + "reference": "https://attack.mitre.org/techniques/T1564/", + "subtechnique": [ + { + "id": "T1564.001", + "name": "Hidden Files and Directories", + "reference": "https://attack.mitre.org/techniques/T1564/001/" + } + ] + } + ] + } + ], + "id": "73dd6825-eab9-4f5a-89ca-5e31b300d58d", + "rule_id": "083fa162-e790-4d85-9aeb-4fea04188adb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:.* and process.parent.executable:/sbin/launchd\n", + "language": "kuery" + }, + { + "name": "Windows Account or Group Discovery", + "description": "This rule identifies the execution of commands that enumerates account or group information. Adversaries may use built-in applications to get a listing of local system or domain accounts and groups.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1069", + "name": "Permission Groups Discovery", + "reference": "https://attack.mitre.org/techniques/T1069/", + "subtechnique": [ + { + "id": "T1069.001", + "name": "Local Groups", + "reference": "https://attack.mitre.org/techniques/T1069/001/" + }, + { + "id": "T1069.002", + "name": "Domain Groups", + "reference": "https://attack.mitre.org/techniques/T1069/002/" + } + ] + }, + { + "id": "T1201", + "name": "Password Policy Discovery", + "reference": "https://attack.mitre.org/techniques/T1201/" + }, + { + "id": "T1087", + "name": "Account Discovery", + "reference": "https://attack.mitre.org/techniques/T1087/", + "subtechnique": [ + { + "id": "T1087.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1087/001/" + }, + { + "id": "T1087.002", + "name": "Domain Account", + "reference": "https://attack.mitre.org/techniques/T1087/002/" + } + ] + } + ] + } + ], + "id": "dd4c0f64-0da7-4951-98df-4367f98ca15d", + "rule_id": "089db1af-740d-4d84-9a5b-babd6de143b0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (\n (\n (process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or\n (\n (process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and\n not process.parent.name : \"net.exe\"\n )\n ) and process.args : (\"accounts\", \"group\", \"user\", \"localgroup\") and not process.args : \"/add\"\n ) or\n (process.name:(\"dsquery.exe\", \"dsget.exe\") and process.args:(\"*members*\", \"user\")) or\n (process.name:\"dsquery.exe\" and process.args:\"*filter*\") or\n process.name:(\"quser.exe\", \"qwinsta.exe\", \"PsGetSID.exe\", \"PsLoggedOn.exe\", \"LogonSessions.exe\", \"whoami.exe\") or\n (\n process.name: \"cmd.exe\" and\n (\n process.args : \"echo\" and process.args : (\n \"%username%\", \"%userdomain%\", \"%userdnsdomain%\",\n \"%userdomain_roamingprofile%\", \"%userprofile%\",\n \"%homepath%\", \"%localappdata%\", \"%appdata%\"\n ) or\n process.args : \"set\"\n )\n )\n) and not process.parent.args: \"C:\\\\Program Files (x86)\\\\Microsoft Intune Management Extension\\\\Content\\\\DetectionScripts\\\\*.ps1\"\nand not process.parent.name : \"LTSVC.exe\" and not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Creation of Hidden Launch Agent or Daemon", + "description": "Identifies the creation of a hidden launch agent or daemon. An adversary may establish persistence by installing a new launch agent or daemon which executes at login.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.001", + "name": "Launch Agent", + "reference": "https://attack.mitre.org/techniques/T1543/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1564", + "name": "Hide Artifacts", + "reference": "https://attack.mitre.org/techniques/T1564/", + "subtechnique": [ + { + "id": "T1564.001", + "name": "Hidden Files and Directories", + "reference": "https://attack.mitre.org/techniques/T1564/001/" + } + ] + } + ] + } + ], + "id": "c2800e86-8d46-4305-94da-025fe3e3662e", + "rule_id": "092b068f-84ac-485d-8a55-7dd9e006715f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"macos\" and event.type != \"deletion\" and\n file.path :\n (\n \"/System/Library/LaunchAgents/.*.plist\",\n \"/Library/LaunchAgents/.*.plist\",\n \"/Users/*/Library/LaunchAgents/.*.plist\",\n \"/System/Library/LaunchDaemons/.*.plist\",\n \"/Library/LaunchDaemons/.*.plist\"\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "PowerShell Script with Remote Execution Capabilities via WinRM", + "description": "Identifies the use of Cmdlets and methods related to remote execution activities using WinRM. Attackers can abuse WinRM to perform lateral movement using built-in tools.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "building_block_type": "default", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Execution", + "Data Source: PowerShell Logs", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://attack.mitre.org/techniques/T1021/006/", + "https://github.com/cobbr/SharpSploit/blob/master/SharpSploit/LateralMovement/PowerShellRemoting.cs", + "https://github.com/BC-SECURITY/Empire/blob/main/empire/server/modules/powershell/lateral_movement/invoke_psremoting.py" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.006", + "name": "Windows Remote Management", + "reference": "https://attack.mitre.org/techniques/T1021/006/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "aa23a745-ea56-4d22-9ae7-6e8a713da2f2", + "rule_id": "0abf0c5b-62dd-48d2-ac4e-6b43fe3a6e83", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.directory", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n (\"Invoke-WmiMethod\" or \"Invoke-Command\" or \"Enter-PSSession\") and \"ComputerName\"\n ) and\n not user.id : \"S-1-5-18\" and\n not file.directory : (\n \"C:\\\\Program Files\\\\LogicMonitor\\\\Agent\\\\tmp\" or\n ?\\:\\\\\\\\Program?Files\\\\\\\\Microsoft\\\\\\\\Exchange?Server\\\\\\\\*\\\\\\\\bin or\n ?\\:\\\\\\\\Logicmonitor\\\\\\\\tmp* or\n ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules\\\\\\\\dbatools\\\\\\\\* or\n ?\\:\\\\\\\\ExchangeServer\\\\\\\\bin*\n )\n", + "language": "kuery" + }, + { + "name": "User account exposed to Kerberoasting", + "description": "Detects when a user account has the servicePrincipalName attribute modified. Attackers can abuse write privileges over a user to configure Service Principle Names (SPNs) so that they can perform Kerberoasting. Administrators can also configure this for legitimate purposes, exposing the account to Kerberoasting.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating User account exposed to Kerberoasting\n\nService Principal Names (SPNs) are names by which Kerberos clients uniquely identify service instances for Kerberos target computers.\n\nBy default, only computer accounts have SPNs, which creates no significant risk, since machine accounts have a default domain policy that rotates their passwords every 30 days, and the password is composed of 120 random characters, making them invulnerable to Kerberoasting.\n\nA user account with an SPN assigned is considered a service account, and is accessible to the entire domain. If any user in the directory requests a ticket-granting service (TGS), the domain controller will encrypt it with the secret key of the account executing the service. An attacker can potentially perform a Kerberoasting attack with this information, as the human-defined password is likely to be less complex.\n\nFor scenarios where SPNs cannot be avoided on user accounts, Microsoft provides the Group Managed Service Accounts (gMSA) feature, which ensures that account passwords are robust and changed regularly and automatically. More information can be found [here](https://docs.microsoft.com/en-us/windows-server/security/group-managed-service-accounts/group-managed-service-accounts-overview).\n\nAttackers can also perform \"Targeted Kerberoasting\", which consists of adding fake SPNs to user accounts that they have write privileges to, making them potentially vulnerable to Kerberoasting.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate if the target account is a member of privileged groups (Domain Admins, Enterprise Admins, etc.).\n- Investigate if tickets have been requested for the target account.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- The use of user accounts as service accounts is a bad security practice and should not be allowed in the domain. The security team should map and monitor any potential benign true positive (B-TP), especially if the account is privileged. Domain Administrators that define this kind of setting can put the domain at risk as user accounts don't have the same security standards as computer accounts (which have long, complex, random passwords that change frequently), exposing them to credential cracking attacks (Kerberoasting, brute force, etc.).\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services. Prioritize privileged accounts.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Active Directory", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.thehacker.recipes/ad/movement/access-controls/targeted-kerberoasting", + "https://www.qomplx.com/qomplx-knowledge-kerberoasting-attacks-explained/", + "https://www.thehacker.recipes/ad/movement/kerberos/kerberoast", + "https://attack.stealthbits.com/cracking-kerberos-tgs-tickets-using-kerberoasting", + "https://adsecurity.org/?p=280", + "https://github.com/OTRF/Set-AuditRule" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/", + "subtechnique": [ + { + "id": "T1558.003", + "name": "Kerberoasting", + "reference": "https://attack.mitre.org/techniques/T1558/003/" + } + ] + } + ] + } + ], + "id": "4cc5724e-8b3d-4dc0-837e-ef149d333621", + "rule_id": "0b2f3da5-b5ec-47d1-908b-6ebb74814289", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.AttributeLDAPDisplayName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.ObjectClass", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'Audit Directory Service Changes' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```\n\nThe above policy does not cover User objects, so set up an AuditRule using https://github.com/OTRF/Set-AuditRule.\nAs this specifies the servicePrincipalName Attribute GUID, it is expected to be low noise.\n\n```\nSet-AuditRule -AdObjectPath 'AD:\\CN=Users,DC=Domain,DC=com' -WellKnownSidType WorldSid -Rights WriteProperty -InheritanceFlags Children -AttributeGUID f3a64788-5306-11d1-a9c5-0000f80367c1 -AuditFlags Success\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.action:\"Directory Service Changes\" and event.code:5136 and\n winlog.event_data.ObjectClass:\"user\" and\n winlog.event_data.AttributeLDAPDisplayName:\"servicePrincipalName\"\n", + "language": "kuery" + }, + { + "name": "Potential Shell via Wildcard Injection Detected", + "description": "This rule monitors for the execution of a set of linux binaries, that are potentially vulnerable to wildcard injection, with suspicious command line flags followed by a shell spawn event. Linux wildcard injection is a type of security vulnerability where attackers manipulate commands or input containing wildcards (e.g., *, ?, []) to execute unintended operations or access sensitive data by tricking the system into interpreting the wildcard characters in unexpected ways.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.exploit-db.com/papers/33930" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "53a12a4c-8215-40e7-8a31-e3097db55d90", + "rule_id": "0b803267-74c5-444d-ae29-32b5db2d562a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and (\n (process.name == \"tar\" and process.args : \"--checkpoint=*\" and process.args : \"--checkpoint-action=*\") or\n (process.name == \"rsync\" and process.args : \"-e*\") or\n (process.name == \"zip\" and process.args == \"--unzip-command\") )] by process.entity_id\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.parent.name : (\"tar\", \"rsync\", \"zip\") and \n process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")] by process.parent.entity_id\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Threat Intel IP Address Indicator Match", + "description": "This rule is triggered when an IP address indicator from the Threat Intel Filebeat module or integrations has a match against a network event.", + "risk_score": 99, + "severity": "critical", + "timeline_id": "495ad7a7-316e-4544-8a0f-9c098daee76e", + "timeline_title": "Generic Threat Match Timeline", + "license": "Elastic License v2", + "note": "## Triage and Analysis\n\n### Investigating Threat Intel IP Address Indicator Match\n\nThreat Intel indicator match rules allow matching from a local observation, such as an endpoint event that records a file hash with an entry of a file hash stored within the Threat Intel integrations index. \n\nMatches are based on threat intelligence data that's been ingested during the last 30 days. Some integrations don't place expiration dates on their threat indicators, so we strongly recommend validating ingested threat indicators and reviewing match results. When reviewing match results, check associated activity to determine whether the event requires additional investigation.\n\nThis rule is triggered when an IP address indicator from the Threat Intel Filebeat module or a threat intelligence integration matches against a network event.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Gain context about the field that matched the local observation so you can understand the nature of the connection. This information can be found in the `threat.indicator.matched.field` field.\n- Investigate the IP address, which can be found in the `threat.indicator.matched.atomic` field:\n - Check the reputation of the IP address in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc. \n - Execute a reverse DNS lookup to retrieve hostnames associated with the given IP address.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Identify the process responsible for the connection, and investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Retrieve the involved process executable and examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Using the data collected through the analysis, scope users targeted and other machines infected in the environment.\n\n### False Positive Analysis\n\n- When a match is found, it's important to consider the indicator's initial release date. Threat intelligence is useful for augmenting existing security processes but can quickly become outdated. In other words, some threat intelligence only represents a specific set of activity observed at a specific time. For example, an IP address may have hosted malware observed in a Dridex campaign months ago, but it's possible that IP has been remediated and no longer represents any threat.\n- False positives might occur after large and publicly written campaigns if curious employees interact with attacker infrastructure.\n- Some feeds may include internal or known benign addresses by mistake (e.g., 8.8.8.8, google.com, 127.0.0.1, etc.). Make sure you understand how blocking a specific domain or address might impact the organization or normal system functioning.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nThis rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an [Elastic Agent integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#agent-ti-integration), the [Threat Intel module](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#ti-mod-integration), or a [custom integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#custom-ti-integration).\n\nMore information can be found [here](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html).", + "version": 3, + "tags": [ + "OS: Windows", + "Data Source: Elastic Endgame", + "Rule Type: Indicator Match" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "1h", + "from": "now-65m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-threatintel.html", + "https://www.elastic.co/guide/en/security/master/es-threat-intel-integrations.html", + "https://www.elastic.co/security/tip" + ], + "max_signals": 100, + "threat": [], + "id": "5701d17f-50ae-4f73-80a7-b6b252ae6b15", + "rule_id": "0c41e478-5263-4c69-8f9e-7dfd2c22da64", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "This rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an Elastic Agent integration, the Threat Intel module, or a custom integration.\n\nMore information can be found here.", + "type": "threat_match", + "query": "source.ip:* or destination.ip:*\n", + "threat_query": "@timestamp >= \"now-30d/d\" and event.module:(threatintel or ti_*) and threat.indicator.ip:* and not labels.is_ioc_transform_source:\"true\"", + "threat_mapping": [ + { + "entries": [ + { + "field": "source.ip", + "type": "mapping", + "value": "threat.indicator.ip" + } + ] + }, + { + "entries": [ + { + "field": "destination.ip", + "type": "mapping", + "value": "threat.indicator.ip" + } + ] + } + ], + "threat_index": [ + "filebeat-*", + "logs-ti_*" + ], + "index": [ + "auditbeat-*", + "endgame-*", + "filebeat-*", + "logs-*", + "packetbeat-*", + "winlogbeat-*" + ], + "threat_filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.category", + "negate": false, + "params": { + "query": "threat" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.category": "threat" + } + } + }, + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.kind", + "negate": false, + "params": { + "query": "enrichment" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.kind": "enrichment" + } + } + }, + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.type", + "negate": false, + "params": { + "query": "indicator" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.type": "indicator" + } + } + } + ], + "threat_indicator_path": "threat.indicator", + "threat_language": "kuery", + "language": "kuery" + }, + { + "name": "Peripheral Device Discovery", + "description": "Identifies use of the Windows file system utility (fsutil.exe) to gather information about attached peripheral devices and components connected to a computer system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Peripheral Device Discovery\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `fsutil` utility with the `fsinfo` subcommand to enumerate drives attached to the computer, which can be used to identify secondary drives used for backups, mapped network drives, and removable media. These devices can contain valuable information for attackers.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Determine whether this activity was followed by suspicious file access/copy operations or uploads to file storage services.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1120", + "name": "Peripheral Device Discovery", + "reference": "https://attack.mitre.org/techniques/T1120/" + } + ] + } + ], + "id": "91c1c234-6e36-4f09-928d-32b72d5ab88f", + "rule_id": "0c7ca5c2-728d-4ad9-b1c5-bbba83ecb1f4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"fsutil.exe\" or process.pe.original_file_name == \"fsutil.exe\") and\n process.args : \"fsinfo\" and process.args : \"drives\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Privilege Escalation via Root Crontab File Modification", + "description": "Identifies modifications to the root crontab file. Adversaries may overwrite this file to gain code execution with root privileges by exploiting privileged file write or move related vulnerabilities.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://phoenhex.re/2017-06-09/pwn2own-diskarbitrationd-privesc", + "https://www.exploit-db.com/exploits/42146" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.003", + "name": "Cron", + "reference": "https://attack.mitre.org/techniques/T1053/003/" + } + ] + } + ] + } + ], + "id": "f8b07bbb-39f0-4a0e-a396-1e904af8513c", + "rule_id": "0ff84c42-873d-41a2-a4ed-08d74d352d01", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:file and host.os.type:macos and not event.type:deletion and\n file.path:/private/var/at/tabs/root and not process.executable:/usr/bin/crontab\n", + "language": "kuery" + }, + { + "name": "WebProxy Settings Modification", + "description": "Identifies the use of the built-in networksetup command to configure webproxy settings. This may indicate an attempt to hijack web browser traffic for credential access via traffic sniffing or redirection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate WebProxy Settings Modification" + ], + "references": [ + "https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/", + "https://objectivebythesea.com/v2/talks/OBTS_v2_Zohar.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1539", + "name": "Steal Web Session Cookie", + "reference": "https://attack.mitre.org/techniques/T1539/" + } + ] + } + ], + "id": "a0056230-cb94-4cd3-a7a1-8122874674f5", + "rule_id": "10a500bb-a28f-418e-ba29-ca4c8d1a9f2f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:start and\n process.name : networksetup and process.args : ((\"-setwebproxy\" or \"-setsecurewebproxy\" or \"-setautoproxyurl\") and not (Bluetooth or off)) and\n not process.parent.executable : (\"/Library/PrivilegedHelperTools/com.80pct.FreedomHelper\" or\n \"/Applications/Fiddler Everywhere.app/Contents/Resources/app/out/WebServer/Fiddler.WebUi\" or\n \"/usr/libexec/xpcproxy\")\n", + "language": "kuery" + }, + { + "name": "Abnormally Large DNS Response", + "description": "Specially crafted DNS requests can manipulate a known overflow vulnerability in some Windows DNS servers, resulting in Remote Code Execution (RCE) or a Denial of Service (DoS) from crashing the service.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Abnormally Large DNS Response\n\nDetection alerts from this rule indicate possible anomalous activity around large byte DNS responses from a Windows DNS server. This detection rule was created based on activity represented in exploitation of vulnerability (CVE-2020-1350) also known as [SigRed](https://www.elastic.co/blog/detection-rules-for-sigred-vulnerability) during July 2020.\n\n#### Possible investigation steps\n\n- This specific rule is sourced from network log activity such as DNS or network level data. It's important to validate the source of the incoming traffic and determine if this activity has been observed previously within an environment.\n- Activity can be further investigated and validated by reviewing any associated Intrusion Detection Signatures (IDS) alerts.\n- Further examination can include a review of the `dns.question_type` network fieldset with a protocol analyzer, such as Zeek, Packetbeat, or Suricata, for `SIG` or `RRSIG` data.\n- Validate the patch level and OS of the targeted DNS server to validate the observed activity was not large-scale internet vulnerability scanning.\n- Validate that the source of the network activity was not from an authorized vulnerability scan or compromise assessment.\n\n#### False positive analysis\n\n- Based on this rule, which looks for a threshold of 60k bytes, it is possible for activity to be generated under 65k bytes and related to legitimate behavior. In packet capture files received by the [SANS Internet Storm Center](https://isc.sans.edu/forums/diary/PATCH+NOW+SIGRed+CVE20201350+Microsoft+DNS+Server+Vulnerability/26356/), byte responses were all observed as greater than 65k bytes.\n- This activity can be triggered by compliance/vulnerability scanning or compromise assessment; it's important to determine the source of the activity and potentially allowlist the source host.\n\n### Related rules\n\n- Unusual Child Process of dns.exe - 8c37dc0e-e3ac-4c97-8aa0-cf6a9122de45\n- Unusual File Modification by dns.exe - c7ce36c0-32ff-4f9a-bfc2-dcb242bf99f9\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Ensure that you have deployed the latest Microsoft [Security Update](https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-1350) (Monthly Rollup or Security Only) and restarted the patched machines. If unable to patch immediately, Microsoft [released](https://support.microsoft.com/en-us/help/4569509/windows-dns-server-remote-code-execution-vulnerability) a registry-based workaround that doesn’t require a restart. This can be used as a temporary solution before the patch is applied.\n- Maintain backups of your critical systems to aid in quick recovery.\n- Perform routine vulnerability scans of your systems, monitor [CISA advisories](https://us-cert.cisa.gov/ncas/current-activity) and patch identified vulnerabilities.\n- If you observe a true positive, implement a remediation plan and monitor host-based artifacts for additional post-exploitation behavior.\n", + "version": 105, + "tags": [ + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Resources: Investigation Guide", + "Use Case: Vulnerability" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Environments that leverage DNS responses over 60k bytes will result in false positives - if this traffic is predictable and expected, it should be filtered out. Additionally, this detection rule could be triggered by an authorized vulnerability scan or compromise assessment." + ], + "references": [ + "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/", + "https://msrc-blog.microsoft.com/2020/07/14/july-2020-security-update-cve-2020-1350-vulnerability-in-windows-domain-name-system-dns-server/", + "https://github.com/maxpl0it/CVE-2020-1350-DoS", + "https://www.elastic.co/security-labs/detection-rules-for-sigred-vulnerability" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "5b90adbf-5b4d-4340-bca0-e9ca66156cdd", + "rule_id": "11013227-0301-4a8c-b150-4db924484475", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.bytes", + "type": "long", + "ecs": true + }, + { + "name": "type", + "type": "keyword", + "ecs": false + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.dns or (event.category: (network or network_traffic) and destination.port: 53)) and\n (event.dataset:zeek.dns or type:dns or event.type:connection) and network.bytes > 60000\n", + "language": "kuery" + }, + { + "name": "Persistence via Scheduled Job Creation", + "description": "A job can be used to schedule programs or scripts to be executed at a specified date and time. Adversaries may abuse task scheduling functionality to facilitate initial or recurring execution of malicious code.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate scheduled jobs may be created during installation of new software." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "387a6799-14f7-468b-867d-263822dd7beb", + "rule_id": "1327384f-00f3-44d5-9a8c-2373ba071e92", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.path : \"?:\\\\Windows\\\\Tasks\\\\*\" and file.extension : \"job\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Rare User Logon", + "description": "A machine learning job found an unusual user name in the authentication logs. An unusual user name is one way of detecting credentialed access by means of a new or dormant user account. An inactive user account (because the user has left the organization) that becomes active may be due to credentialed access using a compromised account password. Threat actors will sometimes also create new users as a means of persisting in a compromised web application.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Rare User Logon\n\nThis rule uses a machine learning job to detect an unusual user name in authentication logs, which could detect new accounts created for persistence.\n\n#### Possible investigation steps\n\n- Check if the user was newly created and if the company policies were followed.\n - Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the involved users during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Accounts that are used for specific purposes — and therefore not normally active — may trigger the alert.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 104, + "tags": [ + "Use Case: Identity and Access Audit", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Initial Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "User accounts that are rarely active, such as a site reliability engineer (SRE) or developer logging into a production server for troubleshooting, may trigger this alert. Under some conditions, a newly created user account may briefly trigger this alert while the model is learning." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + }, + { + "id": "T1078.003", + "name": "Local Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/003/" + } + ] + } + ] + } + ], + "id": "2377b4df-7374-41ea-8a85-81d68c368cd4", + "rule_id": "138c5dd5-838b-446e-b1ac-c995c7f8108a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "auth_rare_user" + }, + { + "name": "Virtual Private Network Connection Attempt", + "description": "Identifies the execution of macOS built-in commands to connect to an existing Virtual Private Network (VPN). Adversaries may use VPN connections to laterally move and control remote systems on a network.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/rapid7/metasploit-framework/blob/master/modules/post/osx/manage/vpn.rb", + "https://www.unix.com/man-page/osx/8/networksetup/", + "https://superuser.com/questions/358513/start-configured-vpn-from-command-line-osx" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + } + ], + "id": "59d41551-fd37-4154-a311-24264594a794", + "rule_id": "15dacaa0-5b90-466b-acab-63435a59701a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n (\n (process.name : \"networksetup\" and process.args : \"-connectpppoeservice\") or\n (process.name : \"scutil\" and process.args : \"--nc\" and process.args : \"start\") or\n (process.name : \"osascript\" and process.command_line : \"osascript*set VPN to service*\")\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Kerberos Attack via Bifrost", + "description": "Identifies use of Bifrost, a known macOS Kerberos pentesting tool, which can be used to dump cached Kerberos tickets or attempt unauthorized authentication techniques such as pass-the-ticket/hash and kerberoasting.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/its-a-feature/bifrost" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1550", + "name": "Use Alternate Authentication Material", + "reference": "https://attack.mitre.org/techniques/T1550/", + "subtechnique": [ + { + "id": "T1550.003", + "name": "Pass the Ticket", + "reference": "https://attack.mitre.org/techniques/T1550/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/", + "subtechnique": [ + { + "id": "T1558.003", + "name": "Kerberoasting", + "reference": "https://attack.mitre.org/techniques/T1558/003/" + } + ] + } + ] + } + ], + "id": "c8fbbba4-26e0-45f9-9d56-f4fd4f4a6ec9", + "rule_id": "16904215-2c95-4ac8-bf5c-12354e047192", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:start and\n process.args:(\"-action\" and (\"-kerberoast\" or askhash or asktgs or asktgt or s4u or (\"-ticket\" and ptt) or (dump and (tickets or keytab))))\n", + "language": "kuery" + }, + { + "name": "Startup/Logon Script added to Group Policy Object", + "description": "Detects the modification of Group Policy Objects (GPO) to add a startup/logon script to users or computer objects.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Startup/Logon Script added to Group Policy Object\n\nGroup Policy Objects (GPOs) can be used by attackers to instruct arbitrarily large groups of clients to execute specified commands at startup, logon, shutdown, and logoff. This is done by creating or modifying the `scripts.ini` or `psscripts.ini` files. The scripts are stored in the following paths:\n - `\\Machine\\Scripts\\`\n - `\\User\\Scripts\\`\n\n#### Possible investigation steps\n\n- This attack abuses a legitimate mechanism of Active Directory, so it is important to determine whether the activity is legitimate and the administrator is authorized to perform this operation.\n- Retrieve the contents of the `ScheduledTasks.xml` file, and check the `` and `` XML tags for any potentially malicious commands or binaries.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Scope which objects may be compromised by retrieving information about which objects are controlled by the GPO.\n\n### False positive analysis\n\n- Verify if the execution is legitimately authorized and executed under a change management process.\n\n### Related rules\n\n- Group Policy Abuse for Privilege Addition - b9554892-5e0e-424b-83a0-5aef95aa43bf\n- Scheduled Task Execution at Scale via GPO - 15a8ba77-1c13-4274-88fe-6bd14133861e\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- The investigation and containment must be performed in every computer controlled by the GPO, where necessary.\n- Remove the script from the GPO.\n- Check if other GPOs have suspicious scripts attached.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Active Directory", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate Administrative Activity" + ], + "references": [ + "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0025_windows_audit_directory_service_changes.md", + "https://github.com/atc-project/atc-data/blob/f2bbb51ecf68e2c9f488e3c70dcdd3df51d2a46b/docs/Logging_Policies/LP_0029_windows_audit_detailed_file_share.md", + "https://labs.f-secure.com/tools/sharpgpoabuse" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1484", + "name": "Domain Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1484/", + "subtechnique": [ + { + "id": "T1484.001", + "name": "Group Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1484/001/" + } + ] + }, + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/" + } + ] + } + ], + "id": "650df61b-da2e-4e02-b4ab-3e2df5deb860", + "rule_id": "16fac1a1-21ee-4ca6-b720-458e3855d046", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "message", + "type": "match_only_text", + "ecs": true + }, + { + "name": "winlog.event_data.AccessList", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.AttributeLDAPDisplayName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.AttributeValue", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.RelativeTargetName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.ShareName", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'Audit Detailed File Share' audit policy must be configured (Success Failure).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nObject Access >\nAudit Detailed File Share (Success,Failure)\n```\n\nThe 'Audit Directory Service Changes' audit policy must be configured (Success Failure).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "(\n event.code:5136 and winlog.event_data.AttributeLDAPDisplayName:(gPCMachineExtensionNames or gPCUserExtensionNames) and\n winlog.event_data.AttributeValue:(*42B5FAAE-6536-11D2-AE5A-0000F87571E3* and\n (*40B66650-4972-11D1-A7CA-0000F87571E3* or *40B6664F-4972-11D1-A7CA-0000F87571E3*))\n)\nor\n(\n event.code:5145 and winlog.event_data.ShareName:\\\\\\\\*\\\\SYSVOL and\n winlog.event_data.RelativeTargetName:(*\\\\scripts.ini or *\\\\psscripts.ini) and\n (message:WriteData or winlog.event_data.AccessList:*%%4417*)\n)\n", + "language": "kuery" + }, + { + "name": "Unusual Windows Username", + "description": "A machine learning job detected activity for a username that is not normally active, which can indicate unauthorized changes, activity by unauthorized users, lateral movement, or compromised credentials. In many organizations, new usernames are not often created apart from specific types of system activities, such as creating new accounts for new employees. These user accounts quickly become active and routine. Events from rarely used usernames can point to suspicious activity. Additionally, automated Linux fleets tend to see activity from rarely used usernames only when personnel log in to make authorized or unauthorized changes, or threat actors have acquired credentials and log in for malicious purposes. Unusual usernames can also indicate pivoting, where compromised credentials are used to try and move laterally from one host to another.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating an Unusual Windows User\nDetection alerts from this rule indicate activity for a Windows user name that is rare and unusual. Here are some possible avenues of investigation:\n- Consider the user as identified by the username field. Is this program part of an expected workflow for the user who ran this program on this host? Could this be related to occasional troubleshooting or support activity?\n- Examine the history of user activity. If this user only manifested recently, it might be a service account for a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business process.\n- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks that the user is performing.\n- Consider the same for the parent process. If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon user activity can be due to an administrator or help desk technician logging onto a workstation or server in order to perform manual troubleshooting or reconfiguration." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + }, + { + "id": "T1078.003", + "name": "Local Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/003/" + } + ] + } + ] + } + ], + "id": "518f60f5-03ed-4062-bdae-319f203ae25b", + "rule_id": "1781d055-5c66-4adf-9c59-fc0fa58336a5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_windows_anomalous_user_name" + ] + }, + { + "name": "Unusual Windows Service", + "description": "A machine learning job detected an unusual Windows service, This can indicate execution of unauthorized services, malware, or persistence mechanisms. In corporate Windows environments, hosts do not generally run many rare or unique services. This job helps detect malware and persistence mechanisms that have been installed and run as a service.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + } + ], + "id": "9ce1c5bc-e4b8-4794-b05c-38b982175a83", + "rule_id": "1781d055-5c66-4adf-9c71-fc0fa58338c7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_windows_anomalous_service" + ] + }, + { + "name": "Suspicious Powershell Script", + "description": "A machine learning job detected a PowerShell script with unusual data characteristics, such as obfuscation, that may be a characteristic of malicious PowerShell script text blocks.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Certain kinds of security testing may trigger this alert. PowerShell scripts that use high levels of obfuscation or have unusual script block payloads may trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "509b8bcd-bddb-47d4-b3cd-ca8e3c33ad0c", + "rule_id": "1781d055-5c66-4adf-9d60-fc0fa58337b6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_windows_anomalous_script" + ] + }, + { + "name": "Unusual Windows User Privilege Elevation Activity", + "description": "A machine learning job detected an unusual user context switch, using the runas command or similar techniques, which can indicate account takeover or privilege escalation using compromised accounts. Privilege elevation using tools like runas are more commonly used by domain and network administrators than by regular Windows users.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon user privilege elevation activity can be due to an administrator, help desk technician, or a user performing manual troubleshooting or reconfiguration." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [] + } + ], + "id": "783c5321-5a1f-48b5-bffb-06360b4c002b", + "rule_id": "1781d055-5c66-4adf-9d82-fc0fa58449c8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_windows_rare_user_runas_event" + ] + }, + { + "name": "Unusual Windows Remote User", + "description": "A machine learning job detected an unusual remote desktop protocol (RDP) username, which can indicate account takeover or credentialed persistence using compromised accounts. RDP attacks, such as BlueKeep, also tend to use unusual usernames.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating an Unusual Windows User\nDetection alerts from this rule indicate activity for a rare and unusual Windows RDP (remote desktop) user. Here are some possible avenues of investigation:\n- Consider the user as identified by the username field. Is the user part of a group who normally logs into Windows hosts using RDP (remote desktop protocol)? Is this logon activity part of an expected workflow for the user?\n- Consider the source of the login. If the source is remote, could this be related to occasional troubleshooting or support activity by a vendor or an employee working remotely?", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon username activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "4d22f38c-3d35-4b9a-9a2d-94d26d6eeb2b", + "rule_id": "1781d055-5c66-4adf-9e93-fc0fa69550c9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_windows_rare_user_type10_remote_login" + ] + }, + { + "name": "Unusual Network Destination Domain Name", + "description": "A machine learning job detected an unusual network destination domain name. This can be due to initial access, persistence, command-and-control, or exfiltration activity. For example, when a user clicks on a link in a phishing email or opens a malicious document, a request may be sent to download and run a payload from an uncommon web server name. When malware is already running, it may send requests to an uncommon DNS domain the malware uses for command-and-control communication.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Web activity that occurs rarely in small quantities can trigger this alert. Possible examples are browsing technical support or vendor URLs that are used very sparsely. A user who visits a new and unique web destination may trigger this alert when the activity is sparse. Web applications that generate URLs unique to a transaction may trigger this when they are used sparsely. Web domains can be excluded in cases such as these." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "7d9e9734-64f4-440d-8711-add8aa0dd0ff", + "rule_id": "17e68559-b274-4948-ad0b-f8415bb31126", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": "packetbeat_rare_server_domain" + }, + { + "name": "Execution of COM object via Xwizard", + "description": "Windows Component Object Model (COM) is an inter-process communication (IPC) component of the native Windows application programming interface (API) that enables interaction between software objects or executable code. Xwizard can be used to run a COM object created in registry to evade defensive counter measures.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://lolbas-project.github.io/lolbas/Binaries/Xwizard/", + "http://www.hexacorn.com/blog/2017/07/31/the-wizard-of-x-oppa-plugx-style/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1559", + "name": "Inter-Process Communication", + "reference": "https://attack.mitre.org/techniques/T1559/", + "subtechnique": [ + { + "id": "T1559.001", + "name": "Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1559/001/" + } + ] + } + ] + } + ], + "id": "eca0cbc4-1ceb-4090-b825-bff5e7324343", + "rule_id": "1a6075b0-7479-450e-8fe7-b8b8438ac570", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name : \"xwizard.exe\" and\n (\n (process.args : \"RunWizard\" and process.args : \"{*}\") or\n (process.executable != null and\n not process.executable : (\"C:\\\\Windows\\\\SysWOW64\\\\xwizard.exe\", \"C:\\\\Windows\\\\System32\\\\xwizard.exe\")\n )\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "User Account Creation", + "description": "Identifies attempts to create new users. This is sometimes done by attackers to increase access or establish persistence on a system or domain.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating User Account Creation\n\nAttackers may create new accounts (both local and domain) to maintain access to victim systems.\n\nThis rule identifies the usage of `net.exe` to create new accounts.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Identify if the account was added to privileged groups or assigned special privileges after creation.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Account creation is a common administrative task, so there is a high chance of the activity being legitimate. Before investigating further, verify that this activity is not benign.\n\n### Related rules\n\n- Creation of a Hidden Local User Account - 2edc8076-291e-41e9-81e4-e3fcbc97ae5e\n- Windows User Account Creation - 38e17753-f581-4644-84da-0d60a8318694\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Delete the created account.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1136/001/" + } + ] + } + ] + } + ], + "id": "9a6eee1e-c63b-49f9-8f32-b35b3101b278", + "rule_id": "1aa9181a-492b-4c01-8b16-fa0735786b2b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"net.exe\", \"net1.exe\") and\n not process.parent.name : \"net.exe\" and\n (process.args : \"user\" and process.args : (\"/ad\", \"/add\"))\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Inter-Process Communication via Outlook", + "description": "Detects Inter-Process Communication with Outlook via Component Object Model from an unusual process. Adversaries may target user email to collect sensitive information or send email on their behalf via API.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/center-for-threat-informed-defense/adversary_emulation_library/blob/master/apt29/Archive/CALDERA_DIY/evals/payloads/stepSeventeen_email.ps1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1114", + "name": "Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/", + "subtechnique": [ + { + "id": "T1114.001", + "name": "Local Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1559", + "name": "Inter-Process Communication", + "reference": "https://attack.mitre.org/techniques/T1559/", + "subtechnique": [ + { + "id": "T1559.001", + "name": "Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1559/001/" + } + ] + } + ] + } + ], + "id": "a734868b-2ed2-45bb-9c0f-2100d1039de3", + "rule_id": "1dee0500-4aeb-44ca-b24b-4a285d7b6ba1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.effective_parent.executable", + "type": "unknown", + "ecs": false + }, + { + "name": "process.Ext.effective_parent.name", + "type": "unknown", + "ecs": false + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.action == \"start\" and process.name : \"OUTLOOK.EXE\" and\n process.Ext.effective_parent.name != null and\n not process.Ext.effective_parent.executable : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Execution of File Written or Modified by PDF Reader", + "description": "Identifies a suspicious file that was written by a PDF reader application and subsequently executed. These processes are often launched via exploitation of PDF applications.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Execution of File Written or Modified by PDF Reader\n\nPDF is a common file type used in corporate environments and most machines have software to handle these files. This creates a vector where attackers can exploit the engines and technology behind this class of software for initial access or privilege escalation.\n\nThis rule searches for executable files written by PDF reader software and executed in sequence. This is most likely the result of exploitation for privilege escalation or initial access. This rule can also detect suspicious processes masquerading as PDF readers.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve the PDF documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-120m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + }, + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + } + ], + "id": "f5820a16-830a-4b91-b88d-3d728c2dfb42", + "rule_id": "1defdd62-cd8d-426e-a246-81a37751bb2b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=2h\n [file where host.os.type == \"windows\" and event.type != \"deletion\" and file.extension : \"exe\" and\n (process.name : \"AcroRd32.exe\" or\n process.name : \"rdrcef.exe\" or\n process.name : \"FoxitPhantomPDF.exe\" or\n process.name : \"FoxitReader.exe\") and\n not (file.name : \"FoxitPhantomPDF.exe\" or\n file.name : \"FoxitPhantomPDFUpdater.exe\" or\n file.name : \"FoxitReader.exe\" or\n file.name : \"FoxitReaderUpdater.exe\" or\n file.name : \"AcroRd32.exe\" or\n file.name : \"rdrcef.exe\")\n ] by host.id, file.path\n [process where host.os.type == \"windows\" and event.type == \"start\"] by host.id, process.executable\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "PowerShell Script with Discovery Capabilities", + "description": "Identifies the use of Cmdlets and methods related to discovery activities. Attackers can use these to perform various situational awareness related activities, like enumerating users, shares, sessions, domain trusts, groups, etc.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "building_block_type": "default", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Tactic: Discovery", + "Data Source: PowerShell Logs", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1087", + "name": "Account Discovery", + "reference": "https://attack.mitre.org/techniques/T1087/", + "subtechnique": [ + { + "id": "T1087.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1087/001/" + }, + { + "id": "T1087.002", + "name": "Domain Account", + "reference": "https://attack.mitre.org/techniques/T1087/002/" + } + ] + }, + { + "id": "T1482", + "name": "Domain Trust Discovery", + "reference": "https://attack.mitre.org/techniques/T1482/" + }, + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + }, + { + "id": "T1083", + "name": "File and Directory Discovery", + "reference": "https://attack.mitre.org/techniques/T1083/" + }, + { + "id": "T1615", + "name": "Group Policy Discovery", + "reference": "https://attack.mitre.org/techniques/T1615/" + }, + { + "id": "T1135", + "name": "Network Share Discovery", + "reference": "https://attack.mitre.org/techniques/T1135/" + }, + { + "id": "T1201", + "name": "Password Policy Discovery", + "reference": "https://attack.mitre.org/techniques/T1201/" + }, + { + "id": "T1057", + "name": "Process Discovery", + "reference": "https://attack.mitre.org/techniques/T1057/" + }, + { + "id": "T1518", + "name": "Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/", + "subtechnique": [ + { + "id": "T1518.001", + "name": "Security Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/001/" + } + ] + }, + { + "id": "T1012", + "name": "Query Registry", + "reference": "https://attack.mitre.org/techniques/T1012/" + }, + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + }, + { + "id": "T1049", + "name": "System Network Connections Discovery", + "reference": "https://attack.mitre.org/techniques/T1049/" + }, + { + "id": "T1007", + "name": "System Service Discovery", + "reference": "https://attack.mitre.org/techniques/T1007/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "43160aa0-ca19-417c-a6ed-0ec2c31d8365", + "rule_id": "1e0a3f7c-21e7-4bb1-98c7-2036612fb1be", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n (\n (\"Get-ItemProperty\" or \"Get-Item\") and \"-Path\"\n ) or\n (\n \"Get-ADDefaultDomainPasswordPolicy\" or\n \"Get-ADDomain\" or \"Get-ComputerInfo\" or\n \"Get-Disk\" or \"Get-DnsClientCache\" or\n \"Get-GPOReport\" or \"Get-HotFix\" or\n \"Get-LocalUser\" or \"Get-NetFirewallProfile\" or\n \"get-nettcpconnection\" or \"Get-NetAdapter\" or\n \"Get-PhysicalDisk\" or \"Get-Process\" or\n \"Get-PSDrive\" or \"Get-Service\" or\n \"Get-SmbShare\" or \"Get-WinEvent\"\n ) or\n (\n (\"Get-WmiObject\" or \"gwmi\" or \"Get-CimInstance\" or\n \"gcim\" or \"Management.ManagementObjectSearcher\" or\n \"System.Management.ManagementClass\" or\n \"[WmiClass]\" or \"[WMI]\") and\n (\n \"AntiVirusProduct\" or \"CIM_BIOSElement\" or \"CIM_ComputerSystem\" or \"CIM_Product\" or \"CIM_DiskDrive\" or\n \"CIM_LogicalDisk\" or \"CIM_NetworkAdapter\" or \"CIM_StorageVolume\" or \"CIM_OperatingSystem\" or\n \"CIM_Process\" or \"CIM_Service\" or \"MSFT_DNSClientCache\" or \"Win32_BIOS\" or \"Win32_ComputerSystem\" or\n \"Win32_ComputerSystemProduct\" or \"Win32_DiskDrive\" or \"win32_environment\" or \"Win32_Group\" or\n \"Win32_groupuser\" or \"Win32_IP4RouteTable\" or \"Win32_logicaldisk\" or \"Win32_MappedLogicalDisk\" or\n \"Win32_NetworkAdapterConfiguration\" or \"win32_ntdomain\" or \"Win32_OperatingSystem\" or\n \"Win32_PnPEntity\" or \"Win32_Process\" or \"Win32_Product\" or \"Win32_quickfixengineering\" or\n \"win32_service\" or \"Win32_Share\" or \"Win32_UserAccount\"\n )\n ) or\n (\n (\"ADSI\" and \"WinNT\") or\n (\"Get-ChildItem\" and \"sysmondrv.sys\") or\n (\"::GetIPGlobalProperties()\" and \"GetActiveTcpConnections()\") or\n (\"ServiceProcess.ServiceController\" and \"::GetServices\") or\n (\"Diagnostics.Process\" and \"::GetProcesses\") or\n (\"DirectoryServices.Protocols.GroupPolicy\" and \".GetGPOReport()\") or\n (\"DirectoryServices.AccountManagement\" and \"PrincipalSearcher\") or\n (\"NetFwTypeLib.NetFwMgr\" and \"CurrentProfile\") or\n (\"NetworkInformation.NetworkInterface\" and \"GetAllNetworkInterfaces\") or\n (\"Automation.PSDriveInfo\") or\n (\"Microsoft.Win32.RegistryHive\")\n ) or\n (\n \"Get-ItemProperty\" and\n (\n \"\\Control\\SecurityProviders\\WDigest\" or\n \"\\microsoft\\windows\\currentversion\\explorer\\runmru\" or\n \"\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\Kerberos\\Parameters\" or\n \"\\Microsoft\\Windows\\CurrentVersion\\Uninstall\" or\n \"\\Microsoft\\Windows\\WindowsUpdate\" or\n \"Policies\\Microsoft\\Windows\\Installer\" or\n \"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\" or\n (\"\\Services\\SharedAccess\\Parameters\\FirewallPolicy\" and \"EnableFirewall\") or\n (\"Microsoft\\Windows\\CurrentVersion\\Internet Settings\" and \"proxyEnable\")\n )\n ) or\n (\n (\"Directoryservices.Activedirectory\" or\n \"DirectoryServices.AccountManagement\") and \n (\n \"Domain Admins\" or \"DomainControllers\" or\n \"FindAllGlobalCatalogs\" or \"GetAllTrustRelationships\" or\n \"GetCurrentDomain\" or \"GetCurrentForest\"\n ) or\n \"DirectoryServices.DirectorySearcher\" and\n (\n \"samAccountType=805306368\" or\n \"samAccountType=805306369\" or\n \"objectCategory=group\" or\n \"objectCategory=groupPolicyContainer\" or\n \"objectCategory=site\" or\n \"objectCategory=subnet\" or\n \"objectClass=trustedDomain\"\n )\n ) or\n (\n \"Get-Process\" and\n (\n \"mcshield\" or \"windefend\" or \"savservice\" or\n \"TMCCSF\" or \"symantec antivirus\" or\n \"CSFalcon\" or \"TmPfw\" or \"kvoop\"\n )\n )\n ) and\n not user.id : (\"S-1-5-18\" or \"S-1-5-19\" or \"S-1-5-20\") and\n not file.path : (\n ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules\\\\\\\\*.psd1 or\n ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules\\\\\\\\*.psm1 or\n ?\\:\\\\\\\\Program?Files\\\\\\\\Microsoft?Azure?AD?Sync\\\\\\\\Extensions\\\\\\\\AADConnector.psm1* or\n *ServiceNow?MID?Server*agent\\\\\\\\scripts\\\\\\\\PowerShell\\\\\\\\*.psm1 or\n ?\\:\\\\\\\\*\\\\\\\\IMECache\\\\\\\\HealthScripts\\\\\\\\*\\\\\\\\detect.ps1\n ) and\n not (\n file.path : (\n ?\\:\\\\\\\\*\\\\\\\\TEMP\\\\\\\\SDIAG* or\n ?\\:\\\\\\\\TEMP\\\\\\\\SDIAG* or\n ?\\:\\\\\\\\Temp\\\\\\\\SDIAG* or\n ?\\:\\\\\\\\temp\\\\\\\\SDIAG* or\n ?\\:\\\\\\\\Users\\\\\\\\*\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Temp\\\\\\\\SDIAG* or\n ?\\:\\\\\\\\Users\\\\\\\\*\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Temp\\\\\\\\*\\\\\\\\SDIAG*\n ) and file.name : \"CL_Utility.ps1\"\n )\n", + "language": "kuery" + }, + { + "name": "Unusual Sudo Activity", + "description": "Looks for sudo activity from an unusual user context. An unusual sudo user could be due to troubleshooting activity or it could be a sign of credentialed access via compromised accounts.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon sudo activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/" + } + ] + } + ], + "id": "05eb2f40-21db-4afe-beaf-0143b5c2b7c5", + "rule_id": "1e9fc667-9ff1-4b33-9f40-fefca8537eb0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": [ + "v3_linux_rare_sudo_user" + ] + }, + { + "name": "Unusual Linux User Calling the Metadata Service", + "description": "Looks for anomalous access to the cloud platform metadata service by an unusual user. The metadata service may be targeted in order to harvest credentials or user data scripts containing secrets.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program, or one that runs under a new or rarely used user context, could trigger this detection rule. Manual interrogation of the metadata service during debugging or troubleshooting could trigger this rule." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.005", + "name": "Cloud Instance Metadata API", + "reference": "https://attack.mitre.org/techniques/T1552/005/" + } + ] + } + ] + } + ], + "id": "f014217a-a68e-45d8-9dbe-cb338771f50b", + "rule_id": "1faec04b-d902-4f89-8aff-92cd9043c16f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": [ + "v3_linux_rare_metadata_user" + ] + }, + { + "name": "Creation or Modification of Root Certificate", + "description": "Identifies the creation or modification of a local trusted root certificate in Windows. The install of a malicious root certificate would allow an attacker the ability to masquerade malicious files as valid signed components from any entity (for example, Microsoft). It could also allow an attacker to decrypt SSL traffic.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Creation or Modification of Root Certificate\n\nRoot certificates are the primary level of certifications that tell a browser that the communication is trusted and legitimate. This verification is based upon the identification of a certification authority. Windows adds several trusted root certificates so browsers can use them to communicate with websites.\n\n[Check out this post](https://www.thewindowsclub.com/what-are-root-certificates-windows) for more details on root certificates and the involved cryptography.\n\nThis rule identifies the creation or modification of a root certificate by monitoring registry modifications. The installation of a malicious root certificate would allow an attacker the ability to masquerade malicious files as valid signed components from any entity (for example, Microsoft). It could also allow an attacker to decrypt SSL traffic.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate abnormal behaviors observed by the subject process such as network connections, other registry or file modifications, and any spawned child processes.\n- If one of the processes is suspicious, retrieve it and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This detection may be triggered by certain applications that install root certificates for the purpose of inspecting SSL traffic. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove the malicious certificate from the root certificate store.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Certain applications may install root certificates for the purpose of inspecting SSL traffic." + ], + "references": [ + "https://posts.specterops.io/code-signing-certificate-cloning-attacks-and-defenses-6f98657fc6ec", + "https://www.ired.team/offensive-security/persistence/t1130-install-root-certificate" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1553", + "name": "Subvert Trust Controls", + "reference": "https://attack.mitre.org/techniques/T1553/", + "subtechnique": [ + { + "id": "T1553.004", + "name": "Install Root Certificate", + "reference": "https://attack.mitre.org/techniques/T1553/004/" + } + ] + } + ] + } + ], + "id": "e5648fae-3eed-4fc7-a536-e1de395d4ff1", + "rule_id": "203ab79b-239b-4aa5-8e54-fc50623ee8e4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n registry.path :\n (\n \"HKLM\\\\Software\\\\Microsoft\\\\SystemCertificates\\\\Root\\\\Certificates\\\\*\\\\Blob\",\n \"HKLM\\\\Software\\\\Microsoft\\\\SystemCertificates\\\\AuthRoot\\\\Certificates\\\\*\\\\Blob\",\n \"HKLM\\\\Software\\\\Policies\\\\Microsoft\\\\SystemCertificates\\\\Root\\\\Certificates\\\\*\\\\Blob\",\n \"HKLM\\\\Software\\\\Policies\\\\Microsoft\\\\SystemCertificates\\\\AuthRoot\\\\Certificates\\\\*\\\\Blob\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\SystemCertificates\\\\Root\\\\Certificates\\\\*\\\\Blob\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\SystemCertificates\\\\AuthRoot\\\\Certificates\\\\*\\\\Blob\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Policies\\\\Microsoft\\\\SystemCertificates\\\\Root\\\\Certificates\\\\*\\\\Blob\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Policies\\\\Microsoft\\\\SystemCertificates\\\\AuthRoot\\\\Certificates\\\\*\\\\Blob\"\n ) and\n not process.executable :\n (\"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\*.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\*.exe\",\n \"?:\\\\Windows\\\\Sysmon64.exe\",\n \"?:\\\\Windows\\\\Sysmon.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\*\\\\MsMpEng.exe\",\n \"?:\\\\Windows\\\\WinSxS\\\\*.exe\",\n \"?:\\\\Windows\\\\UUS\\\\amd64\\\\MoUsoCoreWorker.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Access of Stored Browser Credentials", + "description": "Identifies the execution of a process with arguments pointing to known browser files that store passwords and cookies. Adversaries may acquire credentials from web browsers by reading files specific to the target browser.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://securelist.com/calisto-trojan-for-macos/86543/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1539", + "name": "Steal Web Session Cookie", + "reference": "https://attack.mitre.org/techniques/T1539/" + }, + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/", + "subtechnique": [ + { + "id": "T1555.003", + "name": "Credentials from Web Browsers", + "reference": "https://attack.mitre.org/techniques/T1555/003/" + } + ] + } + ] + } + ], + "id": "c4b37cb7-0f0c-4894-aadd-12c77ce7dbdb", + "rule_id": "20457e4f-d1de-4b92-ae69-142e27a4342a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.args :\n (\n \"/Users/*/Library/Application Support/Google/Chrome/Default/Login Data\",\n \"/Users/*/Library/Application Support/Google/Chrome/Default/Cookies\",\n \"/Users/*/Library/Application Support/Google/Chrome/Profile*/Cookies\",\n \"/Users/*/Library/Cookies*\",\n \"/Users/*/Library/Application Support/Firefox/Profiles/*.default/cookies.sqlite\",\n \"/Users/*/Library/Application Support/Firefox/Profiles/*.default/key*.db\",\n \"/Users/*/Library/Application Support/Firefox/Profiles/*.default/logins.json\",\n \"Login Data\",\n \"Cookies.binarycookies\",\n \"key4.db\",\n \"key3.db\",\n \"logins.json\",\n \"cookies.sqlite\"\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Full User-Mode Dumps Enabled System-Wide", + "description": "Identifies the enable of the full user-mode dumps feature system-wide. This feature allows Windows Error Reporting (WER) to collect data after an application crashes. This setting is a requirement for the LSASS Shtinkering attack, which fakes the communication of a crash on LSASS, generating a dump of the process memory, which gives the attacker access to the credentials present on the system without having to bring malware to the system. This setting is not enabled by default, and applications must create their registry subkeys to hold settings that enable them to collect dumps.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps", + "https://github.com/deepinstinct/Lsass-Shtinkering", + "https://media.defcon.org/DEF%20CON%2030/DEF%20CON%2030%20presentations/Asaf%20Gilboa%20-%20LSASS%20Shtinkering%20Abusing%20Windows%20Error%20Reporting%20to%20Dump%20LSASS.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "6f02464c-5f8c-4155-9a90-0efb771990f0", + "rule_id": "220be143-5c67-4fdb-b6ce-dd6826d024fd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and registry.path : \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\Windows Error Reporting\\\\LocalDumps\\\\DumpType\" and\n registry.data.strings : (\"2\", \"0x00000002\") and\n not (process.executable : \"?:\\\\Windows\\\\system32\\\\svchost.exe\" and user.id : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\"))\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Potential Suspicious DebugFS Root Device Access", + "description": "This rule monitors for the usage of the built-in Linux DebugFS utility to access a disk device without root permissions. Linux users that are part of the \"disk\" group have sufficient privileges to access all data inside of the machine through DebugFS. Attackers may leverage DebugFS in conjunction with \"disk\" permissions to read sensitive files owned by root, such as the shadow file, root ssh private keys or other sensitive files that may allow them to further escalate privileges.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://book.hacktricks.xyz/linux-hardening/privilege-escalation/interesting-groups-linux-pe#disk-group" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.003", + "name": "Local Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/003/" + } + ] + } + ] + } + ], + "id": "16996e31-1c95-41ba-92d7-27d30082d02f", + "rule_id": "2605aa59-29ac-4662-afad-8d86257c7c91", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "group.Ext.real.id", + "type": "unknown", + "ecs": false + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.Ext.real.id", + "type": "unknown", + "ecs": false + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and event.type == \"start\" and \nprocess.name == \"debugfs\" and process.args : \"/dev/sd*\" and not process.args == \"-R\" and \nnot user.Ext.real.id == \"0\" and not group.Ext.real.id == \"0\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Privileges Elevation via Parent Process PID Spoofing", + "description": "Identifies parent process spoofing used to create an elevated child process. Adversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 5, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://gist.github.com/xpn/a057a26ec81e736518ee50848b9c2cd6", + "https://blog.didierstevens.com/2017/03/20/", + "https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-updateprocthreadattribute", + "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1134.002/T1134.002.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/", + "subtechnique": [ + { + "id": "T1134.002", + "name": "Create Process with Token", + "reference": "https://attack.mitre.org/techniques/T1134/002/" + }, + { + "id": "T1134.004", + "name": "Parent PID Spoofing", + "reference": "https://attack.mitre.org/techniques/T1134/004/" + } + ] + } + ] + } + ], + "id": "ee5d4d7d-1c58-4a73-a655-bf4ab6fceac5", + "rule_id": "26b01043-4f04-4d2f-882a-5a1d2e95751b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.Ext.real.pid", + "type": "unknown", + "ecs": false + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "/* This rule is compatible with Elastic Endpoint only */\n\nprocess where host.os.type == \"windows\" and event.action == \"start\" and\n\n /* process creation via seclogon */\n process.parent.Ext.real.pid > 0 and\n\n /* PrivEsc to SYSTEM */\n user.id : \"S-1-5-18\" and\n\n /* Common FPs - evasion via hollowing is possible, should be covered by code injection */\n not process.executable : (\"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\System32\\\\Wermgr.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\Wermgr.exe\",\n \"?:\\\\Windows\\\\SoftwareDistribution\\\\Download\\\\Install\\\\securityhealthsetup.exe\") and\n /* Logon Utilities */\n not (process.parent.executable : \"?:\\\\Windows\\\\System32\\\\Utilman.exe\" and\n process.executable : (\"?:\\\\Windows\\\\System32\\\\osk.exe\",\n \"?:\\\\Windows\\\\System32\\\\Narrator.exe\",\n \"?:\\\\Windows\\\\System32\\\\Magnify.exe\")) and\n\n not process.parent.executable : \"?:\\\\Windows\\\\System32\\\\AtBroker.exe\" and\n\n not (process.code_signature.subject_name in\n (\"philandro Software GmbH\", \"Freedom Scientific Inc.\", \"TeamViewer Germany GmbH\", \"Projector.is, Inc.\",\n \"TeamViewer GmbH\", \"Cisco WebEx LLC\", \"Dell Inc\") and process.code_signature.trusted == true) and \n\n /* AM_Delta_Patch Windows Update */\n not (process.executable : (\"?:\\\\Windows\\\\System32\\\\MpSigStub.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\MpSigStub.exe\") and\n process.parent.executable : (\"?:\\\\Windows\\\\System32\\\\wuauclt.exe\", \n \"?:\\\\Windows\\\\SysWOW64\\\\wuauclt.exe\", \n \"?:\\\\Windows\\\\UUS\\\\Packages\\\\Preview\\\\*\\\\wuaucltcore.exe\", \n \"?:\\\\Windows\\\\UUS\\\\amd64\\\\wuauclt.exe\", \n \"?:\\\\Windows\\\\UUS\\\\amd64\\\\wuaucltcore.exe\", \n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\UUS\\\\*\\\\wuaucltcore.exe\")) and\n not (process.executable : (\"?:\\\\Windows\\\\System32\\\\MpSigStub.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\MpSigStub.exe\") and process.parent.executable == null) and\n\n /* Other third party SW */\n not process.parent.executable :\n (\"?:\\\\Program Files (x86)\\\\HEAT Software\\\\HEAT Remote\\\\HEATRemoteServer.exe\",\n \"?:\\\\Program Files (x86)\\\\VisualCron\\\\VisualCronService.exe\",\n \"?:\\\\Program Files\\\\BinaryDefense\\\\Vision\\\\Agent\\\\bds-vision-agent-app.exe\",\n \"?:\\\\Program Files\\\\Tablet\\\\Wacom\\\\WacomHost.exe\",\n \"?:\\\\Program Files (x86)\\\\LogMeIn\\\\x64\\\\LogMeIn.exe\",\n \"?:\\\\Program Files (x86)\\\\EMC Captiva\\\\Captiva Cloud Runtime\\\\Emc.Captiva.WebCaptureRunner.exe\",\n \"?:\\\\Program Files\\\\Freedom Scientific\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Google\\\\Chrome Remote Desktop\\\\*\\\\remoting_host.exe\",\n \"?:\\\\Program Files (x86)\\\\GoToAssist Remote Support Customer\\\\*\\\\g2ax_comm_customer.exe\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "PowerShell Script with Archive Compression Capabilities", + "description": "Identifies the use of Cmdlets and methods related to archive compression activities. Adversaries will often compress and encrypt data in preparation for exfiltration.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "building_block_type": "default", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Data Source: PowerShell Logs", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1560", + "name": "Archive Collected Data", + "reference": "https://attack.mitre.org/techniques/T1560/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "f21ad0ff-ecf3-4185-8d5a-54c5c36e05ae", + "rule_id": "27071ea3-e806-4697-8abc-e22c92aa4293", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n(\n powershell.file.script_block_text : (\n \"IO.Compression.ZipFile\" or\n \"IO.Compression.ZipArchive\" or\n \"ZipFile.CreateFromDirectory\" or\n \"IO.Compression.BrotliStream\" or\n \"IO.Compression.DeflateStream\" or\n \"IO.Compression.GZipStream\" or\n \"IO.Compression.ZLibStream\"\n ) and \n powershell.file.script_block_text : (\n \"CompressionLevel\" or\n \"CompressionMode\" or\n \"ZipArchiveMode\"\n ) or\n powershell.file.script_block_text : \"Compress-Archive\"\n) and \n not file.path : (\n ?\\:\\\\\\\\ProgramData\\\\\\\\Microsoft\\\\\\\\Windows?Defender?Advanced?Threat?Protection\\\\\\\\Downloads\\\\\\\\* or\n ?\\:\\\\\\\\ProgramData\\\\\\\\Microsoft\\\\\\\\Windows?Defender?Advanced?Threat?Protection\\\\\\\\DataCollection\\\\\\\\* or\n ?\\:\\\\\\\\Program?Files\\\\\\\\Microsoft?Dependency?Agent\\\\\\\\plugins\\\\\\\\* or\n ?\\:\\\\\\\\Program?Files\\\\\\\\Azure\\\\\\\\StorageSyncAgent\\\\\\\\AFSDiag.ps1\n )\n", + "language": "kuery" + }, + { + "name": "Sudo Command Enumeration Detected", + "description": "This rule monitors for the usage of the sudo -l command, which is used to list the allowed and forbidden commands for the invoking user. Attackers may execute this command to enumerate commands allowed to be executed with sudo permissions, potentially allowing to escalate privileges to root.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1033", + "name": "System Owner/User Discovery", + "reference": "https://attack.mitre.org/techniques/T1033/" + } + ] + } + ], + "id": "f3f7a155-0338-43e7-9b15-0573ce0700d0", + "rule_id": "28d39238-0c01-420a-b77a-24e5a7378663", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "group.Ext.real.id", + "type": "unknown", + "ecs": false + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.Ext.real.id", + "type": "unknown", + "ecs": false + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and \nprocess.name == \"sudo\" and process.args == \"-l\" and process.args_count == 2 and\nprocess.parent.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and \nnot group.Ext.real.id : \"0\" and not user.Ext.real.id : \"0\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Windows Defender Exclusions Added via PowerShell", + "description": "Identifies modifications to the Windows Defender configuration settings using PowerShell to add exclusions at the folder directory or process level.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Windows Defender Exclusions Added via PowerShell\n\nMicrosoft Windows Defender is an antivirus product built into Microsoft Windows. Since this software product is used to prevent and stop malware, it's important to monitor what specific exclusions are made to the product's configuration settings. These can often be signs of an adversary or malware trying to bypass Windows Defender's capabilities. One of the more notable [examples](https://www.cyberbit.com/blog/endpoint-security/latest-trickbot-variant-has-new-tricks-up-its-sleeve/) was observed in 2018 where Trickbot incorporated mechanisms to disable Windows Defender to avoid detection.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Examine the exclusion in order to determine the intent behind it.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- If the exclusion specifies a suspicious file or path, retrieve the file(s) and determine if malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This rule has a high chance to produce false positives due to how often network administrators legitimately configure exclusions. In order to validate the activity further, review the specific exclusion and its intent. There are many legitimate reasons for exclusions, so it's important to gain context.\n\n### Related rules\n\n- Windows Defender Disabled via Registry Modification - 2ffa1f1e-b6db-47fa-994b-1512743847eb\n- Disabling Windows Defender Security Settings via PowerShell - c8cccb06-faf2-4cd5-886e-2c9636cfcb87\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Exclusion lists for antimalware capabilities should always be routinely monitored for review.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.bitdefender.com/files/News/CaseStudies/study/400/Bitdefender-PR-Whitepaper-MosaicLoader-creat5540-en-EN.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + }, + { + "id": "T1562.006", + "name": "Indicator Blocking", + "reference": "https://attack.mitre.org/techniques/T1562/006/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "34135f32-3f98-4f6d-b8c5-4059837fadf2", + "rule_id": "2c17e5d7-08b9-43b2-b58a-0270d65ac85b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") or process.pe.original_file_name in (\"powershell.exe\", \"pwsh.dll\", \"powershell_ise.exe\")) and\n process.args : (\"*Add-MpPreference*\", \"*Set-MpPreference*\") and\n process.args : (\"*-Exclusion*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Microsoft Diagnostics Wizard Execution", + "description": "Identifies potential abuse of the Microsoft Diagnostics Troubleshooting Wizard (MSDT) to proxy malicious command or binary execution via malicious process arguments.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://twitter.com/nao_sec/status/1530196847679401984", + "https://lolbas-project.github.io/lolbas/Binaries/Msdt/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "7c22ddd3-b2be-4bf2-8d6c-108d55202f66", + "rule_id": "2c3c29a4-f170-42f8-a3d8-2ceebc18eb6a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.pe.original_file_name == \"msdt.exe\" or process.name : \"msdt.exe\") and\n (\n process.args : (\"IT_RebrowseForFile=*\", \"ms-msdt:/id\", \"ms-msdt:-id\", \"*FromBase64*\") or\n\n (process.args : \"-af\" and process.args : \"/skip\" and\n process.parent.name : (\"explorer.exe\", \"cmd.exe\", \"powershell.exe\", \"cscript.exe\", \"wscript.exe\", \"mshta.exe\", \"rundll32.exe\", \"regsvr32.exe\") and\n process.args : (\"?:\\\\WINDOWS\\\\diagnostics\\\\index\\\\PCWDiagnostic.xml\", \"PCWDiagnostic.xml\", \"?:\\\\Users\\\\Public\\\\*\", \"?:\\\\Windows\\\\Temp\\\\*\")) or\n\n (process.pe.original_file_name == \"msdt.exe\" and not process.name : \"msdt.exe\" and process.name != null) or\n\n (process.pe.original_file_name == \"msdt.exe\" and not process.executable : (\"?:\\\\Windows\\\\system32\\\\msdt.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\msdt.exe\"))\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Creation of a Hidden Local User Account", + "description": "Identifies the creation of a hidden local user account by appending the dollar sign to the account name. This is sometimes done by attackers to increase access to a system and avoid appearing in the results of accounts listing using the net users command.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Creation of a Hidden Local User Account\n\nAttackers can create accounts ending with a `$` symbol to make the account hidden to user enumeration utilities and bypass detections that identify computer accounts by this pattern to apply filters.\n\nThis rule uses registry events to identify the creation of local hidden accounts.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positive (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Delete the hidden account.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.menasec.net/2019/02/threat-hunting-6-hiding-in-plain-sights_8.html", + "https://github.com/CyberMonitor/APT_CyberCriminal_Campagin_Collections/tree/master/2020/2020.12.15.Lazarus_Campaign" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1136/001/" + } + ] + } + ] + } + ], + "id": "a1477a82-9213-4f12-9900-facfaa8945aa", + "rule_id": "2edc8076-291e-41e9-81e4-e3fcbc97ae5e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\SAM\\\\SAM\\\\Domains\\\\Account\\\\Users\\\\Names\\\\*$\\\\\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SAM\\\\SAM\\\\Domains\\\\Account\\\\Users\\\\Names\\\\*$\\\\\"\n)\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Program Files Directory Masquerading", + "description": "Identifies execution from a directory masquerading as the Windows Program Files directories. These paths are trusted and usually host trusted third party programs. An adversary may leverage masquerading, along with low privileges to bypass detections allowlisting those folders.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + } + ], + "id": "be862f85-8c71-49b8-8297-19452a3ee706", + "rule_id": "32c5cf9c-2ef8-4e87-819e-5ccb7cd18b14", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.executable : \"C:\\\\*Program*Files*\\\\*.exe\" and\n not process.executable : (\"C:\\\\Program Files\\\\*.exe\", \"C:\\\\Program Files (x86)\\\\*.exe\", \"C:\\\\Users\\\\*.exe\", \"C:\\\\ProgramData\\\\*.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Accepted Default Telnet Port Connection", + "description": "This rule detects network events that may indicate the use of Telnet traffic. Telnet is commonly used by system administrators to remotely control older or embedded systems using the command line shell. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector. As a plain-text protocol, it may also expose usernames and passwords to anyone capable of observing the traffic.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "timeline_id": "300afc76-072d-4261-864d-4149714bf3f1", + "timeline_title": "Comprehensive Network Timeline", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Tactic: Lateral Movement", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "IoT (Internet of Things) devices and networks may use telnet and can be excluded if desired. Some business work-flows may use Telnet for administration of older devices. These often have a predictable behavior. Telnet activity involving an unusual source or destination may be more suspicious. Telnet activity involving a production server that has no known associated Telnet work-flow or business requirement is often suspicious." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + } + ], + "id": "b0d33519-c24e-4c87-96fb-8af37990027a", + "rule_id": "34fde489-94b0-4500-a76f-b8a157cf9269", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset:network_traffic.flow or event.category:(network or network_traffic))\n and event.type:connection and not event.action:(\n flow_dropped or denied or deny or\n flow_terminated or timeout or Reject or network_flow)\n and destination.port:23\n", + "language": "kuery" + }, + { + "name": "Execution via Electron Child Process Node.js Module", + "description": "Identifies attempts to execute a child process from within the context of an Electron application using the child_process Node.js module. Adversaries may abuse this technique to inherit permissions from parent processes.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.matthewslipper.com/2019/09/22/everything-you-wanted-electron-child-process.html", + "https://www.trustedsec.com/blog/macos-injection-via-third-party-frameworks/", + "https://nodejs.org/api/child_process.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/" + } + ] + } + ], + "id": "2aaee201-5a92-476d-adc6-e89e053f638b", + "rule_id": "35330ba2-c859-4c98-8b7f-c19159ea0e58", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and process.args:(\"-e\" and const*require*child_process*)\n", + "language": "kuery" + }, + { + "name": "Network Traffic to Rare Destination Country", + "description": "A machine learning job detected a rare destination country name in the network logs. This can be due to initial access, persistence, command-and-control, or exfiltration activity. For example, when a user clicks on a link in a phishing email or opens a malicious document, a request may be sent to download and run a payload from a server in a country which does not normally appear in network traffic or business work-flows. Malware instances and persistence mechanisms may communicate with command-and-control (C2) infrastructure in their country of origin, which may be an unusual destination country for the source network.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Business workflows that occur very occasionally, and involve a business relationship with an organization in a country that does not routinely appear in network events, can trigger this alert. A new business workflow with an organization in a country with which no workflows previously existed may trigger this alert - although the model will learn that the new destination country is no longer anomalous as the activity becomes ongoing. Business travelers who roam to many countries for brief periods may trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "50778b3a-641e-4322-ac7c-db86aa821e09", + "rule_id": "35f86980-1fb1-4dff-b311-3be941549c8d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "rare_destination_country" + }, + { + "name": "Potential Suspicious File Edit", + "description": "This rule monitors for the potential edit of a suspicious file. In Linux, when editing a file through an editor, a temporary .swp file is created. By monitoring for the creation of this .swp file, we can detect potential file edits of suspicious files. The execution of this rule is not a clear sign of the file being edited, as just opening the file through an editor will trigger this event. Attackers may alter any of the files added in this rule to establish persistence, escalate privileges or perform reconnaisance on the system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 1, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1037", + "name": "Boot or Logon Initialization Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/", + "subtechnique": [ + { + "id": "T1037.004", + "name": "RC Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/004/" + } + ] + }, + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.006", + "name": "Dynamic Linker Hijacking", + "reference": "https://attack.mitre.org/techniques/T1574/006/" + } + ] + }, + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.002", + "name": "Systemd Service", + "reference": "https://attack.mitre.org/techniques/T1543/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.003", + "name": "Sudo and Sudo Caching", + "reference": "https://attack.mitre.org/techniques/T1548/003/" + } + ] + } + ] + } + ], + "id": "4d57a0b8-63da-4ceb-8d2b-c08c5c2913c2", + "rule_id": "3728c08d-9b70-456b-b6b8-007c7d246128", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where event.action in (\"creation\", \"file_create_event\") and file.extension == \"swp\" and \nfile.path : (\n /* common interesting files and locations */\n \"/etc/.shadow.swp\", \"/etc/.shadow-.swp\", \"/etc/.shadow~.swp\", \"/etc/.gshadow.swp\", \"/etc/.gshadow-.swp\",\n \"/etc/.passwd.swp\", \"/etc/.pwd.db.swp\", \"/etc/.master.passwd.swp\", \"/etc/.spwd.db.swp\", \"/etc/security/.opasswd.swp\",\n \"/etc/.environment.swp\", \"/etc/.profile.swp\", \"/etc/sudoers.d/.*.swp\", \"/etc/ld.so.conf.d/.*.swp\",\n \"/etc/init.d/.*.swp\", \"/etc/.rc.local.swp\", \"/etc/rc*.d/.*.swp\", \"/dev/shm/.*.swp\", \"/etc/update-motd.d/.*.swp\",\n \"/usr/lib/update-notifier/.*.swp\",\n\n /* service, timer, want, socket and lock files */\n \"/etc/systemd/system/.*.swp\", \"/usr/local/lib/systemd/system/.*.swp\", \"/lib/systemd/system/.*.swp\",\n \"/usr/lib/systemd/system/.*.swp\",\"/home/*/.config/systemd/user/.*.swp\", \"/run/.*.swp\", \"/var/run/.*.swp/\",\n\n /* profile and shell configuration files */ \n \"/home/*.profile.swp\", \"/home/*.bash_profile.swp\", \"/home/*.bash_login.swp\", \"/home/*.bashrc.swp\", \"/home/*.bash_logout.swp\",\n \"/home/*.zshrc.swp\", \"/home/*.zlogin.swp\", \"/home/*.tcshrc.swp\", \"/home/*.kshrc.swp\", \"/home/*.config.fish.swp\",\n \"/root/*.profile.swp\", \"/root/*.bash_profile.swp\", \"/root/*.bash_login.swp\", \"/root/*.bashrc.swp\", \"/root/*.bash_logout.swp\",\n \"/root/*.zshrc.swp\", \"/root/*.zlogin.swp\", \"/root/*.tcshrc.swp\", \"/root/*.kshrc.swp\", \"/root/*.config.fish.swp\"\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Finder Sync Plugin Registered and Enabled", + "description": "Finder Sync plugins enable users to extend Finder’s functionality by modifying the user interface. Adversaries may abuse this feature by adding a rogue Finder Plugin to repeatedly execute malicious payloads for persistence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trusted Finder Sync Plugins" + ], + "references": [ + "https://github.com/specterops/presentations/raw/master/Leo%20Pitt/Hey_Im_Still_in_Here_Modern_macOS_Persistence_SO-CON2020.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/" + } + ] + } + ], + "id": "c8fd065f-1962-4e71-a715-e1c68f91403c", + "rule_id": "37f638ea-909d-4f94-9248-edd21e4a9906", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name : \"pluginkit\" and\n process.args : \"-e\" and process.args : \"use\" and process.args : \"-i\" and\n not process.args :\n (\n \"com.google.GoogleDrive.FinderSyncAPIExtension\",\n \"com.google.drivefs.findersync\",\n \"com.boxcryptor.osx.Rednif\",\n \"com.adobe.accmac.ACCFinderSync\",\n \"com.microsoft.OneDrive.FinderSync\",\n \"com.insynchq.Insync.Insync-Finder-Integration\",\n \"com.box.desktop.findersyncext\"\n ) and\n not process.parent.executable : (\n \"/Library/Application Support/IDriveforMac/IDriveHelperTools/FinderPluginApp.app/Contents/MacOS/FinderPluginApp\"\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Prompt for Credentials with OSASCRIPT", + "description": "Identifies the use of osascript to execute scripts via standard input that may prompt a user with a rogue dialog for credentials.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/EmpireProject/EmPyre/blob/master/lib/modules/collection/osx/prompt.py", + "https://ss64.com/osx/osascript.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1056", + "name": "Input Capture", + "reference": "https://attack.mitre.org/techniques/T1056/", + "subtechnique": [ + { + "id": "T1056.002", + "name": "GUI Input Capture", + "reference": "https://attack.mitre.org/techniques/T1056/002/" + } + ] + } + ] + } + ], + "id": "2c700355-f87e-4e1e-8824-09bf6ccc8b1a", + "rule_id": "38948d29-3d5d-42e3-8aec-be832aaaf8eb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name : \"osascript\" and\n process.command_line : \"osascript*display dialog*password*\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Persistence via Microsoft Outlook VBA", + "description": "Detects attempts to establish persistence on an endpoint by installing a rogue Microsoft Outlook VBA Template.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A legitimate VBA for Outlook is usually configured interactively via OUTLOOK.EXE." + ], + "references": [ + "https://www.mdsec.co.uk/2020/11/a-fresh-outlook-on-mail-based-persistence/", + "https://www.linkedin.com/pulse/outlook-backdoor-using-vba-samir-b-/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1137", + "name": "Office Application Startup", + "reference": "https://attack.mitre.org/techniques/T1137/" + } + ] + } + ], + "id": "af2ac949-f134-4b28-8c83-666043f145e8", + "rule_id": "397945f3-d39a-4e6f-8bcb-9656c2031438", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.path : \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Outlook\\\\VbaProject.OTM\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Module Loaded by LSASS", + "description": "Identifies LSASS loading an unsigned or untrusted DLL. Windows Security Support Provider (SSP) DLLs are loaded into LSSAS process at system start. Once loaded into the LSA, SSP DLLs have access to encrypted and plaintext passwords that are stored in Windows, such as any logged-on user's Domain password or smart card PINs.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.xpnsec.com/exploring-mimikatz-part-2/", + "https://github.com/jas502n/mimikat_ssp" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "96f1e40c-c276-42fc-b82b-8c0268e1cf82", + "rule_id": "3a6001a0-0939-4bbe-86f4-47d8faeb7b97", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.hash.sha256", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "library where host.os.type == \"windows\" and process.executable : \"?:\\\\Windows\\\\System32\\\\lsass.exe\" and\n not (dll.code_signature.subject_name :\n (\"Microsoft Windows\",\n \"Microsoft Corporation\",\n \"Microsoft Windows Publisher\",\n \"Microsoft Windows Software Compatibility Publisher\",\n \"Microsoft Windows Hardware Compatibility Publisher\",\n \"McAfee, Inc.\",\n \"SecMaker AB\",\n \"HID Global Corporation\",\n \"HID Global\",\n \"Apple Inc.\",\n \"Citrix Systems, Inc.\",\n \"Dell Inc\",\n \"Hewlett-Packard Company\",\n \"Symantec Corporation\",\n \"National Instruments Corporation\",\n \"DigitalPersona, Inc.\",\n \"Novell, Inc.\",\n \"gemalto\",\n \"EasyAntiCheat Oy\",\n \"Entrust Datacard Corporation\",\n \"AuriStor, Inc.\",\n \"LogMeIn, Inc.\",\n \"VMware, Inc.\",\n \"Istituto Poligrafico e Zecca dello Stato S.p.A.\",\n \"Nubeva Technologies Ltd\",\n \"Micro Focus (US), Inc.\",\n \"Yubico AB\",\n \"GEMALTO SA\",\n \"Secure Endpoints, Inc.\",\n \"Sophos Ltd\",\n \"Morphisec Information Security 2014 Ltd\",\n \"Entrust, Inc.\",\n \"Nubeva Technologies Ltd\",\n \"Micro Focus (US), Inc.\",\n \"F5 Networks Inc\",\n \"Bit4id\",\n \"Thales DIS CPL USA, Inc.\",\n \"Micro Focus International plc\",\n \"HYPR Corp\",\n \"Intel(R) Software Development Products\",\n \"PGP Corporation\",\n \"Parallels International GmbH\",\n \"FrontRange Solutions Deutschland GmbH\",\n \"SecureLink, Inc.\",\n \"Tidexa OU\",\n \"Amazon Web Services, Inc.\",\n \"SentryBay Limited\",\n \"Audinate Pty Ltd\",\n \"CyberArk Software Ltd.\",\n \"McAfeeSysPrep\",\n \"NVIDIA Corporation PE Sign v2016\") and\n dll.code_signature.status : (\"trusted\", \"errorExpired\", \"errorCode_endpoint*\", \"errorChaining\")) and\n\n not dll.hash.sha256 :\n (\"811a03a5d7c03802676d2613d741be690b3461022ea925eb6b2651a5be740a4c\",\n \"1181542d9cfd63fb00c76242567446513e6773ea37db6211545629ba2ecf26a1\",\n \"ed6e735aa6233ed262f50f67585949712f1622751035db256811b4088c214ce3\",\n \"26be2e4383728eebe191c0ab19706188f0e9592add2e0bf86b37442083ae5e12\",\n \"9367e78b84ef30cf38ab27776605f2645e52e3f6e93369c674972b668a444faa\",\n \"d46cc934765c5ecd53867070f540e8d6f7701e834831c51c2b0552aba871921b\",\n \"0f77a3826d7a5cd0533990be0269d951a88a5c277bc47cff94553330b715ec61\",\n \"4aca034d3d85a9e9127b5d7a10882c2ef4c3e0daa3329ae2ac1d0797398695fb\",\n \"86031e69914d9d33c34c2f4ac4ae523cef855254d411f88ac26684265c981d95\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Azure Full Network Packet Capture Detected", + "description": "Identifies potential full network packet capture in Azure. Packet Capture is an Azure Network Watcher feature that can be used to inspect network traffic. This feature can potentially be abused to read sensitive data from unencrypted internal traffic.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 103, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Full Network Packet Capture may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Full Network Packet Capture from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1040", + "name": "Network Sniffing", + "reference": "https://attack.mitre.org/techniques/T1040/" + } + ] + } + ], + "id": "73453bdc-4189-4cf9-bad0-97698e31b3cb", + "rule_id": "3ad77ed4-4dcf-4c51-8bfc-e3f7ce316b2f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\n (\n MICROSOFT.NETWORK/*/STARTPACKETCAPTURE/ACTION or\n MICROSOFT.NETWORK/*/VPNCONNECTIONS/STARTPACKETCAPTURE/ACTION or\n MICROSOFT.NETWORK/*/PACKETCAPTURES/WRITE\n ) and\nevent.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Unusual Linux Network Port Activity", + "description": "Identifies unusual destination port activity that can indicate command-and-control, persistence mechanism, or data exfiltration activity. Rarely used destination port activity is generally unusual in Linux fleets, and can indicate unauthorized access or threat actor activity.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program or one that rarely uses the network could trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "f45fb3f1-28f2-4854-9009-43430b65d01c", + "rule_id": "3c7e32e6-6104-46d9-a06e-da0f8b5795a0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_linux_anomalous_network_port_activity" + ] + }, + { + "name": "Suspicious Execution via Windows Subsystem for Linux", + "description": "Detects Linux Bash commands from the the Windows Subsystem for Linux. Adversaries may enable and use WSL for Linux to avoid detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.f-secure.com/hunting-for-windows-subsystem-for-linux/", + "https://lolbas-project.github.io/lolbas/OtherMSBinaries/Wsl/", + "https://blog.qualys.com/vulnerabilities-threat-research/2022/03/22/implications-of-windows-subsystem-for-linux-for-adversaries-defenders-part-1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1202", + "name": "Indirect Command Execution", + "reference": "https://attack.mitre.org/techniques/T1202/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "96b441c5-b17c-401c-a153-57abddc1f5a1", + "rule_id": "3e0eeb75-16e8-4f2f-9826-62461ca128b7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type : \"start\" and\n (\n ((process.executable : \"?:\\\\Windows\\\\System32\\\\bash.exe\" or process.pe.original_file_name == \"Bash.exe\") and \n not process.command_line : (\"bash\", \"bash.exe\")) or \n process.executable : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Packages\\\\*\\\\rootfs\\\\usr\\\\bin\\\\bash\" or \n (process.parent.name : \"wsl.exe\" and process.parent.command_line : \"bash*\" and not process.name : \"wslhost.exe\") or \n (process.name : \"wsl.exe\" and process.args : (\"curl\", \"/etc/shadow\", \"/etc/passwd\", \"cat\",\"--system\", \"root\", \"-e\", \"--exec\", \"bash\", \"/mnt/c/*\"))\n ) and \n not process.parent.executable : (\"?:\\\\Program Files\\\\Docker\\\\*.exe\", \"?:\\\\Program Files (x86)\\\\Docker\\\\*.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Emond Child Process", + "description": "Identifies the execution of a suspicious child process of the Event Monitor Daemon (emond). Adversaries may abuse this service by writing a rule to execute commands when a defined event occurs, such as system start up or user authentication.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.xorrior.com/emond-persistence/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.014", + "name": "Emond", + "reference": "https://attack.mitre.org/techniques/T1546/014/" + } + ] + } + ] + } + ], + "id": "d0e9bbdd-7ee8-4165-b389-2eb5f9f78f59", + "rule_id": "3e3d15c6-1509-479a-b125-21718372157e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.parent.name : \"emond\" and\n process.name : (\n \"bash\",\n \"dash\",\n \"sh\",\n \"tcsh\",\n \"csh\",\n \"zsh\",\n \"ksh\",\n \"fish\",\n \"Python\",\n \"python*\",\n \"perl*\",\n \"php*\",\n \"osascript\",\n \"pwsh\",\n \"curl\",\n \"wget\",\n \"cp\",\n \"mv\",\n \"touch\",\n \"echo\",\n \"base64\",\n \"launchctl\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "EggShell Backdoor Execution", + "description": "Identifies the execution of and EggShell Backdoor. EggShell is a known post exploitation tool for macOS and Linux.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/neoneggplant/EggShell" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.006", + "name": "Python", + "reference": "https://attack.mitre.org/techniques/T1059/006/" + } + ] + } + ] + } + ], + "id": "0c1e9d64-04eb-420c-b57d-3d73348cbda1", + "rule_id": "41824afb-d68c-4d0e-bfee-474dac1fa56e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and event.type:(process_started or start) and process.name:espl and process.args:eyJkZWJ1ZyI6*\n", + "language": "kuery" + }, + { + "name": "Potential Hidden Local User Account Creation", + "description": "Identifies attempts to create a local account that will be hidden from the macOS logon window. This may indicate an attempt to evade user attention while maintaining persistence using a separate local account.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://support.apple.com/en-us/HT203998" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.003", + "name": "Local Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/003/" + } + ] + } + ] + } + ], + "id": "435b3bf0-a74f-44cc-a489-05a3ae94cdde", + "rule_id": "41b638a1-8ab6-4f8e-86d9-466317ef2db5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:dscl and process.args:(IsHidden and create and (true or 1 or yes))\n", + "language": "kuery" + }, + { + "name": "Process Creation via Secondary Logon", + "description": "Identifies process creation with alternate credentials. Adversaries may create a new process with a different token to escalate privileges and bypass access controls.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://attack.mitre.org/techniques/T1134/002/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/", + "subtechnique": [ + { + "id": "T1134.002", + "name": "Create Process with Token", + "reference": "https://attack.mitre.org/techniques/T1134/002/" + }, + { + "id": "T1134.003", + "name": "Make and Impersonate Token", + "reference": "https://attack.mitre.org/techniques/T1134/003/" + } + ] + } + ] + } + ], + "id": "68fa2d2b-87fa-4f1d-9eb4-b12315314cbf", + "rule_id": "42eeee3d-947f-46d3-a14d-7036b962c266", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.LogonProcessName", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetLogonId", + "type": "keyword", + "ecs": false + } + ], + "setup": "Audit events 4624 and 4688 are needed to trigger this rule.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "sequence by winlog.computer_name with maxspan=1m\n\n[authentication where event.action:\"logged-in\" and\n event.outcome == \"success\" and user.id : (\"S-1-5-21-*\", \"S-1-12-1-*\") and\n\n /* seclogon service */\n process.name == \"svchost.exe\" and\n winlog.event_data.LogonProcessName : \"seclogo*\" and source.ip == \"::1\" ] by winlog.event_data.TargetLogonId\n\n[process where event.type == \"start\"] by winlog.event_data.TargetLogonId\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Unusual Login Activity", + "description": "Identifies an unusually high number of authentication attempts.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Identity and Access Audit", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Security audits may trigger this alert. Conditions that generate bursts of failed logins, such as misconfigured applications or account lockouts could trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "ebc4b6d1-7730-4bba-af1d-c0b808f5dcd2", + "rule_id": "4330272b-9724-4bc6-a3ca-f1532b81e5c2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": "suspicious_login_activity" + }, + { + "name": "Unusual Windows Path Activity", + "description": "Identifies processes started from atypical folders in the file system, which might indicate malware execution or persistence mechanisms. In corporate Windows environments, software installation is centrally managed and it is unusual for programs to be executed from user or temporary directories. Processes executed from these locations can denote that a user downloaded software directly from the Internet or a malicious script or macro executed malware.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Persistence", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A new and unusual program or artifact download in the course of software upgrades, debugging, or troubleshooting could trigger this alert. Users downloading and running programs from unusual locations, such as temporary directories, browser caches, or profile paths could trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] + } + ], + "id": "78ac2ec9-bd9e-42a3-b50e-d06672c3b44d", + "rule_id": "445a342e-03fb-42d0-8656-0367eb2dead5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_windows_anomalous_path_activity" + ] + }, + { + "name": "Windows Event Logs Cleared", + "description": "Identifies attempts to clear Windows event log stores. This is often done by attackers in an attempt to evade detection or destroy forensic evidence on a system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Windows Event Logs Cleared\n\nWindows event logs are a fundamental data source for security monitoring, forensics, and incident response. Adversaries can tamper, clear, and delete this data to break SIEM detections, cover their tracks, and slow down incident response.\n\nThis rule looks for the occurrence of clear actions on the `security` event log.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Investigate the event logs prior to the action for suspicious behaviors that an attacker may be trying to cover up.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n - This activity is potentially done after the adversary achieves its objectives on the host. Ensure that previous actions, if any, are investigated accordingly with their response playbooks.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Anabella Cristaldi" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.001", + "name": "Clear Windows Event Logs", + "reference": "https://attack.mitre.org/techniques/T1070/001/" + } + ] + } + ] + } + ], + "id": "bbc60a41-024f-4835-9390-f0273719e690", + "rule_id": "45ac4800-840f-414c-b221-53dd36a5aaf7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.api", + "type": "keyword", + "ecs": false + } + ], + "setup": "", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.action:(\"audit-log-cleared\" or \"Log clear\") and winlog.api:\"wineventlog\"\n", + "language": "kuery" + }, + { + "name": "Unusual Process For a Linux Host", + "description": "Identifies rare processes that do not usually run on individual hosts, which can indicate execution of unauthorized services, malware, or persistence mechanisms. Processes are considered rare when they only run occasionally as compared with other processes running on the host.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Process For a Linux Host\n\nSearching for abnormal Linux processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.\n\nThis rule uses a machine learning job to detect a Linux process that is rare and unusual for an individual Linux host in your environment.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, and whether they are located in expected locations.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.\n- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.002", + "name": "Systemd Service", + "reference": "https://attack.mitre.org/techniques/T1543/002/" + } + ] + } + ] + } + ], + "id": "5903acfb-3841-4b0b-b44d-b232b5c01329", + "rule_id": "46f804f5-b289-43d6-a881-9387cf594f75", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_rare_process_by_host_linux" + ] + }, + { + "name": "Apple Script Execution followed by Network Connection", + "description": "Detects execution via the Apple script interpreter (osascript) followed by a network connection from the same process within a short time period. Adversaries may use malicious scripts for execution and command and control.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/index.html", + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.002", + "name": "AppleScript", + "reference": "https://attack.mitre.org/techniques/T1059/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + } + ], + "id": "c1c5e363-1140-4c52-b94d-2c8667aac582", + "rule_id": "47f76567-d58a-4fed-b32b-21f571e28910", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=30s\n [process where host.os.type == \"macos\" and event.type == \"start\" and process.name == \"osascript\"]\n [network where host.os.type == \"macos\" and event.type != \"end\" and process.name == \"osascript\" and destination.ip != \"::1\" and\n not cidrmatch(destination.ip,\n \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\", \"192.0.0.0/29\", \"192.0.0.8/32\",\n \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\",\n \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\", \"FE80::/10\", \"FF00::/8\")]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Unexpected Child Process of macOS Screensaver Engine", + "description": "Identifies when a child process is spawned by the screensaver engine process, which is consistent with an attacker's malicious payload being executed after the screensaver activated on the endpoint. An adversary can maintain persistence on a macOS endpoint by creating a malicious screensaver (.saver) file and configuring the screensaver plist file to execute code each time the screensaver is activated.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n- Analyze the descendant processes of the ScreenSaverEngine process for malicious code and suspicious behavior such\nas a download of a payload from a server.\n- Review the installed and activated screensaver on the host. Triage the screensaver (.saver) file that was triggered to\nidentify whether the file is malicious or not.", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://posts.specterops.io/saving-your-access-d562bf5bf90b", + "https://github.com/D00MFist/PersistentJXA" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.002", + "name": "Screensaver", + "reference": "https://attack.mitre.org/techniques/T1546/002/" + } + ] + } + ] + } + ], + "id": "165d86c2-563f-4706-a10c-6b60332b5b55", + "rule_id": "48d7f54d-c29e-4430-93a9-9db6b5892270", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type == \"start\" and process.parent.name == \"ScreenSaverEngine\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Persistence via Periodic Tasks", + "description": "Identifies the creation or modification of the default configuration for periodic tasks. Adversaries may abuse periodic tasks to execute malicious code or maintain persistence.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://opensource.apple.com/source/crontabs/crontabs-13/private/etc/defaults/periodic.conf.auto.html", + "https://www.oreilly.com/library/view/mac-os-x/0596003706/re328.html", + "https://github.com/D00MFist/PersistentJXA/blob/master/PeriodicPersist.js" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.003", + "name": "Cron", + "reference": "https://attack.mitre.org/techniques/T1053/003/" + } + ] + } + ] + } + ], + "id": "f630d15e-58d8-419b-9749-237ee1a3049f", + "rule_id": "48ec9452-e1fd-4513-a376-10a1a26d2c83", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:file and host.os.type:macos and not event.type:\"deletion\" and\n file.path:(/private/etc/periodic/* or /private/etc/defaults/periodic.conf or /private/etc/periodic.conf)\n", + "language": "kuery" + }, + { + "name": "Application Removed from Blocklist in Google Workspace", + "description": "Google Workspace administrators may be aware of malicious applications within the Google marketplace and block these applications for user security purposes. An adversary, with administrative privileges, may remove this application from the explicit block list to allow distribution of the application amongst users. This may also indicate the unauthorized use of an application that had been previously blocked before by a user with admin privileges.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Application Removed from Blocklist in Google Workspace\n\nGoogle Workspace Marketplace is an online store for free and paid web applications that work with Google Workspace services and third-party software. Listed applications are based on Google APIs or Google Apps Script and created by both Google and third-party developers.\n\nMarketplace applications require access to specific Google Workspace resources. Individual users with the appropriate permissions can install applications in their Google Workspace domain. Administrators have additional permissions that allow them to install applications for an entire Google Workspace domain. Consent screens typically display permissions and privileges the user needs to install an application. As a result, malicious Marketplace applications may require more permissions than necessary or have malicious intent.\n\nGoogle clearly states that they are not responsible for any Marketplace product that originates from a source that isn't Google.\n\nThis rule identifies a Marketplace blocklist update that consists of a Google Workspace account with administrative privileges manually removing a previously blocked application.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- This rule relies on data from `google_workspace.admin`, thus indicating the associated user has administrative privileges to the Marketplace.\n- With access to the Google Workspace admin console, visit the `Security > Investigation` tool with filters for the user email and event is `Assign Role` or `Update Role` to determine if new cloud roles were recently updated.\n- After identifying the involved user account, review other potentially related events within the last 48 hours.\n- Re-assess the permissions and reviews of the Marketplace applications to determine if they violate organizational policies or introduce unexpected risks.\n- With access to the Google Workspace admin console, determine if the application was installed domain-wide or individually by visiting `Apps > Google Workspace Marketplace Apps`.\n\n### False positive analysis\n\n- Google Workspace administrators might intentionally remove an application from the blocklist due to a re-assessment or a domain-wide required need for the application.\n- Identify the user account associated with this action and assess their administrative privileges with Google Workspace Marketplace.\n- Contact the user to verify that they intentionally removed the application from the blocklist and their reasoning.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 106, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Configuration Audit", + "Resources: Investigation Guide", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Applications can be added and removed from blocklists by Google Workspace administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://support.google.com/a/answer/6328701?hl=en#" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "09590899-c372-47c8-af24-0725d4d8a0ef", + "rule_id": "495e5f2e-2480-11ed-bea8-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.admin.application.name", + "type": "keyword", + "ecs": false + }, + { + "name": "google_workspace.admin.new_value", + "type": "keyword", + "ecs": false + }, + { + "name": "google_workspace.admin.old_value", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:\"google_workspace.admin\" and event.category:\"iam\" and event.type:\"change\" and\n event.action:\"CHANGE_APPLICATION_SETTING\" and\n google_workspace.admin.application.name:\"Google Workspace Marketplace\" and\n google_workspace.admin.old_value: *allowed*false* and google_workspace.admin.new_value: *allowed*true*\n", + "language": "kuery" + }, + { + "name": "Process Discovery Using Built-in Tools", + "description": "This rule identifies the execution of commands that can be used to enumerate running processes. Adversaries may enumerate processes to identify installed applications and security solutions.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1057", + "name": "Process Discovery", + "reference": "https://attack.mitre.org/techniques/T1057/" + } + ] + } + ], + "id": "b0e5676f-b378-4db9-bb24-af3dd31319c1", + "rule_id": "4982ac3e-d0ee-4818-b95d-d9522d689259", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n process.name :(\"PsList.exe\", \"qprocess.exe\") or \n (process.name : \"powershell.exe\" and process.args : (\"*get-process*\", \"*Win32_Process*\")) or \n (process.name : \"wmic.exe\" and process.args : (\"process\", \"*Win32_Process*\")) or\n (process.name : \"tasklist.exe\" and not process.args : (\"pid eq*\")) or\n (process.name : \"query.exe\" and process.args : \"process\")\n ) and not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Unauthorized Access via Wildcard Injection Detected", + "description": "This rule monitors for the execution of the \"chown\" and \"chmod\" commands with command line flags that could indicate a wildcard injection attack. Linux wildcard injection is a type of security vulnerability where attackers manipulate commands or input containing wildcards (e.g., *, ?, []) to execute unintended operations or access sensitive data by tricking the system into interpreting the wildcard characters in unexpected ways.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.exploit-db.com/papers/33930" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.008", + "name": "/etc/passwd and /etc/shadow", + "reference": "https://attack.mitre.org/techniques/T1003/008/" + } + ] + } + ] + } + ], + "id": "29893c51-68fe-43cb-b35e-e1856f878c5e", + "rule_id": "4a99ac6f-9a54-4ba5-a64f-6eb65695841b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and event.type == \"start\" and \nprocess.name in (\"chown\", \"chmod\") and process.args == \"-R\" and process.args : \"--reference=*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Disable Windows Firewall Rules via Netsh", + "description": "Identifies use of the netsh.exe to disable or weaken the local firewall. Attackers will use this command line tool to disable the firewall during troubleshooting or to enable network mobility.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Disable Windows Firewall Rules via Netsh\n\nThe Windows Defender Firewall is a native component which provides host-based, two-way network traffic filtering for a device, and blocks unauthorized network traffic flowing into or out of the local device.\n\nAttackers can disable the Windows firewall or its rules to enable lateral movement and command and control activity.\n\nThis rule identifies patterns related to disabling the Windows firewall or its rules using the `netsh.exe` utility.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the user to check if they are aware of the operation.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Check whether the user is an administrator and is legitimately performing troubleshooting.\n- In case of an allowed benign true positive (B-TP), assess adding rules to allow needed traffic and re-enable the firewall.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.004", + "name": "Disable or Modify System Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/004/" + } + ] + } + ] + } + ], + "id": "6a7e0b12-5935-4e7c-bd9b-b271ca88ed89", + "rule_id": "4b438734-3793-4fda-bd42-ceeada0be8f9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"netsh.exe\" and\n (\n (process.args : \"disable\" and process.args : \"firewall\" and process.args : \"set\") or\n (process.args : \"advfirewall\" and process.args : \"off\" and process.args : \"state\")\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Container Workload Protection", + "description": "Generates a detection alert each time a 'Container Workload Protection' alert is received. Enabling this rule allows you to immediately begin triaging and investigating these alerts.", + "risk_score": 47, + "severity": "medium", + "rule_name_override": "message", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container" + ], + "enabled": true, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-10m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [], + "id": "e9244e0e-f156-4851-817f-30de0dbedcb5", + "rule_id": "4b4e9c99-27ea-4621-95c8-82341bc6e512", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "logs-cloud_defend.alerts-*" + ], + "query": "event.kind:alert and event.module:cloud_defend\n", + "language": "kuery" + }, + { + "name": "Unusual Process Execution Path - Alternate Data Stream", + "description": "Identifies processes running from an Alternate Data Stream. This is uncommon for legitimate processes and sometimes done by adversaries to hide malware.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1564", + "name": "Hide Artifacts", + "reference": "https://attack.mitre.org/techniques/T1564/", + "subtechnique": [ + { + "id": "T1564.004", + "name": "NTFS File Attributes", + "reference": "https://attack.mitre.org/techniques/T1564/004/" + } + ] + } + ] + } + ], + "id": "fc21c647-81f8-49ac-806b-b63449f2849d", + "rule_id": "4bd1c1af-79d4-4d37-9efa-6e0240640242", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.args : \"?:\\\\*:*\" and process.args_count == 1\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "PowerShell Share Enumeration Script", + "description": "Detects scripts that contain PowerShell functions, structures, or Windows API functions related to windows share enumeration activities. Attackers, mainly ransomware groups, commonly identify and inspect network shares, looking for critical information for encryption and/or exfiltration.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Share Enumeration Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can use PowerShell to enumerate shares to search for sensitive data like documents, scripts, and other kinds of valuable data for encryption, exfiltration, and lateral movement.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Check for additional PowerShell and command line logs that indicate that imported functions were run.\n - Evaluate which information was potentially mapped and accessed by the attacker.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Tactic: Collection", + "Tactic: Execution", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.advintel.io/post/hunting-for-corporate-insurance-policies-indicators-of-ransom-exfiltrations", + "https://thedfirreport.com/2022/04/04/stolen-images-campaign-ends-in-conti-ransomware/", + "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1135", + "name": "Network Share Discovery", + "reference": "https://attack.mitre.org/techniques/T1135/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + }, + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1039", + "name": "Data from Network Shared Drive", + "reference": "https://attack.mitre.org/techniques/T1039/" + } + ] + } + ], + "id": "159a03c4-b1bc-4eb7-bf1f-d6082f45e63f", + "rule_id": "4c59cff1-b78a-41b8-a9f1-4231984d1fb6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be configured (Enable).\n\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text:(\n \"Invoke-ShareFinder\" or\n \"Invoke-ShareFinderThreaded\" or\n (\n \"shi1_netname\" and\n \"shi1_remark\"\n ) or\n (\n \"NetShareEnum\" and\n \"NetApiBufferFree\"\n )\n ) and not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "Attempt to Disable Gatekeeper", + "description": "Detects attempts to disable Gatekeeper on macOS. Gatekeeper is a security feature that's designed to ensure that only trusted software is run. Adversaries may attempt to disable Gatekeeper before executing malicious code.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://support.apple.com/en-us/HT202491", + "https://community.carbonblack.com/t5/Threat-Advisories-Documents/TAU-TIN-Shlayer-OSX/ta-p/68397" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1553", + "name": "Subvert Trust Controls", + "reference": "https://attack.mitre.org/techniques/T1553/" + } + ] + } + ], + "id": "3cb3c164-8926-4f31-b200-6a71360201bb", + "rule_id": "4da13d6e-904f-4636-81d8-6ab14b4e6ae9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.args:(spctl and \"--master-disable\")\n", + "language": "kuery" + }, + { + "name": "Windows System Information Discovery", + "description": "Detects the execution of commands used to discover information about the system, which attackers may use after compromising a system to gain situational awareness.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend", + "Data Source: Elastic Endgame" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "7dd61fc0-b22b-423f-b5ea-6d486895fb5d", + "rule_id": "51176ed2-2d90-49f2-9f3d-17196428b169", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (\n process.name : \"cmd.exe\" and process.args : \"ver*\" and not\n process.parent.executable : (\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Keybase\\\\upd.exe\",\n \"?:\\\\Users\\\\*\\\\python*.exe\"\n )\n ) or \n process.name : (\"systeminfo.exe\", \"hostname.exe\") or \n (process.name : \"wmic.exe\" and process.args : \"os\" and process.args : \"get\")\n) and not\nprocess.parent.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\ProgramData\\\\*\"\n) and not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Successful Linux RDP Brute Force Attack Detected", + "description": "An RDP (Remote Desktop Protocol) brute force attack involves an attacker repeatedly attempting various username and password combinations to gain unauthorized access to a remote computer via RDP, and if successful, the potential impact can include unauthorized control over the compromised system, data theft, or the ability to launch further attacks within the network, jeopardizing the security and confidentiality of the targeted system and potentially compromising the entire network infrastructure. This rule identifies multiple consecutive authentication failures targeting a specific user account within a short time interval, followed by a successful authentication.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/", + "subtechnique": [ + { + "id": "T1110.001", + "name": "Password Guessing", + "reference": "https://attack.mitre.org/techniques/T1110/001/" + }, + { + "id": "T1110.003", + "name": "Password Spraying", + "reference": "https://attack.mitre.org/techniques/T1110/003/" + } + ] + } + ] + } + ], + "id": "48e672d9-4272-4bb8-bd77-9d20a7ef3646", + "rule_id": "521fbe5c-a78d-4b6b-a323-f978b0e4c4c0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0", + "integration": "auditd" + } + ], + "required_fields": [ + { + "name": "auditd.data.terminal", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "related.user", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Auditbeat integration, or Auditd Manager integration.\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n### Auditd Manager Integration Setup\nThe Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.\nAuditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.\n\n#### The following steps should be executed in order to add the Elastic Agent System integration \"auditd_manager\" on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Auditd Manager and select the integration to see more details about it.\n- Click Add Auditd Manager.\n- Configure the integration name and optionally add a description.\n- Review optional and advanced settings accordingly.\n- Add the newly installed `auditd manager` to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.\n- Click Save and Continue.\n- For more details on the integeration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).\n\n#### Rule Specific Setup Note\nAuditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.\nHowever, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n- For this detection rule no additional audit rules are required to be added to the integration.\n\n", + "type": "eql", + "query": "sequence by host.id, related.user with maxspan=5s\n [authentication where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n event.action == \"authenticated\" and auditd.data.terminal : \"*rdp*\" and event.outcome == \"failure\"] with runs=10\n [authentication where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n event.action == \"authenticated\" and auditd.data.terminal : \"*rdp*\" and event.outcome == \"success\"] | tail 1\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-auditd_manager.auditd-*" + ] + }, + { + "name": "Unusual Network Connection via RunDLL32", + "description": "Identifies unusual instances of rundll32.exe making outbound network connections. This may indicate adversarial Command and Control activity.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Network Connection via RunDLL32\n\nRunDLL32 is a built-in Windows utility and also a vital component used by the operating system itself. The functionality provided by RunDLL32 to execute Dynamic Link Libraries (DLLs) is widely abused by attackers, because it makes it hard to differentiate malicious activity from normal operations.\n\nThis rule looks for external network connections established using RunDLL32 when the utility is being executed with no arguments, which can potentially indicate command and control activity.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the target host that RunDLL32 is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Identify the target computer and its role in the IT environment.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Command and Control", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml", + "https://redcanary.com/threat-detection-report/techniques/rundll32/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.011", + "name": "Rundll32", + "reference": "https://attack.mitre.org/techniques/T1218/011/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/", + "subtechnique": [ + { + "id": "T1071.001", + "name": "Web Protocols", + "reference": "https://attack.mitre.org/techniques/T1071/001/" + } + ] + } + ] + } + ], + "id": "af6f2938-34c1-41d9-b686-43241ff99ff4", + "rule_id": "52aaab7b-b51c-441a-89ce-4387b3aea886", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=1m\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"rundll32.exe\" and process.args_count == 1]\n [network where host.os.type == \"windows\" and process.name : \"rundll32.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Unusual Linux Network Activity", + "description": "Identifies Linux processes that do not usually use the network but have unexpected network activity, which can indicate command-and-control, lateral movement, persistence, or data exfiltration activity. A process with unusual network activity can denote process exploitation or injection, where the process is used to run persistence mechanisms that allow a malicious actor remote access or control of the host, data exfiltration, and execution of unauthorized network applications.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Network Activity\nDetection alerts from this rule indicate the presence of network activity from a Linux process for which network activity is rare and unusual. Here are some possible avenues of investigation:\n- Consider the IP addresses and ports. Are these used by normal but infrequent network workflows? Are they expected or unexpected?\n- If the destination IP address is remote or external, does it associate with an expected domain, organization or geography? Note: avoid interacting directly with suspected malicious IP addresses.\n- Consider the user as identified by the username field. Is this network activity part of an expected workflow for the user who ran the program?\n- Examine the history of execution. If this process only manifested recently, it might be part of a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business or maintenance process.\n- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks it is performing.", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "2f4f57c9-10ee-4b49-91bb-5a08268095a4", + "rule_id": "52afbdc5-db15-485e-bc24-f5707f820c4b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_linux_anomalous_network_activity" + ] + }, + { + "name": "Suspicious CronTab Creation or Modification", + "description": "Identifies attempts to create or modify a crontab via a process that is not crontab (i.e python, osascript, etc.). This activity should not be highly prevalent and could indicate the use of cron as a persistence mechanism by a threat actor.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://taomm.org/PDFs/vol1/CH%200x02%20Persistence.pdf", + "https://theevilbit.github.io/beyond/beyond_0004/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.003", + "name": "Cron", + "reference": "https://attack.mitre.org/techniques/T1053/003/" + } + ] + } + ] + } + ], + "id": "904a6c05-5dd6-4d76-9dd4-45bf965bcafe", + "rule_id": "530178da-92ea-43ce-94c2-8877a826783d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"macos\" and event.type != \"deletion\" and process.name != null and\n file.path : \"/private/var/at/tabs/*\" and not process.executable == \"/usr/bin/crontab\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Network Logon Provider Registry Modification", + "description": "Identifies the modification of the network logon provider registry. Adversaries may register a rogue network logon provider module for persistence and/or credential access via intercepting the authentication credentials in clear text during user logon.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Authorized third party network logon providers." + ], + "references": [ + "https://github.com/gtworek/PSBits/tree/master/PasswordStealing/NPPSpy", + "https://docs.microsoft.com/en-us/windows/win32/api/npapi/nf-npapi-nplogonnotify" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1556", + "name": "Modify Authentication Process", + "reference": "https://attack.mitre.org/techniques/T1556/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/" + } + ] + } + ], + "id": "b271c9cf-1385-4efa-804f-4a866e9afb8e", + "rule_id": "54c3d186-0461-4dc3-9b33-2dc5c7473936", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and registry.data.strings != null and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\NetworkProvider\\\\ProviderPath\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\NetworkProvider\\\\ProviderPath\"\n ) and\n /* Excluding default NetworkProviders RDPNP, LanmanWorkstation and webclient. */\n not ( user.id : \"S-1-5-18\" and\n registry.data.strings in\n (\"%SystemRoot%\\\\System32\\\\ntlanman.dll\",\n \"%SystemRoot%\\\\System32\\\\drprov.dll\",\n \"%SystemRoot%\\\\System32\\\\davclnt.dll\")\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Windows Service Installed via an Unusual Client", + "description": "Identifies the creation of a Windows service by an unusual client process. Services may be created with administrator privileges but are executed under SYSTEM privileges, so an adversary may also use a service to escalate privileges from administrator to SYSTEM.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.x86matthew.com/view_post?id=create_svc_rpc", + "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4697", + "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0100_windows_audit_security_system_extension.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + } + ], + "id": "47e3ce69-7a25-48fb-a251-221e4d0be865", + "rule_id": "55c2bf58-2a39-4c58-a384-c8b1978153c2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.ClientProcessId", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.ParentProcessId", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'Audit Security System Extension' logging policy must be configured for (Success)\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nSystem >\nAudit Security System Extension (Success)\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.action:\"service-installed\" and\n (winlog.event_data.ClientProcessId:\"0\" or winlog.event_data.ParentProcessId:\"0\")\n", + "language": "kuery" + }, + { + "name": "Potential Admin Group Account Addition", + "description": "Identifies attempts to add an account to the admin group via the command line. This could be an indication of privilege escalation activity.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://managingosx.wordpress.com/2010/01/14/add-a-user-to-the-admin-group-via-command-line-3-0/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.003", + "name": "Local Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/003/" + } + ] + } + ] + } + ], + "id": "5eb8da04-028e-4d24-b405-11b437944aaa", + "rule_id": "565c2b44-7a21-4818-955f-8d4737967d2e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:(dscl or dseditgroup) and process.args:((\"/Groups/admin\" or admin) and (\"-a\" or \"-append\"))\n", + "language": "kuery" + }, + { + "name": "Dumping of Keychain Content via Security Command", + "description": "Adversaries may dump the content of the keychain storage data from a system to acquire credentials. Keychains are the built-in way for macOS to keep track of users' passwords and credentials for many services and features, including Wi-Fi and website passwords, secure notes, certificates, and Kerberos.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://ss64.com/osx/security.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/", + "subtechnique": [ + { + "id": "T1555.001", + "name": "Keychain", + "reference": "https://attack.mitre.org/techniques/T1555/001/" + } + ] + } + ] + } + ], + "id": "ab7c74cb-d263-4178-88d1-f19eb0496729", + "rule_id": "565d6ca5-75ba-4c82-9b13-add25353471c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.args : \"dump-keychain\" and process.args : \"-d\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Remote SSH Login Enabled via systemsetup Command", + "description": "Detects use of the systemsetup command to enable remote SSH Login.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://documents.trendmicro.com/assets/pdf/XCSSET_Technical_Brief.pdf", + "https://ss64.com/osx/systemsetup.html", + "https://support.apple.com/guide/remote-desktop/about-systemsetup-apd95406b8d/mac" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.004", + "name": "SSH", + "reference": "https://attack.mitre.org/techniques/T1021/004/" + } + ] + } + ] + } + ], + "id": "902dbd9a-b275-4db7-920a-ddea11124bb6", + "rule_id": "5ae4e6f8-d1bf-40fa-96ba-e29645e1e4dc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:systemsetup and\n process.args:(\"-setremotelogin\" and on) and\n not process.parent.executable : /usr/local/jamf/bin/jamf\n", + "language": "kuery" + }, + { + "name": "SUID/SGUID Enumeration Detected", + "description": "This rule monitors for the usage of the \"find\" command in conjunction with SUID and SGUID permission arguments. SUID (Set User ID) and SGID (Set Group ID) are special permissions in Linux that allow a program to execute with the privileges of the file owner or group, respectively, rather than the privileges of the user running the program. In case an attacker is able to enumerate and find a binary that is misconfigured, they might be able to leverage this misconfiguration to escalate privileges by exploiting vulnerabilities or built-in features in the privileged program.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1083", + "name": "File and Directory Discovery", + "reference": "https://attack.mitre.org/techniques/T1083/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.001", + "name": "Setuid and Setgid", + "reference": "https://attack.mitre.org/techniques/T1548/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "id": "9001b4a7-47c0-48bd-a45f-1dc2a9751583", + "rule_id": "5b06a27f-ad72-4499-91db-0c69667bffa5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "group.Ext.real.id", + "type": "unknown", + "ecs": false + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.Ext.real.id", + "type": "unknown", + "ecs": false + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and \nprocess.name == \"find\" and process.args : \"-perm\" and process.args : (\n \"/6000\", \"-6000\", \"/4000\", \"-4000\", \"/2000\", \"-2000\", \"/u=s\", \"-u=s\", \"/g=s\", \"-g=s\", \"/u=s,g=s\", \"/g=s,u=s\"\n) and not (\n user.Ext.real.id == \"0\" or group.Ext.real.id == \"0\" or process.args_count >= 12 or \n (process.args : \"/usr/bin/pkexec\" and process.args : \"-xdev\" and process.args_count == 7)\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious PrintSpooler Service Executable File Creation", + "description": "Detects attempts to exploit privilege escalation vulnerabilities related to the Print Spooler service. For more information refer to the following CVE's - CVE-2020-1048, CVE-2020-1337 and CVE-2020-1300 and verify that the impacted system is patched.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://voidsec.com/cve-2020-1337-printdemon-is-dead-long-live-printdemon/", + "https://www.thezdi.com/blog/2020/7/8/cve-2020-1300-remote-code-execution-through-microsoft-windows-cab-files" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "8ccc129d-f4ff-4048-ac47-982acc361628", + "rule_id": "5bb4a95d-5a08-48eb-80db-4c3a63ec78a8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n process.name : \"spoolsv.exe\" and file.extension : \"dll\" and\n file.path : (\"?:\\\\Windows\\\\System32\\\\*\", \"?:\\\\Windows\\\\SysWOW64\\\\*\") and\n not file.path :\n (\"?:\\\\WINDOWS\\\\SysWOW64\\\\PrintConfig.dll\",\n \"?:\\\\WINDOWS\\\\system32\\\\x5lrs.dll\",\n \"?:\\\\WINDOWS\\\\sysWOW64\\\\x5lrs.dll\",\n \"?:\\\\WINDOWS\\\\system32\\\\PrintConfig.dll\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Unusual Linux Process Discovery Activity", + "description": "Looks for commands related to system process discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used by a threat actor to engage in system process discovery in order to increase their understanding of software applications running on a target host or network. This may be a precursor to selection of a persistence mechanism or a method of privilege elevation.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Discovery" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon user command activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1057", + "name": "Process Discovery", + "reference": "https://attack.mitre.org/techniques/T1057/" + } + ] + } + ], + "id": "769496f2-683e-4856-9c4f-08f75f7f8a30", + "rule_id": "5c983105-4681-46c3-9890-0c66d05e776b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_linux_system_process_discovery" + ] + }, + { + "name": "User Added to Privileged Group", + "description": "Identifies a user being added to a privileged group in Active Directory. Privileged accounts and groups in Active Directory are those to which powerful rights, privileges, and permissions are granted that allow them to perform nearly any action in Active Directory and on domain-joined systems.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating User Added to Privileged Group in Active Directory\n\nPrivileged accounts and groups in Active Directory are those to which powerful rights, privileges, and permissions are granted that allow them to perform nearly any action in Active Directory and on domain-joined systems.\n\nAttackers can add users to privileged groups to maintain a level of access if their other privileged accounts are uncovered by the security team. This allows them to keep operating after the security team discovers abused accounts.\n\nThis rule monitors events related to a user being added to a privileged group.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should manage members of this group.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- This attack abuses a legitimate Active Directory mechanism, so it is important to determine whether the activity is legitimate, if the administrator is authorized to perform this operation, and if there is a need to grant the account this level of privilege.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If the admin is not aware of the operation, activate your Active Directory incident response plan.\n- If the user does not need the administrator privileges, remove the account from the privileged group.\n- Review the privileges of the administrator account that performed the action.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring", + "Data Source: Active Directory" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Skoetting" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "921b4552-541a-40fd-928a-2155e56f408a", + "rule_id": "5cd8e1f7-0050-4afc-b2df-904e40b2f5ae", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "group.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.api", + "type": "keyword", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "iam where winlog.api:\"wineventlog\" and event.action == \"added-member-to-group\" and\n group.name : (\"Admin*\",\n \"Local Administrators\",\n \"Domain Admins\",\n \"Enterprise Admins\",\n \"Backup Admins\",\n \"Schema Admins\",\n \"DnsAdmins\",\n \"Exchange Organization Administrators\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Persistence via Login or Logout Hook", + "description": "Identifies use of the Defaults command to install a login or logoff hook in MacOS. An adversary may abuse this capability to establish persistence in an environment by inserting code to be executed at login or logout.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.virusbulletin.com/uploads/pdf/conference_slides/2014/Wardle-VB2014.pdf", + "https://www.manpagez.com/man/1/defaults/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1037", + "name": "Boot or Logon Initialization Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/" + } + ] + } + ], + "id": "226d2499-cad6-4c87-93ba-2a7de47b2484", + "rule_id": "5d0265bf-dea9-41a9-92ad-48a8dcd05080", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type == \"start\" and\n process.name == \"defaults\" and process.args == \"write\" and process.args : (\"LoginHook\", \"LogoutHook\") and\n not process.args :\n (\n \"Support/JAMF/ManagementFrameworkScripts/logouthook.sh\",\n \"Support/JAMF/ManagementFrameworkScripts/loginhook.sh\",\n \"/Library/Application Support/JAMF/ManagementFrameworkScripts/logouthook.sh\",\n \"/Library/Application Support/JAMF/ManagementFrameworkScripts/loginhook.sh\"\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Automator Workflows Execution", + "description": "Identifies the execution of the Automator Workflows process followed by a network connection from it's XPC service. Adversaries may drop a custom workflow template that hosts malicious JavaScript for Automation (JXA) code as an alternative to using osascript.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://posts.specterops.io/persistent-jxa-66e1c3cd1cf5" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "3f951d43-8ab2-4513-90ff-361587ed945b", + "rule_id": "5d9f8cfc-0d03-443e-a167-2b0597ce0965", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=30s\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name == \"automator\"]\n [network where host.os.type == \"macos\" and process.name:\"com.apple.automator.runner\"]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Google Workspace 2SV Policy Disabled", + "description": "Google Workspace admins may setup 2-step verification (2SV) to add an extra layer of security to user accounts by asking users to verify their identity when they use login credentials. Admins have the ability to enforce 2SV from the admin console as well as the methods acceptable for verification and enrollment period. 2SV requires enablement on admin accounts prior to it being enabled for users within organization units. Adversaries may disable 2SV to lower the security requirements to access a valid account.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace 2SV Policy Disabled\n\nGoogle Workspace administrators manage password policies to enforce password requirements for an organization's compliance needs. Administrators have the capability to set restrictions on password length, reset frequencies, reuse capability, expiration, and much more. Google Workspace also allows multi-factor authentication (MFA) and 2-step verification (2SV) for authentication. 2SV allows users to verify their identity using security keys, Google prompt, authentication codes, text messages, and more.\n\n2SV adds an extra authentication layer for Google Workspace users to verify their identity. If 2SV or MFA aren't implemented, users only authenticate with their user name and password credentials. This authentication method has often been compromised and can be susceptible to credential access techniques when weak password policies are used.\n\nThis rule detects when a 2SV policy is disabled in Google Workspace.\n\n#### Possible investigation steps\n\n- Identify the associated user account(s) by reviewing `user.name` or `source.user.email` in the alert.\n- Identify what password setting was created or adjusted by reviewing `google_workspace.admin.setting.name`.\n- Review if a password setting was enabled or disabled by reviewing `google_workspace.admin.new_value` and `google_workspace.admin.old_value`.\n- After identifying the involved user account, verify administrative privileges are scoped properly.\n- Filter `event.dataset` for `google_workspace.login` and aggregate by `user.name`, `event.action`.\n - The `google_workspace.login.challenge_method` field can be used to identify the challenge method that was used for failed and successful logins.\n\n### False positive analysis\n\n- After finding the user account that updated the password policy, verify whether the action was intentional.\n- Verify whether the user should have Google Workspace administrative privileges that allow them to modify password policies.\n- Review organizational units or groups the role may have been added to and ensure its privileges are properly aligned.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 106, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Configuration Audit", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Administrators may remove 2-step verification (2SV) temporarily for testing or during maintenance. If 2SV was previously enabled, it is not common to disable this policy for extended periods of time." + ], + "references": [ + "https://support.google.com/a/answer/9176657?hl=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1556", + "name": "Modify Authentication Process", + "reference": "https://attack.mitre.org/techniques/T1556/" + } + ] + } + ], + "id": "97cadb7d-bc03-43e3-8210-7215eab6a5fd", + "rule_id": "5e161522-2545-11ed-ac47-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:\"google_workspace.login\" and event.action:\"2sv_disable\"\n", + "language": "kuery" + }, + { + "name": "Unusual Process Network Connection", + "description": "Identifies network activity from unexpected system applications. This may indicate adversarial activity as these applications are often leveraged by adversaries to execute code and evade detection.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Process Network Connection\n\nThis rule identifies network activity from unexpected system utilities and applications. These applications are commonly abused by attackers to execute code, evade detections, and bypass security protections.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the target host that the process is communicating with.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/" + } + ] + } + ], + "id": "e8d7d423-f07e-4598-894e-d10e8e3d6bc6", + "rule_id": "610949a1-312f-4e04-bb55-3a79b8c95267", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and (process.name : \"Microsoft.Workflow.Compiler.exe\" or\n process.name : \"bginfo.exe\" or\n process.name : \"cdb.exe\" or\n process.name : \"cmstp.exe\" or\n process.name : \"csi.exe\" or\n process.name : \"dnx.exe\" or\n process.name : \"fsi.exe\" or\n process.name : \"ieexec.exe\" or\n process.name : \"iexpress.exe\" or\n process.name : \"odbcconf.exe\" or\n process.name : \"rcsi.exe\" or\n process.name : \"xwizard.exe\") and\n event.type == \"start\"]\n [network where host.os.type == \"windows\" and (process.name : \"Microsoft.Workflow.Compiler.exe\" or\n process.name : \"bginfo.exe\" or\n process.name : \"cdb.exe\" or\n process.name : \"cmstp.exe\" or\n process.name : \"csi.exe\" or\n process.name : \"dnx.exe\" or\n process.name : \"fsi.exe\" or\n process.name : \"ieexec.exe\" or\n process.name : \"iexpress.exe\" or\n process.name : \"odbcconf.exe\" or\n process.name : \"rcsi.exe\" or\n process.name : \"xwizard.exe\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Incoming DCOM Lateral Movement via MSHTA", + "description": "Identifies the use of Distributed Component Object Model (DCOM) to execute commands from a remote host, which are launched via the HTA Application COM Object. This behavior may indicate an attacker abusing a DCOM application to move laterally while attempting to evade detection.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://codewhitesec.blogspot.com/2018/07/lethalhta.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.003", + "name": "Distributed Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1021/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.005", + "name": "Mshta", + "reference": "https://attack.mitre.org/techniques/T1218/005/" + } + ] + } + ] + } + ], + "id": "c3bf8a44-9255-4ddc-8fc0-a2e08353d100", + "rule_id": "622ecb68-fa81-4601-90b5-f8cd661e4520", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "source.port", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=1m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"mshta.exe\" and process.args : \"-Embedding\"\n ] by host.id, process.entity_id\n [network where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"mshta.exe\" and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.port > 49151 and destination.port > 49151 and source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ] by host.id, process.entity_id\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Account Configured with Never-Expiring Password", + "description": "Detects the creation and modification of an account with the \"Don't Expire Password\" option Enabled. Attackers can abuse this misconfiguration to persist in the domain and maintain long-term access using compromised accounts with this property.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Account Configured with Never-Expiring Password\n\nActive Directory provides a setting that prevents users' passwords from expiring. Enabling this setting is bad practice and can expose environments to vulnerabilities that weaken security posture, especially when these accounts are privileged.\n\nThe setting is usually configured so a user account can act as a service account. Attackers can abuse these accounts to persist in the domain and maintain long-term access using compromised accounts with a never-expiring password set.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/source host during the past 48 hours.\n- Inspect the account for suspicious or abnormal behaviors in the alert timeframe.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n- Using user accounts as service accounts is a bad security practice and should not be allowed in the domain. The security team should map and monitor potential benign true positives (B-TPs), especially if the account is privileged. For cases in which user accounts cannot be avoided, Microsoft provides the Group Managed Service Accounts (gMSA) feature, which ensures that the account password is robust and changed regularly and automatically.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Reset the password of the account and update its password settings.\n- Search for other occurrences on the domain.\n - Using the [Active Directory PowerShell module](https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-aduser):\n - `get-aduser -filter { passwordNeverExpires -eq $true -and enabled -eq $true } | ft`\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Active Directory", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "User accounts can be used as service accounts and have their password set never to expire. This is a bad security practice that exposes the account to Credential Access attacks. For cases in which user accounts cannot be avoided, Microsoft provides the Group Managed Service Accounts (gMSA) feature, which ensures that the account password is robust and changed regularly and automatically." + ], + "references": [ + "https://www.cert.ssi.gouv.fr/uploads/guide-ad.html#dont_expire", + "https://blog.menasec.net/2019/02/threat-hunting-26-persistent-password.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "5674bf2d-523c-40f6-baea-bea400725f7c", + "rule_id": "62a70f6f-3c37-43df-a556-f64fa475fba2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "message", + "type": "match_only_text", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.api", + "type": "keyword", + "ecs": false + } + ], + "setup": "", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.action:\"modified-user-account\" and winlog.api:\"wineventlog\" and event.code:\"4738\" and\n message:\"'Don't Expire Password' - Enabled\" and not user.id:\"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "Kubernetes Anonymous Request Authorized", + "description": "This rule detects when an unauthenticated user request is authorized within the cluster. Attackers may attempt to use anonymous accounts to gain initial access to the cluster or to avoid attribution of their activities within the cluster. This rule excludes the /healthz, /livez and /readyz endpoints which are commonly accessed anonymously.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 5, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Execution", + "Tactic: Initial Access", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Anonymous access to the API server is a dangerous setting enabled by default. Common anonymous connections (e.g., health checks) have been excluded from this rule. All other instances of authorized anonymous requests should be investigated." + ], + "references": [ + "https://media.defense.gov/2022/Aug/29/2003066362/-1/-1/0/CTR_KUBERNETES_HARDENING_GUIDANCE_1.2_20220829.PDF" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.001", + "name": "Default Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/001/" + } + ] + } + ] + } + ], + "id": "c5e2912b-2c61-423a-97d2-469222471c38", + "rule_id": "63c057cc-339a-11ed-a261-0242ac120002", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestURI", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.user.username", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset:kubernetes.audit_logs\n and kubernetes.audit.annotations.authorization_k8s_io/decision:allow\n and kubernetes.audit.user.username:(\"system:anonymous\" or \"system:unauthenticated\" or not *)\n and not kubernetes.audit.requestURI:(/healthz* or /livez* or /readyz*)\n", + "language": "kuery" + }, + { + "name": "Anomalous Process For a Linux Population", + "description": "Searches for rare processes running on multiple Linux hosts in an entire fleet or network. This reduces the detection of false positives since automated maintenance processes usually only run occasionally on a single machine but are common to all or many hosts in a fleet.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Anomalous Process For a Linux Population\n\nSearching for abnormal Linux processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.\n\nThis rule uses a machine learning job to detect a Linux process that is rare and unusual for all of the monitored Linux hosts in your fleet.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, and whether they are located in expected locations.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.\n- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + } + ], + "id": "52afb768-dd0f-4f3d-bd1c-73fae3b8bfd9", + "rule_id": "647fc812-7996-4795-8869-9c4ea595fe88", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_linux_anomalous_process_all_hosts" + ] + }, + { + "name": "Modification of Safari Settings via Defaults Command", + "description": "Identifies changes to the Safari configuration using the built-in defaults command. Adversaries may attempt to enable or disable certain Safari settings, such as enabling JavaScript from Apple Events to ease in the hijacking of the users browser.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://objectivebythesea.com/v2/talks/OBTS_v2_Zohar.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "67fe1fcf-b141-44b2-8d9e-9afc46526e31", + "rule_id": "6482255d-f468-45ea-a5b3-d3a7de1331ae", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:start and\n process.name:defaults and process.args:\n (com.apple.Safari and write and not\n (\n UniversalSearchEnabled or\n SuppressSearchSuggestions or\n WebKitTabToLinksPreferenceKey or\n ShowFullURLInSmartSearchField or\n com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks\n )\n )\n", + "language": "kuery" + }, + { + "name": "Attempt to Mount SMB Share via Command Line", + "description": "Identifies the execution of macOS built-in commands to mount a Server Message Block (SMB) network share. Adversaries may use valid accounts to interact with a remote network share using SMB.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.freebsd.org/cgi/man.cgi?mount_smbfs", + "https://ss64.com/osx/mount.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.002", + "name": "SMB/Windows Admin Shares", + "reference": "https://attack.mitre.org/techniques/T1021/002/" + } + ] + } + ] + } + ], + "id": "9ebd66a4-5ee3-4a3e-b9c5-6b1529122ec5", + "rule_id": "661545b4-1a90-4f45-85ce-2ebd7c6a15d0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n (\n process.name : \"mount_smbfs\" or\n (process.name : \"open\" and process.args : \"smb://*\") or\n (process.name : \"mount\" and process.args : \"smbfs\") or\n (process.name : \"osascript\" and process.command_line : \"osascript*mount volume*smb://*\")\n ) and\n not process.parent.executable : \"/Applications/Google Drive.app/Contents/MacOS/Google Drive\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "WebServer Access Logs Deleted", + "description": "Identifies the deletion of WebServer access logs. This may indicate an attempt to evade detection or destroy forensic evidence on a system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: Windows", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/" + } + ] + } + ], + "id": "208825b0-0c11-4e5c-aab5-6a1a4f11d1a2", + "rule_id": "665e7a4f-c58e-4fc6-bc83-87a7572670ac", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where event.type == \"deletion\" and\n file.path : (\"C:\\\\inetpub\\\\logs\\\\LogFiles\\\\*.log\",\n \"/var/log/apache*/access.log\",\n \"/etc/httpd/logs/access_log\",\n \"/var/log/httpd/access_log\",\n \"/var/www/*/logs/access.log\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Potential Successful Linux FTP Brute Force Attack Detected", + "description": "An FTP (file transfer protocol) brute force attack is a method where an attacker systematically tries different combinations of usernames and passwords to gain unauthorized access to an FTP server, and if successful, the impact can include unauthorized data access, manipulation, or theft, compromising the security and integrity of the server and potentially exposing sensitive information. This rule identifies multiple consecutive authentication failures targeting a specific user account from the same source address and within a short time interval, followed by a successful authentication.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/", + "subtechnique": [ + { + "id": "T1110.001", + "name": "Password Guessing", + "reference": "https://attack.mitre.org/techniques/T1110/001/" + }, + { + "id": "T1110.003", + "name": "Password Spraying", + "reference": "https://attack.mitre.org/techniques/T1110/003/" + } + ] + } + ] + } + ], + "id": "a4d4e0e0-c516-476e-9fff-ccd52065a467", + "rule_id": "66712812-e7f2-4a1d-bbda-dd0b5cf20c5d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0", + "integration": "auditd" + } + ], + "required_fields": [ + { + "name": "auditd.data.addr", + "type": "unknown", + "ecs": false + }, + { + "name": "auditd.data.terminal", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "related.user", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Auditbeat integration, or Auditd Manager integration.\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n### Auditd Manager Integration Setup\nThe Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.\nAuditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.\n\n#### The following steps should be executed in order to add the Elastic Agent System integration \"auditd_manager\" on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Auditd Manager and select the integration to see more details about it.\n- Click Add Auditd Manager.\n- Configure the integration name and optionally add a description.\n- Review optional and advanced settings accordingly.\n- Add the newly installed `auditd manager` to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.\n- Click Save and Continue.\n- For more details on the integeration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).\n\n#### Rule Specific Setup Note\nAuditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.\nHowever, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n- For this detection rule no additional audit rules are required to be added to the integration.\n\n", + "type": "eql", + "query": "sequence by host.id, auditd.data.addr, related.user with maxspan=5s\n [authentication where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n event.action == \"authenticated\" and auditd.data.terminal == \"ftp\" and event.outcome == \"failure\" and \n auditd.data.addr != null and auditd.data.addr != \"0.0.0.0\" and auditd.data.addr != \"::\"] with runs=10\n [authentication where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n event.action == \"authenticated\" and auditd.data.terminal == \"ftp\" and event.outcome == \"success\" and \n auditd.data.addr != null and auditd.data.addr != \"0.0.0.0\" and auditd.data.addr != \"::\"] | tail 1\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-auditd_manager.auditd-*" + ] + }, + { + "name": "Suspicious macOS MS Office Child Process", + "description": "Identifies suspicious child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, and Excel). These child processes are often launched during exploitation of Office applications or by documents with malicious macros.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.malwarebytes.com/cybercrime/2017/02/microsoft-office-macro-malware-targets-macs/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + } + ] + } + ] + } + ], + "id": "0749e15a-58ea-41fe-93f4-fc4e00f96672", + "rule_id": "66da12b1-ac83-40eb-814c-07ed1d82b7b9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.parent.name:(\"Microsoft Word\", \"Microsoft PowerPoint\", \"Microsoft Excel\") and\n process.name:\n (\n \"bash\",\n \"dash\",\n \"sh\",\n \"tcsh\",\n \"csh\",\n \"zsh\",\n \"ksh\",\n \"fish\",\n \"python*\",\n \"perl*\",\n \"php*\",\n \"osascript\",\n \"pwsh\",\n \"curl\",\n \"wget\",\n \"cp\",\n \"mv\",\n \"base64\",\n \"launchctl\"\n ) and\n /* noisy false positives related to product version discovery and office errors reporting */\n not process.args:\n (\n \"ProductVersion\",\n \"hw.model\",\n \"ioreg\",\n \"ProductName\",\n \"ProductUserVisibleVersion\",\n \"ProductBuildVersion\",\n \"/Library/Application Support/Microsoft/MERP*/Microsoft Error Reporting.app/Contents/MacOS/Microsoft Error Reporting\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Google Workspace Admin Role Assigned to a User", + "description": "Assigning the administrative role to a user will grant them access to the Google Admin console and grant them administrator privileges which allow them to access and manage various resources and applications. An adversary may create a new administrator account for persistence or apply the admin role to an existing user to carry out further intrusion efforts. Users with super-admin privileges can bypass single-sign on if enabled in Google Workspace.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace Admin Role Assigned to a User\n\nGoogle Workspace roles allow administrators to assign specific permissions to users or groups. These assignments should follow the principle of least privilege (PoLP). Admin roles in Google Workspace grant users access to the Google Admin console, where more domain-wide settings are accessible. Google Workspace contains prebuilt administrator roles for performing business functions related to users, groups, and services. Custom administrator roles can be created when prebuilt roles are not sufficient.\n\nAdministrator roles assigned to users will grant them additional permissions and privileges within the Google Workspace domain. Administrative roles also give users access to the admin console, where domain-wide settings can be adjusted. Threat actors might rely on these new privileges to advance their intrusion efforts and laterally move throughout the organization. Users with unexpected administrative privileges may also cause operational dysfunction if unfamiliar settings are adjusted without warning.\n\nThis rule identifies when a Google Workspace administrative role is assigned to a user.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n - The `user.target.email` field contains the user who received the admin role.\n- Identify the role given to the user by reviewing the `google_workspace.admin.role.name` field in the alert.\n- After identifying the involved user, verify their administrative privileges are scoped properly.\n- To identify other users with this role, search the alert for `event.action: ASSIGN_ROLE`.\n - Add `google_workspace.admin.role.name` with the role added as an additional filter.\n - Adjust the relative time accordingly to identify all users that were assigned this admin role.\n- Identify if the user account was recently created by searching for `event.action: CREATE_USER`.\n - Add `user.email` with the target user account that recently received this new admin role.\n- After identifying the involved user, create a filter with their `user.name` or `user.target.email`. Review the last 48 hours of their activity for anything that may indicate a compromise.\n\n### False positive analysis\n\n- After identifying user account that added the admin role, verify the action was intentional.\n- Verify that the target user who was assigned the admin role should have administrative privileges in Google Workspace.\n- Review organizational units or groups the target user might have been added to and ensure the admin role permissions align.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 206, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Identity and Access Audit", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Google Workspace admin role assignments may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://support.google.com/a/answer/172176?hl=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.003", + "name": "Additional Cloud Roles", + "reference": "https://attack.mitre.org/techniques/T1098/003/" + } + ] + } + ] + } + ], + "id": "32d15a6a-ae7d-4f8b-9328-fb7d66d4f16f", + "rule_id": "68994a6c-c7ba-4e82-b476-26a26877adf6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.admin.role.name", + "type": "keyword", + "ecs": false + }, + { + "name": "google_workspace.event.type", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:\"google_workspace.admin\" and event.category:\"iam\" and event.action:\"ASSIGN_ROLE\"\n and google_workspace.event.type:\"DELEGATED_ADMIN_SETTINGS\" and google_workspace.admin.role.name : *_ADMIN_ROLE\n", + "language": "kuery" + }, + { + "name": "Modification of Boot Configuration", + "description": "Identifies use of bcdedit.exe to delete boot configuration data. This tactic is sometimes used as by malware or an attacker as a destructive technique.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Modification of Boot Configuration\n\nBoot entry parameters, or boot parameters, are optional, system-specific settings that represent configuration options. These are stored in a boot configuration data (BCD) store, and administrators can use utilities like `bcdedit.exe` to configure these.\n\nThis rule identifies the usage of `bcdedit.exe` to:\n\n- Disable Windows Error Recovery (recoveryenabled).\n- Ignore errors if there is a failed boot, failed shutdown, or failed checkpoint (bootstatuspolicy ignoreallfailures).\n\nThese are common steps in destructive attacks by adversaries leveraging ransomware.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Check if any files on the host machine have been encrypted.\n\n### False positive analysis\n\n- The usage of these options is not inherently malicious. Administrators can modify these configurations to force a machine to boot for troubleshooting or data recovery purposes.\n\n### Related rules\n\n- Deleting Backup Catalogs with Wbadmin - 581add16-df76-42bb-af8e-c979bfb39a59\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Impact", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" + } + ] + } + ], + "id": "8bbc9a5a-8510-4caf-a3ec-9ac95affe596", + "rule_id": "69c251fb-a5d6-4035-b5ec-40438bd829ff", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"bcdedit.exe\" or process.pe.original_file_name == \"bcdedit.exe\") and\n (\n (process.args : \"/set\" and process.args : \"bootstatuspolicy\" and process.args : \"ignoreallfailures\") or\n (process.args : \"no\" and process.args : \"recoveryenabled\")\n )\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Enumeration of Users or Groups via Built-in Commands", + "description": "Identifies the execution of macOS built-in commands related to account or group enumeration. Adversaries may use account and group information to orient themselves before deciding how to act.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1069", + "name": "Permission Groups Discovery", + "reference": "https://attack.mitre.org/techniques/T1069/", + "subtechnique": [ + { + "id": "T1069.001", + "name": "Local Groups", + "reference": "https://attack.mitre.org/techniques/T1069/001/" + } + ] + }, + { + "id": "T1087", + "name": "Account Discovery", + "reference": "https://attack.mitre.org/techniques/T1087/", + "subtechnique": [ + { + "id": "T1087.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1087/001/" + } + ] + } + ] + } + ], + "id": "7823b00e-e5d0-402c-8c69-7be232cf317a", + "rule_id": "6e9b351e-a531-4bdc-b73e-7034d6eed7ff", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n (\n process.name : (\"ldapsearch\", \"dsmemberutil\") or\n (process.name : \"dscl\" and\n process.args : (\"read\", \"-read\", \"list\", \"-list\", \"ls\", \"search\", \"-search\") and\n process.args : (\"/Active Directory/*\", \"/Users*\", \"/Groups*\"))\n\t) and\n not process.parent.executable : (\"/Applications/NoMAD.app/Contents/MacOS/NoMAD\",\n \"/Applications/ZoomPresence.app/Contents/MacOS/ZoomPresence\",\n \"/Applications/Sourcetree.app/Contents/MacOS/Sourcetree\",\n \"/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon\",\n \"/Applications/Jamf Connect.app/Contents/MacOS/Jamf Connect\",\n \"/usr/local/jamf/bin/jamf\",\n \"/Library/Application Support/AirWatch/hubd\",\n \"/opt/jc/bin/jumpcloud-agent\",\n \"/Applications/ESET Endpoint Antivirus.app/Contents/MacOS/esets_daemon\",\n \"/Applications/ESET Endpoint Security.app/Contents/MacOS/esets_daemon\",\n \"/Library/PrivilegedHelperTools/com.fortinet.forticlient.uninstall_helper\"\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Google Workspace Role Modified", + "description": "Detects when a custom admin role or its permissions are modified. An adversary may modify a custom admin role in order to elevate the permissions of other user accounts and persist in their target’s environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace Role Modified\n\nGoogle Workspace roles allow administrators to assign specific permissions to users or groups where the principle of least privilege (PoLP) is recommended. Admin roles in Google Workspace grant users access to the Google Admin console, where more domain-wide settings are accessible. Google Workspace contains prebuilt admin roles for performing business functions related to users, groups, and services. Custom administrator roles can be created where prebuilt roles are not preferred. Each Google Workspace service has a set of custodial privileges that can be added to custom roles.\n\nRoles assigned to users will grant them additional permissions and privileges within the Google Workspace domain. Threat actors might modify existing roles with new privileges to advance their intrusion efforts and laterally move throughout the organization. Users with unexpected privileges might also cause operational dysfunction if unfamiliar settings are adjusted without warning.\n\nThis rule identifies when a Google Workspace role is modified.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- Identify the role modified by reviewing the `google_workspace.admin.role.name` field in the alert.\n- Identify the privilege that was added or removed by reviewing the `google_workspace.admin.privilege.name` field in the alert.\n- After identifying the involved user, verify administrative privileges are scoped properly.\n- To identify other users with this role, search for `event.action: ASSIGN_ROLE`\n - Add `google_workspace.admin.role.name` with the role added as an additional filter.\n - Adjust the relative time accordingly to identify all users that were assigned this role.\n- Identify if the user account was recently created by searching for `event.action: CREATE_USER`.\n- If a privilege was added, monitor users assigned this role for the next 24 hours and look for attempts to use the new privilege.\n - The `event.provider` field will help filter for specific services in Google Workspace such as Drive or Admin.\n - The `event.action` field will help trace actions that are being taken by users.\n\n### False positive analysis\n\n- After identifying the user account that modified the role, verify the action was intentional.\n- Verify that the user is expected to have administrative privileges in Google Workspace to modify roles.\n- Review organizational units or groups the role might have been added to and ensure the new privileges align properly.\n- Use the `user.name` to filter for `event.action` where `ADD_PRIVILEGE` or `UPDATE_ROLE` has been seen before to check if these actions are new or historical.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Google Workspace admin roles may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://support.google.com/a/answer/2406043?hl=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "ce841ab3-0676-41bb-80f8-ab4e48ed94b4", + "rule_id": "6f435062-b7fc-4af9-acea-5b1ead65c5a5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:(ADD_PRIVILEGE or UPDATE_ROLE)\n", + "language": "kuery" + }, + { + "name": "Persistence via WMI Standard Registry Provider", + "description": "Identifies use of the Windows Management Instrumentation StdRegProv (registry provider) to modify commonly abused registry locations for persistence.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/previous-versions/windows/desktop/regprov/stdregprov", + "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + }, + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "65b53c89-3831-453f-ae68-6dc469726b38", + "rule_id": "70d12c9c-0dbd-4a1a-bc44-1467502c9cf6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n registry.data.strings != null and process.name : \"WmiPrvSe.exe\" and\n registry.path : (\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\WOW6432Node\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ServiceDLL\",\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ImagePath\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\\\\*\",\n \"HKEY_USERS\\\\*\\\\Environment\\\\UserInitMprLogonScript\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\Load\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\Shell\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logoff\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logon\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Shutdown\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Startup\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Ctf\\\\LangBarAddin\\\\*\\\\FilePath\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Exec\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Command Processor\\\\Autorun\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\WOW6432Node\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ServiceDLL\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ImagePath\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\\\\*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Environment\\\\UserInitMprLogonScript\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\Load\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\Shell\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logoff\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logon\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Shutdown\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Startup\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Ctf\\\\LangBarAddin\\\\*\\\\FilePath\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Exec\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Command Processor\\\\Autorun\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Attempt to Unload Elastic Endpoint Security Kernel Extension", + "description": "Identifies attempts to unload the Elastic Endpoint Security kernel extension via the kextunload command.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.006", + "name": "Kernel Modules and Extensions", + "reference": "https://attack.mitre.org/techniques/T1547/006/" + } + ] + } + ] + } + ], + "id": "619a35c1-4126-4575-9c76-93aaa8481ae1", + "rule_id": "70fa1af4-27fd-4f26-bd03-50b6af6b9e24", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:kextunload and process.args:(\"/System/Library/Extensions/EndpointSecurity.kext\" or \"EndpointSecurity.kext\")\n", + "language": "kuery" + }, + { + "name": "Modification of Environment Variable via Launchctl", + "description": "Identifies modifications to an environment variable using the built-in launchctl command. Adversaries may execute their own malicious payloads by hijacking certain environment variables to load arbitrary libraries or bypass certain restrictions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/rapid7/metasploit-framework/blob/master//modules/post/osx/escalate/tccbypass.rb" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.007", + "name": "Path Interception by PATH Environment Variable", + "reference": "https://attack.mitre.org/techniques/T1574/007/" + } + ] + } + ] + } + ], + "id": "019510d5-e68d-4fe9-9ced-8ef38664bce1", + "rule_id": "7453e19e-3dbf-4e4e-9ae0-33d6c6ed15e1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:start and \n process.name:launchctl and \n process.args:(setenv and not (ANT_HOME or \n DBUS_LAUNCHD_SESSION_BUS_SOCKET or \n EDEN_ENV or \n LG_WEBOS_TV_SDK_HOME or \n RUNTIME_JAVA_HOME or \n WEBOS_CLI_TV or \n JAVA*_HOME) and \n not *.vmoptions) and \n not process.parent.executable:(\"/Applications/IntelliJ IDEA CE.app/Contents/jbr/Contents/Home/lib/jspawnhelper\" or \n /Applications/NoMachine.app/Contents/Frameworks/bin/nxserver.bin or \n /Applications/NoMachine.app/Contents/Frameworks/bin/nxserver.bin or \n /usr/local/bin/kr)\n", + "language": "kuery" + }, + { + "name": "Unusual Hour for a User to Logon", + "description": "A machine learning job detected a user logging in at a time of day that is unusual for the user. This can be due to credentialed access via a compromised account when the user and the threat actor are in different time zones. In addition, unauthorized user activity often takes place during non-business hours.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Hour for a User to Logon\n\nThis rule uses a machine learning job to detect a user logging in at a time of day that is unusual for the user. This can be due to credentialed access via a compromised account when the user and the threat actor are in different time zones. It can also indicate unauthorized user activity, as it often occurs during non-business hours.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, network connections, data access, and logon events.\n- Investigate other alerts associated with the involved users during the past 48 hours.\n\n### False positive analysis\n\n- Users may need to log in during non-business hours to perform work-related tasks. Examine whether the company policies authorize this or if the activity is done under change management.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 104, + "tags": [ + "Use Case: Identity and Access Audit", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Initial Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Users working late, or logging in from unusual time zones while traveling, may trigger this rule." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "1a6e4520-a2a8-4658-828c-46ab8b07c9ee", + "rule_id": "745b0119-0560-43ba-860a-7235dd8cee8d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "auth_rare_hour_for_a_user" + }, + { + "name": "Unusual DNS Activity", + "description": "A machine learning job detected a rare and unusual DNS query that indicate network activity with unusual DNS domains. This can be due to initial access, persistence, command-and-control, or exfiltration activity. For example, when a user clicks on a link in a phishing email or opens a malicious document, a request may be sent to download and run a payload from an uncommon domain. When malware is already running, it may send requests to an uncommon DNS domain the malware uses for command-and-control communication.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Command and Control" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert. Network activity that occurs rarely, in small quantities, can trigger this alert. Possible examples are browsing technical support or vendor networks sparsely. A user who visits a new or unique web destination may trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/", + "subtechnique": [ + { + "id": "T1071.004", + "name": "DNS", + "reference": "https://attack.mitre.org/techniques/T1071/004/" + } + ] + } + ] + } + ], + "id": "fff9f687-b6ba-4edd-acb4-2b3a3eedcee7", + "rule_id": "746edc4c-c54c-49c6-97a1-651223819448", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": "packetbeat_rare_dns_question" + }, + { + "name": "Potential Privilege Escalation via Sudoers File Modification", + "description": "A sudoers file specifies the commands users or groups can run and from which terminals. Adversaries can take advantage of these configurations to execute commands as other users or spawn processes with higher privileges.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.003", + "name": "Sudo and Sudo Caching", + "reference": "https://attack.mitre.org/techniques/T1548/003/" + } + ] + } + ] + } + ], + "id": "6f67000a-8e9c-4069-a7e9-a7c2884d9295", + "rule_id": "76152ca1-71d0-4003-9e37-0983e12832da", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and event.type:start and process.args:(echo and *NOPASSWD*ALL*)\n", + "language": "kuery" + }, + { + "name": "Application Added to Google Workspace Domain", + "description": "Detects when a Google marketplace application is added to the Google Workspace domain. An adversary may add a malicious application to an organization’s Google Workspace domain in order to maintain a presence in their target’s organization and steal data.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Application Added to Google Workspace Domain\n\nGoogle Workspace Marketplace is an online store for free and paid web applications that work with Google Workspace services and third-party software. Listed applications are based on Google APIs or on Google Apps Script and created by both Google and third-party developers.\n\nMarketplace applications require access to specific Google Workspace resources. Applications can be installed by individual users, if they have permission, or can be installed for an entire Google Workspace domain by administrators. Consent screens typically display what permissions and privileges the application requires during installation. As a result, malicious Marketplace applications may require more permissions than necessary or have malicious intent.\n\nGoogle clearly states that they are not responsible for any product on the Marketplace that originates from a source other than Google.\n\nThis rule checks for applications that were manually added to the Marketplace by a Google Workspace account.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- This rule relies on data from `google_workspace.admin`, thus indicating the associated user has administrative privileges to the Marketplace.\n- With access to the Google Workspace admin console, visit the `Security > Investigation tool` with filters for the user email and event is `Assign Role` or `Update Role` to determine if new cloud roles were recently updated.\n- With the user account, review other potentially related events within the last 48 hours.\n- Re-assess the permissions and reviews of the Marketplace applications to determine if they violate organizational policies or introduce unexpected risks.\n- With access to the Google Workspace admin console, determine if the application was installed domain-wide or individually by visiting `Apps > Google Workspace Marketplace Apps`.\n\n### False positive analysis\n\n- Google Workspace administrators might intentionally remove an application from the blocklist due to a re-assessment or a domain-wide required need for the application.\n- Identify the user account associated with this action and assess their administrative privileges with Google Workspace Marketplace.\n- Contact the user to verify that they intentionally removed the application from the blocklist and their reasoning.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Configuration Audit", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Applications can be added to a Google Workspace domain by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://support.google.com/a/answer/6328701?hl=en#" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "id": "62267f09-6e71-45db-bab4-0fac9fdceb43", + "rule_id": "785a404b-75aa-4ffd-8be5-3334a5a544dd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:ADD_APPLICATION\n", + "language": "kuery" + }, + { + "name": "Potential Shadow Credentials added to AD Object", + "description": "Identify the modification of the msDS-KeyCredentialLink attribute in an Active Directory Computer or User Object. Attackers can abuse control over the object and create a key pair, append to raw public key in the attribute, and obtain persistent and stealthy access to the target user or computer object.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Potential Shadow Credentials added to AD Object\n\nThe msDS-KeyCredentialLink is an Active Directory (AD) attribute that links cryptographic certificates to a user or computer for domain authentication.\n\nAttackers with write privileges on this attribute over an object can abuse it to gain access to the object or maintain persistence. This means they can authenticate and perform actions on behalf of the exploited identity, and they can use Shadow Credentials to request Ticket Granting Tickets (TGTs) on behalf of the identity.\n\n#### Possible investigation steps\n\n- Identify whether Windows Hello for Business (WHfB) and/or Azure AD is used in the environment.\n - Review the event ID 4624 for logon events involving the subject identity (`winlog.event_data.SubjectUserName`).\n - Check whether the `source.ip` is the server running Azure AD Connect.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Review the event IDs 4768 and 4769 for suspicious ticket requests involving the modified identity (`winlog.event_data.ObjectDN`).\n - Extract the source IP addresses from these events and use them as indicators of compromise (IoCs) to investigate whether the host is compromised and to scope the attacker's access to the environment.\n\n### False positive analysis\n\n- Administrators might use custom accounts on Azure AD Connect. If this is the case, make sure the account is properly secured. You can also create an exception for the account if expected activity makes too much noise in your environment.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n - Remove the Shadow Credentials from the object.\n- Investigate how the attacker escalated privileges and identify systems they used to conduct lateral movement. Use this information to determine ways the attacker could regain access to the environment.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Active Directory", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Modifications in the msDS-KeyCredentialLink attribute can be done legitimately by the Azure AD Connect synchronization account or the ADFS service account. These accounts can be added as Exceptions." + ], + "references": [ + "https://posts.specterops.io/shadow-credentials-abusing-key-trust-account-mapping-for-takeover-8ee1a53566ab", + "https://www.thehacker.recipes/ad/movement/kerberos/shadow-credentials", + "https://github.com/OTRF/Set-AuditRule", + "https://cyberstoph.org/posts/2022/03/detecting-shadow-credentials/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1556", + "name": "Modify Authentication Process", + "reference": "https://attack.mitre.org/techniques/T1556/" + } + ] + } + ], + "id": "2c864277-e211-49d4-a188-de177ed8e21a", + "rule_id": "79f97b31-480e-4e63-a7f4-ede42bf2c6de", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.AttributeLDAPDisplayName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.AttributeValue", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectUserName", + "type": "keyword", + "ecs": false + } + ], + "setup": "The 'Audit Directory Service Changes' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```\n\nThe above policy does not cover User objects, so we need to set up an AuditRule using https://github.com/OTRF/Set-AuditRule.\nAs this specifies the msDS-KeyCredentialLink Attribute GUID, it is expected to be low noise.\n\n```\nSet-AuditRule -AdObjectPath 'AD:\\CN=Users,DC=Domain,DC=com' -WellKnownSidType WorldSid -Rights WriteProperty -InheritanceFlags Children -AttributeGUID 5b47d60f-6090-40b2-9f37-2a4de88f3063 -AuditFlags Success\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.action:\"Directory Service Changes\" and event.code:\"5136\" and\n winlog.event_data.AttributeLDAPDisplayName:\"msDS-KeyCredentialLink\" and winlog.event_data.AttributeValue :B\\:828* and\n not winlog.event_data.SubjectUserName: MSOL_*\n", + "language": "kuery" + }, + { + "name": "Potential Privilege Escalation through Writable Docker Socket", + "description": "This rule monitors for the usage of Docker runtime sockets to escalate privileges on Linux systems. Docker sockets by default are only be writable by the root user and docker group. Attackers that have permissions to write to these sockets may be able to create and run a container that allows them to escalate privileges and gain further access onto the host file system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Domain: Container", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://book.hacktricks.xyz/linux-hardening/privilege-escalation/docker-security/docker-breakout-privilege-escalation#automatic-enumeration-and-escape" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1611", + "name": "Escape to Host", + "reference": "https://attack.mitre.org/techniques/T1611/" + } + ] + } + ], + "id": "8e10aac5-d99f-45de-8fa8-1b9195479b6a", + "rule_id": "7acb2de3-8465-472a-8d9c-ccd7b73d0ed8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "group.Ext.real.id", + "type": "unknown", + "ecs": false + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.Ext.real.id", + "type": "unknown", + "ecs": false + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and \n(\n (process.name == \"docker\" and process.args : \"run\" and process.args : \"-it\" and \n process.args : (\"unix://*/docker.sock\", \"unix://*/dockershim.sock\")) or \n (process.name == \"socat\" and process.args : (\"UNIX-CONNECT:*/docker.sock\", \"UNIX-CONNECT:*/dockershim.sock\"))\n) and not user.Ext.real.id : \"0\" and not group.Ext.real.id : \"0\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Tampering of Bash Command-Line History", + "description": "Adversaries may attempt to clear or disable the Bash command-line history in an attempt to evade detection or forensic investigations.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.003", + "name": "Clear Command History", + "reference": "https://attack.mitre.org/techniques/T1070/003/" + } + ] + } + ] + } + ], + "id": "9c22828c-c99e-45b7-975d-7050bd528f21", + "rule_id": "7bcbb3ac-e533-41ad-a612-d6c3bf666aba", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where event.type in (\"start\", \"process_started\") and\n (\n ((process.args : (\"rm\", \"echo\") or\n (process.args : \"ln\" and process.args : \"-sf\" and process.args : \"/dev/null\") or\n (process.args : \"truncate\" and process.args : \"-s0\"))\n and process.args : (\".bash_history\", \"/root/.bash_history\", \"/home/*/.bash_history\",\"/Users/.bash_history\", \"/Users/*/.bash_history\",\n \".zsh_history\", \"/root/.zsh_history\", \"/home/*/.zsh_history\", \"/Users/.zsh_history\", \"/Users/*/.zsh_history\")) or\n (process.name : \"history\" and process.args : \"-c\") or\n (process.args : \"export\" and process.args : (\"HISTFILE=/dev/null\", \"HISTFILESIZE=0\")) or\n (process.args : \"unset\" and process.args : \"HISTFILE\") or\n (process.args : \"set\" and process.args : \"history\" and process.args : \"+o\")\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Google Workspace Bitlocker Setting Disabled", + "description": "Google Workspace administrators whom manage Windows devices and have Windows device management enabled may also enable BitLocker drive encryption to mitigate unauthorized data access on lost or stolen computers. Adversaries with valid account access may disable BitLocker to access sensitive data on an endpoint added to Google Workspace device management.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace Bitlocker Setting Disabled\n\nBitLocker Drive Encryption is a data protection feature that integrates with the Windows operating system to address the data theft or exposure threats from lost, stolen, or inappropriately decommissioned computers. BitLocker helps mitigate unauthorized data access by enhancing file and system protections, such as data encryption and rendering data inaccessible. Google Workspace can sync with Windows endpoints that are registered in inventory, where BitLocker can be enabled and disabled.\n\nDisabling Bitlocker on an endpoint decrypts data at rest and makes it accessible, which raises the risk of exposing sensitive endpoint data.\n\nThis rule identifies a user with administrative privileges and access to the admin console, disabling BitLocker for Windows endpoints.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- After identifying the user, verify if the user should have administrative privileges to disable BitLocker on Windows endpoints.\n- From the Google Workspace admin console, review `Reporting > Audit` and `Investigation > Device` logs, filtering on the user email identified from the alert.\n - If a Google Workspace user logged into their account using a potentially compromised account, this will create an `Device sync event` event.\n\n### False positive analysis\n\n- An administrator may have intentionally disabled BitLocker for routine maintenance or endpoint updates.\n - Verify with the user that they intended to disable BitLocker on Windows endpoints.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 106, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Administrators may temporarily disabled Bitlocker on managed devices for maintenance, testing or to resolve potential endpoint conflicts." + ], + "references": [ + "https://support.google.com/a/answer/9176657?hl=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "74d3774f-5f51-4878-87db-85be8d2aa335", + "rule_id": "7caa8e60-2df0-11ed-b814-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.admin.new_value", + "type": "keyword", + "ecs": false + }, + { + "name": "google_workspace.admin.setting.name", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:\"google_workspace.admin\" and event.action:\"CHANGE_APPLICATION_SETTING\" and event.category:(iam or configuration)\n and google_workspace.admin.new_value:\"Disabled\" and google_workspace.admin.setting.name:BitLocker*\n", + "language": "kuery" + }, + { + "name": "Apple Scripting Execution with Administrator Privileges", + "description": "Identifies execution of the Apple script interpreter (osascript) without a password prompt and with administrator privileges.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://discussions.apple.com/thread/2266150" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "6a4791c5-a01b-4c10-b2fe-507dde4437fd", + "rule_id": "827f8d8f-4117-4ae4-b551-f56d54b9da6b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name : \"osascript\" and\n process.command_line : \"osascript*with administrator privileges\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Linux Local Account Brute Force Detected", + "description": "Identifies multiple consecutive login attempts executed by one process targeting a local linux user account within a short time interval. Adversaries might brute force login attempts across different users with a default wordlist or a set of customly crafted passwords in an attempt to gain access to these accounts.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/", + "subtechnique": [ + { + "id": "T1110.001", + "name": "Password Guessing", + "reference": "https://attack.mitre.org/techniques/T1110/001/" + } + ] + } + ] + } + ], + "id": "dcc18dd0-5921-459b-b0b2-8d9b85e9f4f4", + "rule_id": "835c0622-114e-40b5-a346-f843ea5d01f1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, process.parent.executable, user.id with maxspan=1s\n [process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and process.name == \"su\" and \n not process.parent.name in (\n \"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"clickhouse-server\"\n )] with runs=10\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Sublime Plugin or Application Script Modification", + "description": "Adversaries may create or modify the Sublime application plugins or scripts to execute a malicious payload each time the Sublime application is started.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://posts.specterops.io/persistent-jxa-66e1c3cd1cf5" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1554", + "name": "Compromise Client Software Binary", + "reference": "https://attack.mitre.org/techniques/T1554/" + } + ] + } + ], + "id": "92e5c13c-16d4-470e-bea6-5405d0a189ae", + "rule_id": "88817a33-60d3-411f-ba79-7c905d865b2a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"macos\" and event.type in (\"change\", \"creation\") and file.extension : \"py\" and\n file.path :\n (\n \"/Users/*/Library/Application Support/Sublime Text*/Packages/*.py\",\n \"/Applications/Sublime Text.app/Contents/MacOS/sublime.py\"\n ) and\n not process.executable :\n (\n \"/Applications/Sublime Text*.app/Contents/*\",\n \"/usr/local/Cellar/git/*/bin/git\",\n \"/Library/Developer/CommandLineTools/usr/bin/git\",\n \"/usr/libexec/xpcproxy\",\n \"/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Resources/DesktopServicesHelper\"\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Sudo Hijacking Detected", + "description": "Identifies the creation of a sudo binary located at /usr/bin/sudo. Attackers may hijack the default sudo binary and replace it with a custom binary or script that can read the user's password in clear text to escalate privileges or enable persistence onto the system every time the sudo binary is executed.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://eapolsniper.github.io/2020/08/17/Sudo-Hijacking/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.003", + "name": "Sudo and Sudo Caching", + "reference": "https://attack.mitre.org/techniques/T1548/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/" + } + ] + } + ], + "id": "1226aa6e-56e5-4aca-8582-713875d4bde8", + "rule_id": "88fdcb8c-60e5-46ee-9206-2663adf1b1ce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "new_terms", + "query": "host.os.type:linux and event.category:file and event.type:(\"creation\" or \"file_create_event\") and\nfile.path:(\"/usr/bin/sudo\" or \"/bin/sudo\") and not process.name:(docker or dockerd)\n", + "new_terms_fields": [ + "host.id", + "user.id", + "process.executable" + ], + "history_window_start": "now-7d", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Suspicious WMI Image Load from MS Office", + "description": "Identifies a suspicious image load (wmiutils.dll) from Microsoft Office processes. This behavior may indicate adversarial activity where child processes are spawned via Windows Management Instrumentation (WMI). This technique can be used to execute code and evade traditional parent/child processes spawned from Microsoft Office products.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "583aac3d-fbf2-4683-a256-ddc7a12f7e17", + "rule_id": "891cb88e-441a-4c3e-be2d-120d99fe7b0d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "any where host.os.type == \"windows\" and\n (event.category : (\"library\", \"driver\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n process.name : (\"WINWORD.EXE\", \"EXCEL.EXE\", \"POWERPNT.EXE\", \"MSPUB.EXE\", \"MSACCESS.EXE\") and\n (dll.name : \"wmiutils.dll\" or file.name : \"wmiutils.dll\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Persistence via DirectoryService Plugin Modification", + "description": "Identifies the creation or modification of a DirectoryService PlugIns (dsplug) file. The DirectoryService daemon launches on each system boot and automatically reloads after crash. It scans and executes bundles that are located in the DirectoryServices PlugIns folder and can be abused by adversaries to maintain persistence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.chichou.me/2019/11/21/two-macos-persistence-tricks-abusing-plugins/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/" + } + ] + } + ], + "id": "b17b5b05-8e9e-480b-b3ef-6a76576818ed", + "rule_id": "89fa6cb7-6b53-4de2-b604-648488841ab8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:file and host.os.type:macos and not event.type:deletion and\n file.path:/Library/DirectoryServices/PlugIns/*.dsplug\n", + "language": "kuery" + }, + { + "name": "Suspicious Symbolic Link Created", + "description": "Identifies the creation of a symbolic link to a suspicious file or location. A symbolic link is a reference to a file or directory that acts as a pointer or shortcut, allowing users to access the target file or directory from a different location in the file system. An attacker can potentially leverage symbolic links for privilege escalation by tricking a privileged process into following the symbolic link to a sensitive file, giving the attacker access to data or capabilities they would not normally have.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.008", + "name": "/etc/passwd and /etc/shadow", + "reference": "https://attack.mitre.org/techniques/T1003/008/" + } + ] + } + ] + } + ], + "id": "5be8bbd3-c776-4a92-9404-6879a64b3e6b", + "rule_id": "8a024633-c444-45c0-a4fe-78128d8c1ab6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "group.Ext.real.id", + "type": "unknown", + "ecs": false + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.working_directory", + "type": "keyword", + "ecs": true + }, + { + "name": "user.Ext.real.id", + "type": "unknown", + "ecs": false + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and\nevent.type == \"start\" and process.name == \"ln\" and process.args in (\"-s\", \"-sf\") and \n (\n /* suspicious files */\n (process.args in (\"/etc/shadow\", \"/etc/shadow-\", \"/etc/shadow~\", \"/etc/gshadow\", \"/etc/gshadow-\") or \n (process.working_directory == \"/etc\" and process.args in (\"shadow\", \"shadow-\", \"shadow~\", \"gshadow\", \"gshadow-\"))) or \n \n /* suspicious bins */\n (process.args in (\"/bin/bash\", \"/bin/dash\", \"/bin/sh\", \"/bin/tcsh\", \"/bin/csh\", \"/bin/zsh\", \"/bin/ksh\", \"/bin/fish\") or \n (process.working_directory == \"/bin\" and process.args : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\"))) or \n (process.args in (\"/usr/bin/bash\", \"/usr/bin/dash\", \"/usr/bin/sh\", \"/usr/bin/tcsh\", \"/usr/bin/csh\", \"/usr/bin/zsh\", \"/usr/bin/ksh\", \"/usr/bin/fish\") or \n (process.working_directory == \"/usr/bin\" and process.args in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\"))) or\n \n /* suspicious locations */\n (process.args : (\"/etc/cron.d/*\", \"/etc/cron.daily/*\", \"/etc/cron.hourly/*\", \"/etc/cron.weekly/*\", \"/etc/cron.monthly/*\")) or\n (process.args : (\"/home/*/.ssh/*\", \"/root/.ssh/*\",\"/etc/sudoers.d/*\", \"/dev/shm/*\"))\n ) and \n process.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and \n not user.Ext.real.id == \"0\" and not group.Ext.real.id == \"0\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Setuid / Setgid Bit Set via chmod", + "description": "An adversary may add the setuid or setgid bit to a file or directory in order to run a file with the privileges of the owning user or group. An adversary can take advantage of this to either do a shell escape or exploit a vulnerability in an application with the setuid or setgid bit to get code running in a different user’s context. Additionally, adversaries can use this mechanism on their own malware to make sure they're able to execute in elevated contexts in the future.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 33, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.001", + "name": "Setuid and Setgid", + "reference": "https://attack.mitre.org/techniques/T1548/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "id": "8c49c0ed-9a34-41c3-affa-6e039e4fca94", + "rule_id": "8a1b0278-0f9a-487d-96bd-d4833298e87a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process AND event.type:(start OR process_started) AND\n process.name:chmod AND process.args:(\"+s\" OR \"u+s\" OR /4[0-9]{3}/ OR g+s OR /2[0-9]{3}/) AND\n NOT process.args:\n (\n /.*\\/Applications\\/VirtualBox.app\\/.+/ OR\n /\\/usr\\/local\\/lib\\/python.+/ OR\n /\\/var\\/folders\\/.+\\/FP.*nstallHelper/ OR\n /\\/Library\\/Filesystems\\/.+/ OR\n /\\/usr\\/lib\\/virtualbox\\/.+/ OR\n /\\/Library\\/Application.*/ OR\n \"/run/postgresql\" OR\n \"/var/crash\" OR\n \"/var/run/postgresql\" OR\n /\\/usr\\/bin\\/.+/ OR /\\/usr\\/local\\/share\\/.+/ OR\n /\\/Applications\\/.+/ OR /\\/usr\\/libexec\\/.+/ OR\n \"/var/metrics\" OR /\\/var\\/lib\\/dpkg\\/.+/ OR\n /\\/run\\/log\\/journal\\/.*/ OR\n \\/Users\\/*\\/.minikube\\/bin\\/docker-machine-driver-hyperkit\n ) AND\n NOT process.parent.executable:\n (\n /\\/var\\/lib\\/docker\\/.+/ OR\n \"/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/XPCServices/package_script_service.xpc/Contents/MacOS/package_script_service\" OR\n \"/var/lib/dpkg/info/whoopsie.postinst\"\n )\n", + "language": "lucene" + }, + { + "name": "Executable File Creation with Multiple Extensions", + "description": "Masquerading can allow an adversary to evade defenses and better blend in with the environment. One way it occurs is when the name or location of a file is manipulated as a means of tricking a user into executing what they think is a benign file type but is actually executable code.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.007", + "name": "Double File Extension", + "reference": "https://attack.mitre.org/techniques/T1036/007/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] + } + ], + "id": "4404cedd-e5a4-4543-abff-4cf7a8aeec3e", + "rule_id": "8b2b3a62-a598-4293-bc14-3d5fa22bb98f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and file.extension : \"exe\" and\n file.name regex~ \"\"\".*\\.(vbs|vbe|bat|js|cmd|wsh|ps1|pdf|docx?|xlsx?|pptx?|txt|rtf|gif|jpg|png|bmp|hta|txt|img|iso)\\.exe\"\"\" and\n not (process.executable : (\"?:\\\\Windows\\\\System32\\\\msiexec.exe\", \"C:\\\\Users\\\\*\\\\QGIS_SCCM\\\\Files\\\\QGIS-OSGeo4W-*-Setup-x86_64.exe\") and\n file.path : \"?:\\\\Program Files\\\\QGIS *\\\\apps\\\\grass\\\\*.exe\") and\n not process.executable : (\"/bin/sh\", \"/usr/sbin/MailScanner\", \"/usr/bin/perl\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Enable Host Network Discovery via Netsh", + "description": "Identifies use of the netsh.exe program to enable host discovery via the network. Attackers can use this command-line tool to weaken the host firewall settings.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Enable Host Network Discovery via Netsh\n\nThe Windows Defender Firewall is a native component that provides host-based, two-way network traffic filtering for a device and blocks unauthorized network traffic flowing into or out of the local device.\n\nAttackers can enable Network Discovery on the Windows firewall to find other systems present in the same network. Systems with this setting enabled will communicate with other systems using broadcast messages, which can be used to identify targets for lateral movement. This rule looks for the setup of this setting using the netsh utility.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the Administrator is aware of the activity and there are justifications for this configuration.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Disable Network Discovery:\n - Using netsh: `netsh advfirewall firewall set rule group=\"Network Discovery\" new enable=No`\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Host Windows Firewall planned system administration changes." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.004", + "name": "Disable or Modify System Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/004/" + } + ] + } + ] + } + ], + "id": "19a09fd9-269c-4aa4-81da-b631bb4a2547", + "rule_id": "8b4f0816-6a65-4630-86a6-c21c179c0d09", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\nprocess.name : \"netsh.exe\" and\nprocess.args : (\"firewall\", \"advfirewall\") and process.args : \"group=Network Discovery\" and process.args : \"enable=Yes\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential SharpRDP Behavior", + "description": "Identifies potential behavior of SharpRDP, which is a tool that can be used to perform authenticated command execution against a remote target via Remote Desktop Protocol (RDP) for the purposes of lateral movement.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://posts.specterops.io/revisiting-remote-desktop-lateral-movement-8fb905cb46c3", + "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Lateral%20Movement/LM_sysmon_3_12_13_1_SharpRDP.evtx" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.001", + "name": "Remote Desktop Protocol", + "reference": "https://attack.mitre.org/techniques/T1021/001/" + } + ] + } + ] + } + ], + "id": "521e7627-d599-407e-be0a-0b13b75384b2", + "rule_id": "8c81e506-6e82-4884-9b9a-75d3d252f967", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "/* Incoming RDP followed by a new RunMRU string value set to cmd, powershell, taskmgr or tsclient, followed by process execution within 1m */\n\nsequence by host.id with maxspan=1m\n [network where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"svchost.exe\" and destination.port == 3389 and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ]\n\n [registry where host.os.type == \"windows\" and process.name : \"explorer.exe\" and\n registry.path : (\"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\RunMRU\\\\*\") and\n registry.data.strings : (\"cmd.exe*\", \"powershell.exe*\", \"taskmgr*\", \"\\\\\\\\tsclient\\\\*.exe\\\\*\")\n ]\n\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.parent.name : (\"cmd.exe\", \"powershell.exe\", \"taskmgr.exe\") or process.args : (\"\\\\\\\\tsclient\\\\*.exe\")) and\n not process.name : \"conhost.exe\"\n ]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Incoming DCOM Lateral Movement with ShellBrowserWindow or ShellWindows", + "description": "Identifies use of Distributed Component Object Model (DCOM) to run commands from a remote host, which are launched via the ShellBrowserWindow or ShellWindows Application COM Object. This behavior may indicate an attacker abusing a DCOM application to stealthily move laterally.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.003", + "name": "Distributed Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1021/003/" + } + ] + } + ] + } + ], + "id": "4d368b03-a74d-4baa-bfec-0668f36545de", + "rule_id": "8f919d4b-a5af-47ca-a594-6be59cd924a4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "network.transport", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "source.port", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=5s\n [network where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"explorer.exe\" and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.port > 49151 and destination.port > 49151 and source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ] by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"explorer.exe\"\n ] by process.parent.entity_id\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Keychain Password Retrieval via Command Line", + "description": "Adversaries may collect keychain storage data from a system to in order to acquire credentials. Keychains are the built-in way for macOS to keep track of users' passwords and credentials for many services and features, including Wi-Fi and website passwords, secure notes, certificates, and Kerberos.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Applications for password management." + ], + "references": [ + "https://www.netmeister.org/blog/keychain-passwords.html", + "https://github.com/priyankchheda/chrome_password_grabber/blob/master/chrome.py", + "https://ss64.com/osx/security.html", + "https://www.intezer.com/blog/research/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/", + "subtechnique": [ + { + "id": "T1555.001", + "name": "Keychain", + "reference": "https://attack.mitre.org/techniques/T1555/001/" + } + ] + }, + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/", + "subtechnique": [ + { + "id": "T1555.003", + "name": "Credentials from Web Browsers", + "reference": "https://attack.mitre.org/techniques/T1555/003/" + } + ] + } + ] + } + ], + "id": "2ea2d004-ad5c-4b0f-b632-cf887d30a1f9", + "rule_id": "9092cd6c-650f-4fa3-8a8a-28256c7489c9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type == \"start\" and\n process.name : \"security\" and process.args : \"-wa\" and process.args : (\"find-generic-password\", \"find-internet-password\") and\n process.args : (\"Chrome*\", \"Chromium\", \"Opera\", \"Safari*\", \"Brave\", \"Microsoft Edge\", \"Edge\", \"Firefox*\") and\n not process.parent.executable : \"/Applications/Keeper Password Manager.app/Contents/Frameworks/Keeper Password Manager Helper*/Contents/MacOS/Keeper Password Manager Helper*\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual Web User Agent", + "description": "A machine learning job detected a rare and unusual user agent indicating web browsing activity by an unusual process other than a web browser. This can be due to persistence, command-and-control, or exfiltration activity. Uncommon user agents coming from remote sources to local destinations are often the result of scanners, bots, and web scrapers, which are part of common Internet background traffic. Much of this is noise, but more targeted attacks on websites using tools like Burp or SQLmap can sometimes be discovered by spotting uncommon user agents. Uncommon user agents in traffic from local sources to remote destinations can be any number of things, including harmless programs like weather monitoring or stock-trading programs. However, uncommon user agents from local sources can also be due to malware or scanning activity.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Command and Control" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Web activity that is uncommon, like security scans, may trigger this alert and may need to be excluded. A new or rarely used program that calls web services may trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/", + "subtechnique": [ + { + "id": "T1071.001", + "name": "Web Protocols", + "reference": "https://attack.mitre.org/techniques/T1071/001/" + } + ] + } + ] + } + ], + "id": "86a60826-6b37-4d8c-8761-b724f041aa6a", + "rule_id": "91f02f01-969f-4167-8d77-07827ac4cee0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": "packetbeat_rare_user_agent" + }, + { + "name": "Unusual Web Request", + "description": "A machine learning job detected a rare and unusual URL that indicates unusual web browsing activity. This can be due to initial access, persistence, command-and-control, or exfiltration activity. For example, in a strategic web compromise or watering hole attack, when a trusted website is compromised to target a particular sector or organization, targeted users may receive emails with uncommon URLs for trusted websites. These URLs can be used to download and run a payload. When malware is already running, it may send requests to uncommon URLs on trusted websites the malware uses for command-and-control communication. When rare URLs are observed being requested for a local web server by a remote source, these can be due to web scanning, enumeration or attack traffic, or they can be due to bots and web scrapers which are part of common Internet background traffic.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Command and Control" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Web activity that occurs rarely in small quantities can trigger this alert. Possible examples are browsing technical support or vendor URLs that are used very sparsely. A user who visits a new and unique web destination may trigger this alert when the activity is sparse. Web applications that generate URLs unique to a transaction may trigger this when they are used sparsely. Web domains can be excluded in cases such as these." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/", + "subtechnique": [ + { + "id": "T1071.001", + "name": "Web Protocols", + "reference": "https://attack.mitre.org/techniques/T1071/001/" + } + ] + } + ] + } + ], + "id": "4f1ecf8a-8b1d-4f34-bbba-9a9f2fc57ead", + "rule_id": "91f02f01-969f-4167-8f55-07827ac3acc9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": "packetbeat_rare_urls" + }, + { + "name": "DNS Tunneling", + "description": "A machine learning job detected unusually large numbers of DNS queries for a single top-level DNS domain, which is often used for DNS tunneling. DNS tunneling can be used for command-and-control, persistence, or data exfiltration activity. For example, dnscat tends to generate many DNS questions for a top-level domain as it uses the DNS protocol to tunnel data.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Command and Control" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "DNS domains that use large numbers of child domains, such as software or content distribution networks, can trigger this alert and such parent domains can be excluded." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + } + ], + "id": "f0847bfa-a551-406e-8fc0-e9aef0ff705e", + "rule_id": "91f02f01-969f-4167-8f66-07827ac3bdd9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": "packetbeat_dns_tunneling" + }, + { + "name": "A scheduled task was created", + "description": "Indicates the creation of a scheduled task using Windows event logs. Adversaries can use these to establish persistence, move laterally, and/or escalate privileges.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 7, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate scheduled tasks may be created during installation of new software." + ], + "references": [ + "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4698" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "7d32fa0a-057e-4de7-98cc-6ec292164405", + "rule_id": "92a6faf5-78ec-4e25-bea1-73bacc9b59d9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.TaskName", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "iam where event.action == \"scheduled-task-created\" and\n\n /* excluding tasks created by the computer account */\n not user.name : \"*$\" and\n\n /* TaskContent is not parsed, exclude by full taskname noisy ones */\n not winlog.event_data.TaskName :\n (\"\\\\OneDrive Standalone Update Task-S-1-5-21*\",\n \"\\\\OneDrive Standalone Update Task-S-1-12-1-*\",\n \"\\\\Hewlett-Packard\\\\HP Web Products Detection\",\n \"\\\\Hewlett-Packard\\\\HPDeviceCheck\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Suspicious SolarWinds Child Process", + "description": "A suspicious SolarWinds child process was detected, which may indicate an attempt to execute malicious programs.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trusted SolarWinds child processes, verify process details such as network connections and file writes." + ], + "references": [ + "https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html", + "https://github.com/mandiant/sunburst_countermeasures/blob/main/rules/SUNBURST/hxioc/SUNBURST%20SUSPICIOUS%20CHILD%20PROCESSES%20(METHODOLOGY).ioc" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1106", + "name": "Native API", + "reference": "https://attack.mitre.org/techniques/T1106/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1195", + "name": "Supply Chain Compromise", + "reference": "https://attack.mitre.org/techniques/T1195/", + "subtechnique": [ + { + "id": "T1195.002", + "name": "Compromise Software Supply Chain", + "reference": "https://attack.mitre.org/techniques/T1195/002/" + } + ] + } + ] + } + ], + "id": "b3cb40bf-04bc-48bf-81d9-e0644897060f", + "rule_id": "93b22c0a-06a0-4131-b830-b10d5e166ff4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name: (\"SolarWinds.BusinessLayerHost.exe\", \"SolarWinds.BusinessLayerHostx64.exe\") and\n not process.name : (\n \"APMServiceControl*.exe\",\n \"ExportToPDFCmd*.Exe\",\n \"SolarWinds.Credentials.Orion.WebApi*.exe\",\n \"SolarWinds.Orion.Topology.Calculator*.exe\",\n \"Database-Maint.exe\",\n \"SolarWinds.Orion.ApiPoller.Service.exe\",\n \"WerFault.exe\",\n \"WerMgr.exe\",\n \"SolarWinds.BusinessLayerHost.exe\",\n \"SolarWinds.BusinessLayerHostx64.exe\") and\n not process.executable : (\"?:\\\\Windows\\\\SysWOW64\\\\ARP.EXE\", \"?:\\\\Windows\\\\SysWOW64\\\\lodctr.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\unlodctr.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Encoded Executable Stored in the Registry", + "description": "Identifies registry write modifications to hide an encoded portable executable. This could be indicative of adversary defense evasion by avoiding the storing of malicious content directly on disk.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + }, + { + "id": "T1140", + "name": "Deobfuscate/Decode Files or Information", + "reference": "https://attack.mitre.org/techniques/T1140/" + } + ] + } + ], + "id": "ca69e4d5-caed-405c-a9e9-9ff255be00ca", + "rule_id": "93c1ce76-494c-4f01-8167-35edfb52f7b1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n/* update here with encoding combinations */\n registry.data.strings : \"TVqQAAMAAAAEAAAA*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Google Workspace Admin Role Deletion", + "description": "Detects when a custom admin role is deleted. An adversary may delete a custom admin role in order to impact the permissions or capabilities of system administrators.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace Admin Role Deletion\n\nGoogle Workspace roles allow administrators to assign specific permissions to users or groups where the principle of least privilege (PoLP) is recommended. Admin roles in Google Workspace grant users access to the Google Admin console, where further domain-wide settings are accessible. Google Workspace contains prebuilt administrator roles for performing business functions related to users, groups, and services. Custom administrator roles can be created where prebuilt roles are not preferred.\n\nDeleted administrator roles may render some user accounts inaccessible or cause operational failure where these roles are relied upon to perform daily administrative tasks. The deletion of roles may also hinder the response and remediation actions of administrators responding to security-related alerts and events. Without specific roles assigned, users will inherit the permissions and privileges of the root organizational unit.\n\nThis rule identifies when a Google Workspace administrative role is deleted within the Google Admin console.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- Identify the role deleted by reviewing `google_workspace.admin.role.name` in the alert.\n- With the user identified, verify if he has administrative privileges to disable or delete administrative roles.\n- To identify other users affected by this role removed, search for `event.action: ASSIGN_ROLE`.\n - Add `google_workspace.admin.role.name` with the role deleted as an additional filter.\n - Adjust the relative time accordingly to identify all users that were assigned this admin role.\n\n### False positive analysis\n\n- After identifying the user account that disabled the admin role, verify the action was intentional.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Discuss with the user the affected users as a result of this action to mitigate operational discrepencies.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Identity and Access Audit", + "Tactic: Impact", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Google Workspace admin roles may be deleted by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://support.google.com/a/answer/2406043?hl=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1531", + "name": "Account Access Removal", + "reference": "https://attack.mitre.org/techniques/T1531/" + } + ] + } + ], + "id": "fda0574e-d81b-44cd-bb14-4c5f41adaded", + "rule_id": "93e63c3e-4154-4fc6-9f86-b411e0987bbf", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:DELETE_ROLE\n", + "language": "kuery" + }, + { + "name": "Group Policy Discovery via Microsoft GPResult Utility", + "description": "Detects the usage of gpresult.exe to query group policy objects. Attackers may query group policy objects during the reconnaissance phase after compromising a system to gain a better understanding of the active directory environment and possible methods to escalate privileges or move laterally.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1615", + "name": "Group Policy Discovery", + "reference": "https://attack.mitre.org/techniques/T1615/" + } + ] + } + ], + "id": "0f6c3d06-0ac4-4475-8043-9d06985d5a90", + "rule_id": "94a401ba-4fa2-455c-b7ae-b6e037afc0b7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(process.name: \"gpresult.exe\" or process.pe.original_file_name == \"gprslt.exe\") and process.args: (\"/z\", \"/v\", \"/r\", \"/x\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Google Workspace Custom Gmail Route Created or Modified", + "description": "Detects when a custom Gmail route is added or modified in Google Workspace. Adversaries can add a custom e-mail route for outbound mail to route these e-mails to their own inbox of choice for data gathering. This allows adversaries to capture sensitive information from e-mail and potential attachments, such as invoices or payment documents. By default, all email from current Google Workspace users with accounts are routed through a domain's mail server for inbound and outbound mail.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace Custom Gmail Route Created or Modified\n\nGmail is a popular cloud-based email service developed and managed by Google. Gmail is one of many services available for users with Google Workspace accounts.\n\nThreat actors often send phishing emails containing malicious URL links or attachments to corporate Gmail accounts. Google Workspace identity relies on the corporate user Gmail account and if stolen, allows threat actors to further their intrusion efforts from valid user accounts.\n\nThis rule identifies the creation of a custom global Gmail route by an administrator from the Google Workspace admin console. Custom email routes could indicate an attempt to secretly forward sensitive emails to unintentional recipients.\n\n#### Possible investigation steps\n\n- Identify the user account that created the custom email route and verify that they should have administrative privileges.\n- Review the added recipients from the custom email route and confidentiality of potential email contents.\n- Identify the user account, then review `event.action` values for related activity within the last 48 hours.\n- If the Google Workspace license is Enterprise Plus or Education Plus, search for emails matching the route filters. To find the Gmail event logs, go to `Reporting > Audit and investigation > Gmail log events`.\n- If existing emails have been sent and match the custom route criteria, review the sender and contents for malicious URL links and attachments.\n- Identified URLs or attachments can be submitted to VirusTotal for reputational services.\n\n### False positive analysis\n\n- This rule searches for domain-wide custom email routes created in the admin console of Google Workspace. Administrators might create custom email routes to fulfill organizational requirements.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 106, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Tactic: Collection", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Administrators may create custom email routes in Google Workspace based on organizational policies, administrative preference or for security purposes regarding spam." + ], + "references": [ + "https://support.google.com/a/answer/2685650?hl=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1114", + "name": "Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/", + "subtechnique": [ + { + "id": "T1114.003", + "name": "Email Forwarding Rule", + "reference": "https://attack.mitre.org/techniques/T1114/003/" + } + ] + } + ] + } + ], + "id": "c96e87b8-4a7e-4b49-8723-853a9083c193", + "rule_id": "9510add4-3392-11ed-bd01-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.admin.setting.name", + "type": "keyword", + "ecs": false + }, + { + "name": "google_workspace.event.type", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:\"google_workspace.admin\" and event.action:(\"CREATE_GMAIL_SETTING\" or \"CHANGE_GMAIL_SETTING\")\n and google_workspace.event.type:\"EMAIL_SETTINGS\" and google_workspace.admin.setting.name:(\"EMAIL_ROUTE\" or \"MESSAGE_SECURITY_RULE\")\n", + "language": "kuery" + }, + { + "name": "Remote Scheduled Task Creation", + "description": "Identifies remote scheduled task creations on a target host. This could be indicative of adversary lateral movement.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remote Scheduled Task Creation\n\n[Scheduled tasks](https://docs.microsoft.com/en-us/windows/win32/taskschd/about-the-task-scheduler) are a great mechanism for persistence and program execution. These features can be used remotely for a variety of legitimate reasons, but at the same time used by malware and adversaries. When investigating scheduled tasks that were set up remotely, one of the first steps should be to determine the original intent behind the configuration and to verify if the activity is tied to benign behavior such as software installation or any kind of network administrator work. One objective for these alerts is to understand the configured action within the scheduled task. This is captured within the registry event data for this rule and can be base64 decoded to view the value.\n\n#### Possible investigation steps\n\n- Review the base64 encoded tasks actions registry value to investigate the task configured action.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Further examination should include review of host-based artifacts and network logs from around when the scheduled task was created, on both the source and target machines.\n\n### False positive analysis\n\n- There is a high possibility of benign activity tied to the creation of remote scheduled tasks as it is a general feature within Windows and used for legitimate purposes for a wide range of activity. Any kind of context should be found to further understand the source of the activity and determine the intent based on the scheduled task's contents.\n\n### Related rules\n\n- Service Command Lateral Movement - d61cbcf8-1bc1-4cff-85ba-e7b21c5beedc\n- Remotely Started Services via RPC - aa9a274d-6b53-424d-ac5e-cb8ca4251650\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Remove scheduled task and any other related artifacts.\n- Review privileged account management and user account management settings. Consider implementing group policy object (GPO) policies to further restrict activity, or configuring settings that only allow administrators to create remote scheduled tasks.\n", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "c4352786-a04a-4345-9000-fbce9e5230dc", + "rule_id": "954ee7c8-5437-49ae-b2d6-2960883898e9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "source.port", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "/* Task Scheduler service incoming connection followed by TaskCache registry modification */\n\nsequence by host.id, process.entity_id with maxspan = 1m\n [network where host.os.type == \"windows\" and process.name : \"svchost.exe\" and\n network.direction : (\"incoming\", \"ingress\") and source.port >= 49152 and destination.port >= 49152 and\n source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ]\n [registry where host.os.type == \"windows\" and registry.path : \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\TaskCache\\\\Tasks\\\\*\\\\Actions\"]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Access to Keychain Credentials Directories", + "description": "Adversaries may collect the keychain storage data from a system to acquire credentials. Keychains are the built-in way for macOS to keep track of users' passwords and credentials for many services and features such as WiFi passwords, websites, secure notes and certificates.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://objective-see.com/blog/blog_0x25.html", + "https://securelist.com/calisto-trojan-for-macos/86543/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/", + "subtechnique": [ + { + "id": "T1555.001", + "name": "Keychain", + "reference": "https://attack.mitre.org/techniques/T1555/001/" + } + ] + } + ] + } + ], + "id": "1c212cbf-393f-41dd-85af-a4af9725ac09", + "rule_id": "96e90768-c3b7-4df6-b5d9-6237f8bc36a8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.args :\n (\n \"/Users/*/Library/Keychains/*\",\n \"/Library/Keychains/*\",\n \"/Network/Library/Keychains/*\",\n \"System.keychain\",\n \"login.keychain-db\",\n \"login.keychain\"\n ) and\n not process.args : (\"find-certificate\",\n \"add-trusted-cert\",\n \"set-keychain-settings\",\n \"delete-certificate\",\n \"/Users/*/Library/Keychains/openvpn.keychain-db\",\n \"show-keychain-info\",\n \"lock-keychain\",\n \"set-key-partition-list\",\n \"import\",\n \"find-identity\") and\n not process.parent.executable :\n (\n \"/Applications/OpenVPN Connect/OpenVPN Connect.app/Contents/MacOS/OpenVPN Connect\",\n \"/Applications/Microsoft Defender.app/Contents/MacOS/wdavdaemon_enterprise.app/Contents/MacOS/wdavdaemon_enterprise\",\n \"/opt/jc/bin/jumpcloud-agent\"\n ) and\n not process.executable : \"/opt/jc/bin/jumpcloud-agent\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "MacOS Installer Package Spawns Network Event", + "description": "Detects the execution of a MacOS installer package with an abnormal child process (e.g bash) followed immediately by a network connection via a suspicious process (e.g curl). Threat actors will build and distribute malicious MacOS installer packages, which have a .pkg extension, many times imitating valid software in order to persuade and infect their victims often using the package files (e.g pre/post install scripts etc.) to download additional tools or malicious software. If this rule fires it should indicate the installation of a malicious or suspicious package.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Command and Control", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Custom organization-specific macOS packages that use .pkg files to run cURL could trigger this rule. If known behavior is causing false positives, it can be excluded from the rule." + ], + "references": [ + "https://redcanary.com/blog/clipping-silver-sparrows-wings", + "https://posts.specterops.io/introducing-mystikal-4fbd2f7ae520", + "https://github.com/D00MFist/Mystikal" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.007", + "name": "JavaScript", + "reference": "https://attack.mitre.org/techniques/T1059/007/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/", + "subtechnique": [ + { + "id": "T1071.001", + "name": "Web Protocols", + "reference": "https://attack.mitre.org/techniques/T1071/001/" + } + ] + } + ] + } + ], + "id": "67ce7dc7-e9d1-4a03-b071-6ed2f106e12b", + "rule_id": "99239e7d-b0d4-46e3-8609-acafcf99f68c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, user.id with maxspan=30s\n[process where host.os.type == \"macos\" and event.type == \"start\" and event.action == \"exec\" and process.parent.name : (\"installer\", \"package_script_service\") and process.name : (\"bash\", \"sh\", \"zsh\", \"python\", \"osascript\", \"tclsh*\")]\n[network where host.os.type == \"macos\" and event.type == \"start\" and process.name : (\"curl\", \"osascript\", \"wget\", \"python\")]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Spike in Failed Logon Events", + "description": "A machine learning job found an unusually large spike in authentication failure events. This can be due to password spraying, user enumeration or brute force activity and may be a precursor to account takeover or credentialed access.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Spike in Failed Logon Events\n\nThis rule uses a machine learning job to detect a substantial spike in failed authentication events. This could indicate attempts to enumerate users, password spraying, brute force, etc.\n\n#### Possible investigation steps\n\n- Identify the users involved and if the activity targets a specific user or a set of users.\n- Check if the authentication comes from different sources.\n- Investigate if the host where the failed authentication events occur is exposed to the internet.\n - If the host is exposed to the internet, and the source of these attempts is external, the activity can be related to bot activity and possibly not directed at your organization.\n - If the host is not exposed to the internet, investigate the hosts where the authentication attempts are coming from, as this can indicate that they are compromised and the attacker is trying to move laterally.\n- Investigate other alerts associated with the involved users and hosts during the past 48 hours.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Investigate whether there are successful authentication events from the involved sources. This could indicate a successful brute force or password spraying attack.\n\n### False positive analysis\n\n- If the account is used in automation tasks, it is possible that they are using expired credentials, causing a spike in authentication failures.\n- Authentication failures can be related to permission issues.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Assess whether the asset should be exposed to the internet, and take action to reduce your attack surface.\n - If the asset needs to be exposed to the internet, restrict access to remote login services to specific IPs.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 104, + "tags": [ + "Use Case: Identity and Access Audit", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Credential Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A misconfigured service account can trigger this alert. A password change on an account used by an email client can trigger this alert. Security test cycles that include brute force or password spraying activities may trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "11c2033b-1593-4725-91c5-5cb5aa5e7671", + "rule_id": "99dcf974-6587-4f65-9252-d866a3fdfd9c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "auth_high_count_logon_fails" + }, + { + "name": "Remote Logon followed by Scheduled Task Creation", + "description": "Identifies a remote logon followed by a scheduled task creation on the target host. This could be indicative of adversary lateral movement.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Remote Scheduled Task Creation\n\n[Scheduled tasks](https://docs.microsoft.com/en-us/windows/win32/taskschd/about-the-task-scheduler) are a great mechanism for persistence and program execution. These features can be used remotely for a variety of legitimate reasons, but at the same time used by malware and adversaries. When investigating scheduled tasks that were set up remotely, one of the first steps should be to determine the original intent behind the configuration and to verify if the activity is tied to benign behavior such as software installation or any kind of network administrator work. One objective for these alerts is to understand the configured action within the scheduled task. This is captured within the registry event data for this rule and can be base64 decoded to view the value.\n\n#### Possible investigation steps\n\n- Review the TaskContent value to investigate the task configured action.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Further examination should include review of host-based artifacts and network logs from around when the scheduled task was created, on both the source and target machines.\n\n### False positive analysis\n\n- There is a high possibility of benign activity tied to the creation of remote scheduled tasks as it is a general feature within Windows and used for legitimate purposes for a wide range of activity. Any kind of context should be found to further understand the source of the activity and determine the intent based on the scheduled task's contents.\n\n### Related rules\n\n- Service Command Lateral Movement - d61cbcf8-1bc1-4cff-85ba-e7b21c5beedc\n- Remotely Started Services via RPC - aa9a274d-6b53-424d-ac5e-cb8ca4251650\n- Remote Scheduled Task Creation - 954ee7c8-5437-49ae-b2d6-2960883898e9\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Remove scheduled task and any other related artifacts.\n- Review privileged account management and user account management settings. Consider implementing group policy object (GPO) policies to further restrict activity, or configuring settings that only allow administrators to create remote scheduled tasks.\n", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "76d989ec-f1b4-434f-96dd-6679c81e1c87", + "rule_id": "9c865691-5599-447a-bac9-b3f2df5f9a9d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectLogonId", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectUserName", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetLogonId", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.logon.type", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "/* Network Logon followed by Scheduled Task creation */\n\nsequence by winlog.computer_name with maxspan=1m\n [authentication where event.action == \"logged-in\" and\n winlog.logon.type == \"Network\" and event.outcome == \"success\" and\n not user.name == \"ANONYMOUS LOGON\" and not winlog.event_data.SubjectUserName : \"*$\" and\n not user.domain == \"NT AUTHORITY\" and source.ip != \"127.0.0.1\" and source.ip !=\"::1\"] by winlog.event_data.TargetLogonId\n\n [iam where event.action == \"scheduled-task-created\"] by winlog.event_data.SubjectLogonId\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Process Injection by the Microsoft Build Engine", + "description": "An instance of MSBuild, the Microsoft Build Engine, created a thread in another process. This technique is sometimes used to evade detection or elevate privileges.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Privilege Escalation", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + }, + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + } + ], + "id": "08a3a24a-53bd-4928-8bc3-e9f643546f26", + "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "process.name:MSBuild.exe and host.os.type:windows and event.action:\"CreateRemoteThread detected (rule: CreateRemoteThread)\"\n", + "language": "kuery" + }, + { + "name": "LaunchDaemon Creation or Modification and Immediate Loading", + "description": "Indicates the creation or modification of a launch daemon, which adversaries may use to repeatedly execute malicious payloads as part of persistence.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trusted applications persisting via LaunchDaemons" + ], + "references": [ + "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/" + } + ] + } + ], + "id": "2a8ea69c-b841-453c-904b-943f0554f3b3", + "rule_id": "9d19ece6-c20e-481a-90c5-ccca596537de", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=1m\n [file where host.os.type == \"macos\" and event.type != \"deletion\" and file.path : (\"/System/Library/LaunchDaemons/*\", \"/Library/LaunchDaemons/*\")]\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name == \"launchctl\" and process.args == \"load\"]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual Linux Process Calling the Metadata Service", + "description": "Looks for anomalous access to the metadata service by an unusual process. The metadata service may be targeted in order to harvest credentials or user data scripts containing secrets.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program or one that runs very rarely as part of a monthly or quarterly workflow could trigger this detection rule." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.005", + "name": "Cloud Instance Metadata API", + "reference": "https://attack.mitre.org/techniques/T1552/005/" + } + ] + } + ] + } + ], + "id": "e3793710-8ccd-4a7d-828d-7fd474738fce", + "rule_id": "9d302377-d226-4e12-b54c-1906b5aec4f6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_linux_rare_metadata_process" + ] + }, + { + "name": "InstallUtil Process Making Network Connections", + "description": "Identifies InstallUtil.exe making outbound network connections. This may indicate adversarial activity as InstallUtil is often leveraged by adversaries to execute code and evade detection.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.004", + "name": "InstallUtil", + "reference": "https://attack.mitre.org/techniques/T1218/004/" + } + ] + } + ] + } + ], + "id": "63796665-a801-4f3e-b79c-18d142935b67", + "rule_id": "a13167f1-eec2-4015-9631-1fee60406dcf", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "/* the benefit of doing this as an eql sequence vs kql is this will limit to alerting only on the first network connection */\n\nsequence by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"installutil.exe\"]\n [network where host.os.type == \"windows\" and process.name : \"installutil.exe\" and network.direction : (\"outgoing\", \"egress\")]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Windows Subsystem for Linux Distribution Installed", + "description": "Detects changes to the registry that indicates the install of a new Windows Subsystem for Linux distribution by name. Adversaries may enable and use WSL for Linux to avoid detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "timeline_id": "3e47ef71-ebfc-4520-975c-cb27fc090799", + "timeline_title": "Comprehensive Registry Timeline", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://learn.microsoft.com/en-us/windows/wsl/wsl-config" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + }, + { + "id": "T1202", + "name": "Indirect Command Execution", + "reference": "https://attack.mitre.org/techniques/T1202/" + } + ] + } + ], + "id": "facf7f66-86a1-4a57-8e77-25962165c82c", + "rule_id": "a1699af0-8e1e-4ed0-8ec1-89783538a061", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and\n registry.path : \n (\"HK*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Lxss\\\\*\\\\PackageFamilyName\",\n \"\\\\REGISTRY\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Lxss\\\\*\\\\PackageFamilyName\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Google Workspace Restrictions for Google Marketplace Modified to Allow Any App", + "description": "Detects when the Google Marketplace restrictions are changed to allow any application for users in Google Workspace. Malicious APKs created by adversaries may be uploaded to the Google marketplace but not installed on devices managed within Google Workspace. Administrators should set restrictions to not allow any application from the marketplace for security reasons. Adversaries may enable any app to be installed and executed on mobile devices within a Google Workspace environment prior to distributing the malicious APK to the end user.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace Restrictions for Google Marketplace Modified to Allow Any App\n\nGoogle Workspace Marketplace is an online store for free and paid web applications that work with Google Workspace services and third-party software. Listed applications are based on Google APIs or Google Apps Script and created by both Google and third-party developers.\n\nMarketplace applications require access to specific Google Workspace resources. Applications can be installed by individual users, if they have permission, or can be installed for an entire Google Workspace domain by administrators. Consent screens typically display what permissions and privileges the application requires during installation. As a result, malicious Marketplace applications may require more permissions than necessary or have malicious intent.\n\nGoogle clearly states that they are not responsible for any product on the Marketplace that originates from a source other than Google.\n\nThis rule identifies when the global allow-all setting is enabled for Google Workspace Marketplace applications.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- This rule relies on data from `google_workspace.admin`, thus indicating the associated user has administrative privileges to the Marketplace.\n- Search for `event.action` is `ADD_APPLICATION` to identify applications installed after these changes were made.\n - The `google_workspace.admin.application.name` field will help identify what applications were added.\n- With the user account, review other potentially related events within the last 48 hours.\n- Re-assess the permissions and reviews of the Marketplace applications to determine if they violate organizational policies or introduce unexpected risks.\n- With access to the Google Workspace admin console, determine if the application was installed domain-wide or individually by visiting `Apps > Google Workspace Marketplace Apps`.\n\n### False positive analysis\n\n- Identify the user account associated with this action and assess their administrative privileges with Google Workspace Marketplace.\n- Google Workspace administrators may intentionally add an application from the marketplace based on organizational needs.\n - Follow up with the user who added the application to ensure this was intended.\n- Verify the application identified has been assessed thoroughly by an administrator.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 106, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Applications can be added and removed from blocklists by Google Workspace administrators, but they can all be explicitly allowed for users. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://support.google.com/a/answer/6089179?hl=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "d3625acb-bd42-4bc6-9592-f90a331d3a71", + "rule_id": "a2795334-2499-11ed-9e1a-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.admin.application.name", + "type": "keyword", + "ecs": false + }, + { + "name": "google_workspace.admin.new_value", + "type": "keyword", + "ecs": false + }, + { + "name": "google_workspace.admin.setting.name", + "type": "keyword", + "ecs": false + }, + { + "name": "google_workspace.event.type", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:\"google_workspace.admin\" and event.action:\"CHANGE_APPLICATION_SETTING\" and event.category:(iam or configuration)\n and google_workspace.event.type:\"APPLICATION_SETTINGS\" and google_workspace.admin.application.name:\"Google Workspace Marketplace\"\n and google_workspace.admin.setting.name:\"Apps Access Setting Allowlist access\" and google_workspace.admin.new_value:\"ALLOW_ALL\"\n", + "language": "kuery" + }, + { + "name": "Execution via local SxS Shared Module", + "description": "Identifies the creation, change, or deletion of a DLL module within a Windows SxS local folder. Adversaries may abuse shared modules to execute malicious payloads by instructing the Windows module loader to load DLLs from arbitrary local paths.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\nThe SxS DotLocal folder is a legitimate feature that can be abused to hijack standard modules loading order by forcing an executable on the same application.exe.local folder to load a malicious DLL module from the same directory.", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1129", + "name": "Shared Modules", + "reference": "https://attack.mitre.org/techniques/T1129/" + } + ] + } + ], + "id": "f82b921c-ffb8-4fcc-af28-9e85e031f6c9", + "rule_id": "a3ea12f3-0d4e-4667-8b44-4230c63f3c75", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and file.extension : \"dll\" and file.path : \"C:\\\\*\\\\*.exe.local\\\\*.dll\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Windows Registry File Creation in SMB Share", + "description": "Identifies the creation or modification of a medium-size registry hive file on a Server Message Block (SMB) share, which may indicate an exfiltration attempt of a previously dumped Security Account Manager (SAM) registry hive for credential extraction on an attacker-controlled system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Windows Registry File Creation in SMB Share\n\nDumping registry hives is a common way to access credential information. Some hives store credential material, as is the case for the SAM hive, which stores locally cached credentials (SAM secrets), and the SECURITY hive, which stores domain cached credentials (LSA secrets). Dumping these hives in combination with the SYSTEM hive enables the attacker to decrypt these secrets.\n\nAttackers can try to evade detection on the host by transferring this data to a system that is not monitored to be parsed and decrypted. This rule identifies the creation or modification of a medium-size registry hive file on an SMB share, which may indicate this kind of exfiltration attempt.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/source host during the past 48 hours.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Inspect the source host for suspicious or abnormal behaviors in the alert timeframe.\n- Capture the registry file(s) to determine the extent of the credential compromise in an eventual incident response.\n\n### False positive analysis\n\n- Administrators can export registry hives for backup purposes. Check whether the user should be performing this kind of activity and is aware of it.\n\n### Related rules\n\n- Credential Acquisition via Registry Hive Dumping - a7e7bfa3-088e-4f13-b29e-3986e0e756b8\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system and restore compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.002", + "name": "Security Account Manager", + "reference": "https://attack.mitre.org/techniques/T1003/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.002", + "name": "SMB/Windows Admin Shares", + "reference": "https://attack.mitre.org/techniques/T1021/002/" + } + ] + } + ] + } + ], + "id": "3b616155-863b-4967-8f73-52df8930d583", + "rule_id": "a4c7473a-5cb4-4bc1-9d06-e4a75adbc494", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.header_bytes", + "type": "unknown", + "ecs": false + }, + { + "name": "file.size", + "type": "long", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n /* regf file header */\n file.Ext.header_bytes : \"72656766*\" and file.size >= 30000 and\n process.pid == 4 and user.id : (\"S-1-5-21*\", \"S-1-12-1-*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Threat Intel Windows Registry Indicator Match", + "description": "This rule is triggered when a Windows registry indicator from the Threat Intel Filebeat module or integrations has a match against an event that contains registry data.", + "risk_score": 99, + "severity": "critical", + "timeline_id": "495ad7a7-316e-4544-8a0f-9c098daee76e", + "timeline_title": "Generic Threat Match Timeline", + "license": "Elastic License v2", + "note": "## Triage and Analysis\n\n### Investigating Threat Intel Windows Registry Indicator Match\n\nThreat Intel indicator match rules allow matching from a local observation, such as an endpoint event that records a file hash with an entry of a file hash stored within the Threat Intel integrations index. \n\nMatches are based on threat intelligence data that's been ingested during the last 30 days. Some integrations don't place expiration dates on their threat indicators, so we strongly recommend validating ingested threat indicators and reviewing match results. When reviewing match results, check associated activity to determine whether the event requires additional investigation.\n\nThis rule is triggered when a Windows registry indicator from the Threat Intel Filebeat module or a threat intelligence integration matches against an event that contains registry data.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Check related threat reports to gain context about the registry indicator of compromise (IoC) and to understand if it's a system-native mechanism abused for persistence, to store data, to disable security mechanisms, etc. Use this information to define the appropriate triage and respond steps.\n- Identify the process responsible for the registry operation and investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Retrieve the involved process executable and examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Using the data collected through the analysis, scope users targeted and other machines infected in the environment.\n\n### False Positive Analysis\n\n- Adversaries can leverage dual-use registry mechanisms that are commonly used by normal applications. These registry keys can be added into indicator lists creating the potential for false positives.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nThis rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an [Elastic Agent integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#agent-ti-integration), the [Threat Intel module](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#ti-mod-integration), or a [custom integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#custom-ti-integration).\n\nMore information can be found [here](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html).", + "version": 3, + "tags": [ + "OS: Windows", + "Data Source: Elastic Endgame", + "Rule Type: Indicator Match" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "1h", + "from": "now-65m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-threatintel.html", + "https://www.elastic.co/guide/en/security/master/es-threat-intel-integrations.html", + "https://www.elastic.co/security/tip" + ], + "max_signals": 100, + "threat": [], + "id": "54525228-a077-44ea-99e9-498bdf2529fb", + "rule_id": "a61809f3-fb5b-465c-8bff-23a8a068ac60", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "This rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an Elastic Agent integration, the Threat Intel module, or a custom integration.\n\nMore information can be found here.", + "type": "threat_match", + "query": "registry.path:*\n", + "threat_query": "@timestamp >= \"now-30d/d\" and event.module:(threatintel or ti_*) and threat.indicator.registry.path:* and not labels.is_ioc_transform_source:\"true\"", + "threat_mapping": [ + { + "entries": [ + { + "field": "registry.path", + "type": "mapping", + "value": "threat.indicator.registry.path" + } + ] + } + ], + "threat_index": [ + "filebeat-*", + "logs-ti_*" + ], + "index": [ + "auditbeat-*", + "endgame-*", + "filebeat-*", + "logs-*", + "winlogbeat-*" + ], + "threat_filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.category", + "negate": false, + "params": { + "query": "threat" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.category": "threat" + } + } + }, + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.kind", + "negate": false, + "params": { + "query": "enrichment" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.kind": "enrichment" + } + } + }, + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.type", + "negate": false, + "params": { + "query": "indicator" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.type": "indicator" + } + } + } + ], + "threat_indicator_path": "threat.indicator", + "threat_language": "kuery", + "language": "kuery" + }, + { + "name": "Emond Rules Creation or Modification", + "description": "Identifies the creation or modification of the Event Monitor Daemon (emond) rules. Adversaries may abuse this service by writing a rule to execute commands when a defined event occurs, such as system start up or user authentication.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.xorrior.com/emond-persistence/", + "https://www.sentinelone.com/blog/how-malware-persists-on-macos/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.014", + "name": "Emond", + "reference": "https://attack.mitre.org/techniques/T1546/014/" + } + ] + } + ] + } + ], + "id": "8f7d49dd-bd2b-43db-8573-4d67fa9bdde1", + "rule_id": "a6bf4dd4-743e-4da8-8c03-3ebd753a6c90", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"macos\" and event.type != \"deletion\" and\n file.path : (\"/private/etc/emond.d/rules/*.plist\", \"/etc/emon.d/rules/*.plist\", \"/private/var/db/emondClients/*\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Credential Acquisition via Registry Hive Dumping", + "description": "Identifies attempts to export a registry hive which may contain credentials using the Windows reg.exe tool.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Credential Acquisition via Registry Hive Dumping\n\nDumping registry hives is a common way to access credential information as some hives store credential material.\n\nFor example, the SAM hive stores locally cached credentials (SAM Secrets), and the SECURITY hive stores domain cached credentials (LSA secrets).\n\nDumping these hives in combination with the SYSTEM hive enables the attacker to decrypt these secrets.\n\nThis rule identifies the usage of `reg.exe` to dump SECURITY and/or SAM hives, which potentially indicates the compromise of the credentials stored in the host.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate if the credential material was exfiltrated or processed locally by other tools.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (e.g., 4624) to the target host.\n\n### False positive analysis\n\n- Administrators can export registry hives for backup purposes using command line tools like `reg.exe`. Check whether the user is legitamitely performing this kind of activity.\n\n### Related rules\n\n- Registry Hive File Creation via SMB - a4c7473a-5cb4-4bc1-9d06-e4a75adbc494\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system and restore compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://medium.com/threatpunter/detecting-attempts-to-steal-passwords-from-the-registry-7512674487f8", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.002", + "name": "Security Account Manager", + "reference": "https://attack.mitre.org/techniques/T1003/002/" + }, + { + "id": "T1003.004", + "name": "LSA Secrets", + "reference": "https://attack.mitre.org/techniques/T1003/004/" + } + ] + } + ] + } + ], + "id": "8900daa6-de9d-4fdb-b7ac-5e5440911cc2", + "rule_id": "a7e7bfa3-088e-4f13-b29e-3986e0e756b8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name == \"reg.exe\" and\n process.args : (\"save\", \"export\") and\n process.args : (\"hklm\\\\sam\", \"hklm\\\\security\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Google Workspace Password Policy Modified", + "description": "Detects when a Google Workspace password policy is modified. An adversary may attempt to modify a password policy in order to weaken an organization’s security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace Password Policy Modified\n\nGoogle Workspace administrators manage password policies to enforce password requirements for an organization's compliance needs. Administrators have the capability to set restrictions on password length, reset frequency, reuse capability, expiration, and much more. Google Workspace also allows multi-factor authentication (MFA) and 2-step verification (2SV) for authentication.\n\nThreat actors might rely on weak password policies or restrictions to attempt credential access by using password stuffing or spraying techniques for cloud-based user accounts. Administrators might introduce increased risk to credential access from a third-party by weakening the password restrictions for an organization.\n\nThis rule detects when a Google Workspace password policy is modified to decrease password complexity or to adjust the reuse and reset frequency.\n\n#### Possible investigation steps\n\n- Identify associated user account(s) by reviewing the `user.name` or `source.user.email` fields in the alert.\n- Identify the password setting that was created or adjusted by reviewing `google_workspace.admin.setting.name` field.\n- Check if a password setting was enabled or disabled by reviewing the `google_workspace.admin.new_value` and `google_workspace.admin.old_value` fields.\n- After identifying the involved user, verify administrative privileges are scoped properly to change.\n- Filter `event.dataset` for `google_workspace.login` and aggregate by `user.name`, `event.action`.\n - The `google_workspace.login.challenge_method` field can be used to identify the challenge method used for failed and successful logins.\n\n### False positive analysis\n\n- After identifying the user account that updated the password policy, verify whether the action was intentional.\n- Verify whether the user should have administrative privileges in Google Workspace to modify password policies.\n- Review organizational units or groups the role may have been added to and ensure the new privileges align properly.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider resetting passwords for potentially affected users.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate multi-factor authentication for the user.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators might observe lag times ranging from several minutes to 3 days between the event occurrence time and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Identity and Access Audit", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Password policies may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "f1768fdd-854b-423e-9a74-a17269148ace", + "rule_id": "a99f82f5-8e77-4f8b-b3ce-10c0f6afbc73", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.admin.setting.name", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, the Filebeat module, or data that's similarly structured is required for this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and\n event.action:(CHANGE_APPLICATION_SETTING or CREATE_APPLICATION_SETTING) and\n google_workspace.admin.setting.name:(\n \"Password Management - Enforce strong password\" or\n \"Password Management - Password reset frequency\" or\n \"Password Management - Enable password reuse\" or\n \"Password Management - Enforce password policy at next login\" or\n \"Password Management - Minimum password length\" or\n \"Password Management - Maximum password length\"\n )\n", + "language": "kuery" + }, + { + "name": "Unusual Windows Process Calling the Metadata Service", + "description": "Looks for anomalous access to the metadata service by an unusual process. The metadata service may be targeted in order to harvest credentials or user data scripts containing secrets.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program or one that runs very rarely as part of a monthly or quarterly workflow could trigger this detection rule." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.005", + "name": "Cloud Instance Metadata API", + "reference": "https://attack.mitre.org/techniques/T1552/005/" + } + ] + } + ] + } + ], + "id": "0a6d6056-d9e2-4949-991e-2b9501bb893c", + "rule_id": "abae61a8-c560-4dbd-acca-1e1438bff36b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_windows_rare_metadata_process" + ] + }, + { + "name": "Potential Persistence via Login Hook", + "description": "Identifies the creation or modification of the login window property list (plist). Adversaries may modify plist files to run a program during system boot or user login for persistence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\nStarting in Mac OS X 10.7 (Lion), users can specify certain applications to be re-opened when a user reboots their machine. This can be abused to establish or maintain persistence on a compromised system.", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/D00MFist/PersistentJXA/blob/master/LoginScript.js" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1647", + "name": "Plist File Modification", + "reference": "https://attack.mitre.org/techniques/T1647/" + } + ] + } + ], + "id": "4fe37c81-3709-4078-b967-8b8f3f9d74f2", + "rule_id": "ac412404-57a5-476f-858f-4e8fbb4f48d8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:file and host.os.type:macos and not event.type:\"deletion\" and\n file.name:\"com.apple.loginwindow.plist\" and\n process.name:(* and not (systemmigrationd or DesktopServicesHelper or diskmanagementd or rsync or launchd or cfprefsd or xpcproxy or ManagedClient or MCXCompositor or backupd or \"iMazing Profile Editor\"\n))\n", + "language": "kuery" + }, + { + "name": "Google Workspace API Access Granted via Domain-Wide Delegation of Authority", + "description": "Detects when a domain-wide delegation of authority is granted to a service account. Domain-wide delegation can be configured to grant third-party and internal applications to access the data of Google Workspace users. An adversary may configure domain-wide delegation to maintain access to their target’s data.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating API Access Granted via Domain-Wide Delegation of Authority\n\nDomain-wide delegation is a feature that allows apps to access users' data across an organization's Google Workspace environment. Only super admins can manage domain-wide delegation, and they must specify each API scope that the application can access. Google Workspace services all have APIs that can be interacted with after domain-wide delegation is established with an OAuth2 client ID of the application. Typically, GCP service accounts and applications are created where the Google Workspace APIs are enabled, thus allowing the application to access resources and services in Google Workspace.\n\nApplications authorized to interact with Google Workspace resources and services through APIs have a wide range of capabilities depending on the scopes applied. If the principle of least privilege (PoLP) is not practiced when setting API scopes, threat actors could abuse additional privileges if the application is compromised. New applications created and given API access could indicate an attempt by a threat actor to register their malicious application with the Google Workspace domain in an attempt to establish a command and control foothold.\n\nThis rule identifies when an application is authorized API client access.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n - Only users with super admin privileges can authorize API client access.\n- Identify the API client name by reviewing the `google_workspace.admin.api.client.name` field in the alert.\n - If GCP audit logs are ingested, pivot to reviewing the last 48 hours of activity related to the service account ID.\n - Search for the `google_workspace.admin.api.client.name` value with wildcards in the `gcp.audit.resource_name` field.\n - Search for API client name and aggregated results on `event.action` to determine what the service account is being used for in GWS.\n- After identifying the involved user, verify super administrative privileges to access domain-wide delegation settings.\n\n### False positive analysis\n\n- Changes to domain-wide delegation require super admin privileges. Check with the user to ensure these changes were expected.\n- Review scheduled maintenance notes related to expected API access changes.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Review the scope of the authorized API client access in Google Workspace.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Domain-wide delegation of authority may be granted to service accounts by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://developers.google.com/admin-sdk/directory/v1/guides/delegation" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "b7a98a60-0ece-49e0-ba5e-30e68c605de8", + "rule_id": "acbc8bb9-2486-49a8-8779-45fb5f9a93ee", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:AUTHORIZE_API_CLIENT_ACCESS\n", + "language": "kuery" + }, + { + "name": "Potential Command and Control via Internet Explorer", + "description": "Identifies instances of Internet Explorer (iexplore.exe) being started via the Component Object Model (COM) making unusual network connections. Adversaries could abuse Internet Explorer via COM to avoid suspicious processes making network connections and bypass host-based firewall restrictions.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Processes such as MS Office using IEproxy to render HTML content." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1559", + "name": "Inter-Process Communication", + "reference": "https://attack.mitre.org/techniques/T1559/", + "subtechnique": [ + { + "id": "T1559.001", + "name": "Component Object Model", + "reference": "https://attack.mitre.org/techniques/T1559/001/" + } + ] + } + ] + } + ], + "id": "45b5f4c5-0c76-4017-a850-c8dee7da426d", + "rule_id": "acd611f3-2b93-47b3-a0a3-7723bcc46f6d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "dns.question.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, user.name with maxspan = 5s\n [library where host.os.type == \"windows\" and dll.name : \"IEProxy.dll\" and process.name : (\"rundll32.exe\", \"regsvr32.exe\")]\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"iexplore.exe\" and process.parent.args : \"-Embedding\"]\n /* IE started via COM in normal conditions makes few connections, mainly to Microsoft and OCSP related domains, add FPs here */\n [network where host.os.type == \"windows\" and network.protocol == \"dns\" and process.name : \"iexplore.exe\" and\n not dns.question.name :\n (\n \"*.microsoft.com\",\n \"*.digicert.com\",\n \"*.msocsp.com\",\n \"*.windowsupdate.com\",\n \"*.bing.com\",\n \"*.identrust.com\",\n \"*.sharepoint.com\",\n \"*.office365.com\",\n \"*.office.com\"\n )\n ] /* with runs=5 */\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Potential macOS SSH Brute Force Detected", + "description": "Identifies a high number (20) of macOS SSH KeyGen process executions from the same host. An adversary may attempt a brute force attack to obtain unauthorized access to user accounts.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://themittenmac.com/detecting-ssh-activity-via-process-monitoring/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "da76ace8-a0a0-40f9-acb7-f26d8599a795", + "rule_id": "ace1e989-a541-44df-93a8-a8b0591b63c0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "event.category:process and host.os.type:macos and event.type:start and process.name:\"sshd-keygen-wrapper\" and process.parent.name:launchd\n", + "threshold": { + "field": [ + "host.id" + ], + "value": 20 + }, + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "Google Workspace Custom Admin Role Created", + "description": "Detects when a custom admin role is created in Google Workspace. An adversary may create a custom admin role in order to elevate the permissions of other user accounts and persist in their target’s environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace Custom Admin Role Created\n\nGoogle Workspace roles allow administrators to assign specific permissions to users or groups where the principle of least privilege (PoLP) is recommended. Admin roles in Google Workspace grant users access to the Google Admin console, where more domain-wide settings are accessible. Google Workspace contains prebuilt administrator roles for performing business functions related to users, groups, and services. Custom administrator roles can be created where prebuilt roles are not preferred.\n\nRoles assigned to users will grant them additional permissions and privileges within the Google Workspace domain. Threat actors might create new admin roles with privileges to advance their intrusion efforts and laterally move throughout the organization if existing roles or users do not have privileges aligned with their modus operandi. Users with unexpected privileges from new admin roles may also cause operational dysfunction if unfamiliar settings are adjusted without warning. Instead of modifying existing roles, administrators might create new roles to accomplish short-term goals and unintentionally introduce additional risk exposure.\n\nThis rule identifies when a Google Workspace administrative role is added within the Google Workspace admin console.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- Identify the role added by reviewing the `google_workspace.admin.role.name` field in the alert.\n- After identifying the involved user, verify if they should have administrative privileges to add administrative roles.\n- To identify if users have been assigned this role, search for `event.action: ASSIGN_ROLE`.\n - Add `google_workspace.admin.role.name` with the role added as an additional filter.\n - Adjust the relative time accordingly to identify all users that were possibly assigned this admin role.\n- Monitor users assigned the admin role for the next 24 hours and look for attempts to use related privileges.\n - The `event.provider` field will help filter for specific services in Google Workspace such as Drive or Admin.\n - The `event.action` field will help trace what actions are being taken by users.\n\n### False positive analysis\n\n- After identifying the user account that created the role, verify whether the action was intentional.\n- Verify that the user who created the role should have administrative privileges in Google Workspace to create custom roles.\n- Review organizational units or groups the role may have been added to and ensure the new privileges align properly.\n- Create a filter with the user's `user.name` and filter for `event.action`. In the results, check if there are multiple `CREATE_ROLE` actions and note whether they are new or historical.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Custom Google Workspace admin roles may be created by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://support.google.com/a/answer/2406043?hl=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "a4716539-c36a-48dc-9451-aadf6f210d19", + "rule_id": "ad3f2807-2b3e-47d7-b282-f84acbbe14be", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:CREATE_ROLE\n", + "language": "kuery" + }, + { + "name": "Kerberos Cached Credentials Dumping", + "description": "Identifies the use of the Kerberos credential cache (kcc) utility to dump locally cached Kerberos tickets. Adversaries may attempt to dump credential material in the form of tickets that can be leveraged for lateral movement.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/EmpireProject/EmPyre/blob/master/lib/modules/collection/osx/kerberosdump.py", + "https://opensource.apple.com/source/Heimdal/Heimdal-323.12/kuser/kcc-commands.in.auto.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + }, + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/", + "subtechnique": [ + { + "id": "T1558.003", + "name": "Kerberoasting", + "reference": "https://attack.mitre.org/techniques/T1558/003/" + } + ] + } + ] + } + ], + "id": "a58e6e13-2576-4641-980c-22ad13794c3f", + "rule_id": "ad88231f-e2ab-491c-8fc6-64746da26cfe", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:kcc and\n process.args:copy_cred_cache\n", + "language": "kuery" + }, + { + "name": "Suspicious Execution via Microsoft Office Add-Ins", + "description": "Identifies execution of common Microsoft Office applications to launch an Office Add-In from a suspicious path or with an unusual parent process. This may indicate an attempt to get initial access via a malicious phishing MS Office Add-In.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/Octoberfest7/XLL_Phishing", + "https://labs.f-secure.com/archive/add-in-opportunities-for-office-persistence/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1137", + "name": "Office Application Startup", + "reference": "https://attack.mitre.org/techniques/T1137/", + "subtechnique": [ + { + "id": "T1137.006", + "name": "Add-ins", + "reference": "https://attack.mitre.org/techniques/T1137/006/" + } + ] + } + ] + } + ], + "id": "895576cb-372c-435b-a44a-f379ae1887f3", + "rule_id": "ae8a142c-6a1d-4918-bea7-0b617e99ecfa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where \n \n host.os.type == \"windows\" and event.type == \"start\" and \n \n process.name : (\"WINWORD.EXE\", \"EXCEL.EXE\", \"POWERPNT.EXE\", \"MSACCESS.EXE\", \"VSTOInstaller.exe\") and \n \n process.args regex~ \"\"\".+\\.(wll|xll|ppa|ppam|xla|xlam|vsto)\"\"\" and \n \n /* Office Add-In from suspicious paths */\n (process.args :\n (\"?:\\\\Users\\\\*\\\\Temp\\\\7z*\",\n \"?:\\\\Users\\\\*\\\\Temp\\\\Rar$*\",\n \"?:\\\\Users\\\\*\\\\Temp\\\\Temp?_*\",\n \"?:\\\\Users\\\\*\\\\Temp\\\\BNZ.*\",\n \"?:\\\\Users\\\\*\\\\Downloads\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\*\",\n \"?:\\\\Users\\\\Public\\\\*\",\n \"?:\\\\ProgramData\\\\*\",\n \"?:\\\\Windows\\\\Temp\\\\*\",\n \"\\\\Device\\\\*\",\n \"http*\") or\n\t \n process.parent.name : (\"explorer.exe\", \"OpenWith.exe\") or \n \n /* Office Add-In from suspicious parent */\n process.parent.name : (\"cmd.exe\", \"powershell.exe\")) and\n\t \n /* False Positives */\n not (process.args : \"*.vsto\" and\n process.parent.executable :\n (\"?:\\\\Program Files\\\\Logitech\\\\LogiOptions\\\\PlugInInstallerUtility*.exe\",\n \"?:\\\\ProgramData\\\\Logishrd\\\\LogiOptions\\\\Plugins\\\\VSTO\\\\*\\\\VSTOInstaller.exe\",\n \"?:\\\\Program Files\\\\Logitech\\\\LogiOptions\\\\PlugInInstallerUtility.exe\",\n \"?:\\\\Program Files\\\\LogiOptionsPlus\\\\PlugInInstallerUtility*.exe\",\n \"?:\\\\ProgramData\\\\Logishrd\\\\LogiOptionsPlus\\\\Plugins\\\\VSTO\\\\*\\\\VSTOInstaller.exe\",\n \"?:\\\\Program Files\\\\Common Files\\\\microsoft shared\\\\VSTO\\\\*\\\\VSTOInstaller.exe\")) and\n not (process.args : \"/Uninstall\" and process.name : \"VSTOInstaller.exe\") and\n not (process.parent.name : \"rundll32.exe\" and\n process.parent.args : \"?:\\\\WINDOWS\\\\Installer\\\\MSI*.tmp,zzzzInvokeManagedCustomActionOutOfProc\") and\n not (process.name : \"VSTOInstaller.exe\" and process.args : \"https://dl.getsidekick.com/outlook/vsto/Sidekick.vsto\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Local Scheduled Task Creation", + "description": "Indicates the creation of a scheduled task. Adversaries can use these to establish persistence, move laterally, and/or escalate privileges.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate scheduled tasks may be created during installation of new software." + ], + "references": [ + "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1", + "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-2" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "86b86eb7-4bf3-47c3-bc4a-33aee69f0fba", + "rule_id": "afcce5ad-65de-4ed2-8516-5e093d3ac99a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.token.integrity_level_name", + "type": "unknown", + "ecs": false + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.IntegrityLevel", + "type": "keyword", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=1m\n [process where host.os.type == \"windows\" and event.type != \"end\" and\n ((process.name : (\"cmd.exe\", \"wscript.exe\", \"rundll32.exe\", \"regsvr32.exe\", \"wmic.exe\", \"mshta.exe\",\n \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\", \"WmiPrvSe.exe\", \"wsmprovhost.exe\", \"winrshost.exe\") or\n process.pe.original_file_name : (\"cmd.exe\", \"wscript.exe\", \"rundll32.exe\", \"regsvr32.exe\", \"wmic.exe\", \"mshta.exe\",\n \"powershell.exe\", \"pwsh.dll\", \"powershell_ise.exe\", \"WmiPrvSe.exe\", \"wsmprovhost.exe\",\n \"winrshost.exe\")) or\n process.code_signature.trusted == false)] by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"schtasks.exe\" or process.pe.original_file_name == \"schtasks.exe\") and\n process.args : (\"/create\", \"-create\") and process.args : (\"/RU\", \"/SC\", \"/TN\", \"/TR\", \"/F\", \"/XML\") and\n /* exclude SYSTEM Integrity Level - look for task creations by non-SYSTEM user */\n not (?process.Ext.token.integrity_level_name : \"System\" or ?winlog.event_data.IntegrityLevel : \"System\")\n ] by process.parent.entity_id\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Potential Privilege Escalation via Container Misconfiguration", + "description": "This rule monitors for the execution of processes that interact with Linux containers through an interactive shell without root permissions. Utilities such as runc and ctr are universal command-line utilities leveraged to interact with containers via root permissions. On systems where the access to these utilities are misconfigured, attackers might be able to create and run a container that mounts the root folder or spawn a privileged container vulnerable to a container escape attack, which might allow them to escalate privileges and gain further access onto the host file system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Domain: Container", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://book.hacktricks.xyz/linux-hardening/privilege-escalation/runc-privilege-escalation", + "https://book.hacktricks.xyz/linux-hardening/privilege-escalation/containerd-ctr-privilege-escalation" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1611", + "name": "Escape to Host", + "reference": "https://attack.mitre.org/techniques/T1611/" + } + ] + } + ], + "id": "ef3fe415-aef2-41d2-8a5a-7082df28b3fd", + "rule_id": "afe6b0eb-dd9d-4922-b08a-1910124d524d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "group.Ext.real.id", + "type": "unknown", + "ecs": false + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.interactive", + "type": "boolean", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.interactive", + "type": "boolean", + "ecs": true + }, + { + "name": "user.Ext.real.id", + "type": "unknown", + "ecs": false + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\nSession View uses process data collected by the Elastic Defend integration, but this data is not always collected by default. Session View is available on enterprise subscription for versions 8.3 and above.\n#### To confirm that Session View data is enabled:\n- Go to Manage → Policies, and edit one or more of your Elastic Defend integration policies.\n- Select the Policy settings tab, then scroll down to the Linux event collection section near the bottom.\n- Check the box for Process events, and turn on the Include session data toggle.\n- If you want to include file and network alerts in Session View, check the boxes for Network and File events.\n- If you want to enable terminal output capture, turn on the Capture terminal output toggle.\nFor more information about the additional fields collected when this setting is enabled and\nthe usage of Session View for Analysis refer to the [helper guide](https://www.elastic.co/guide/en/security/current/session-view.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and (\n (process.name == \"runc\" and process.args == \"run\") or\n (process.name == \"ctr\" and process.args == \"run\" and process.args in (\"--privileged\", \"--mount\"))\n) and not user.Ext.real.id == \"0\" and not group.Ext.real.id == \"0\" and \nprocess.interactive == true and process.parent.interactive == true\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Timestomping using Touch Command", + "description": "Timestomping is an anti-forensics technique which is used to modify the timestamps of a file, often to mimic files that are in the same folder.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 33, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.006", + "name": "Timestomp", + "reference": "https://attack.mitre.org/techniques/T1070/006/" + } + ] + } + ] + } + ], + "id": "153d46c7-32d0-4cca-8f45-b549c02991a6", + "rule_id": "b0046934-486e-462f-9487-0d4cf9e429c6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where event.type == \"start\" and\n process.name : \"touch\" and user.id != \"0\" and\n process.args : (\"-r\", \"-t\", \"-a*\",\"-m*\") and\n not process.args : (\"/usr/lib/go-*/bin/go\", \"/usr/lib/dracut/dracut-functions.sh\", \"/tmp/KSInstallAction.*/m/.patch/*\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "TCC Bypass via Mounted APFS Snapshot Access", + "description": "Identifies the use of the mount_apfs command to mount the entire file system through Apple File System (APFS) snapshots as read-only and with the noowners flag set. This action enables the adversary to access almost any file in the file system, including all user data and files protected by Apple’s privacy framework (TCC).", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://theevilbit.github.io/posts/cve_2020_9771/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1006", + "name": "Direct Volume Access", + "reference": "https://attack.mitre.org/techniques/T1006/" + } + ] + } + ], + "id": "8432fa9d-a77c-4358-9945-b2e2fc6722b3", + "rule_id": "b00bcd89-000c-4425-b94c-716ef67762f6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and process.name:mount_apfs and\n process.args:(/System/Volumes/Data and noowners)\n", + "language": "kuery" + }, + { + "name": "Spike in Network Traffic", + "description": "A machine learning job detected an unusually large spike in network traffic. Such a burst of traffic, if not caused by a surge in business activity, can be due to suspicious or malicious activity. Large-scale data exfiltration may produce a burst of network traffic; this could also be due to unusually large amounts of reconnaissance or enumeration traffic. Denial-of-service attacks or traffic floods may also produce such a surge in traffic.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Business workflows that occur very occasionally, and involve an unusual surge in network traffic, can trigger this alert. A new business workflow or a surge in business activity may trigger this alert. A misconfigured network application or firewall may trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "1ce8ec8e-5041-42cb-a52a-25fb35982b6c", + "rule_id": "b240bfb8-26b7-4e5e-924e-218144a3fa71", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "high_count_network_events" + }, + { + "name": "Unusual Linux Username", + "description": "A machine learning job detected activity for a username that is not normally active, which can indicate unauthorized changes, activity by unauthorized users, lateral movement, or compromised credentials. In many organizations, new usernames are not often created apart from specific types of system activities, such as creating new accounts for new employees. These user accounts quickly become active and routine. Events from rarely used usernames can point to suspicious activity. Additionally, automated Linux fleets tend to see activity from rarely used usernames only when personnel log in to make authorized or unauthorized changes, or threat actors have acquired credentials and log in for malicious purposes. Unusual usernames can also indicate pivoting, where compromised credentials are used to try and move laterally from one host to another.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating an Unusual Linux User\nDetection alerts from this rule indicate activity for a Linux user name that is rare and unusual. Here are some possible avenues of investigation:\n- Consider the user as identified by the username field. Is this program part of an expected workflow for the user who ran this program on this host? Could this be related to troubleshooting or debugging activity by a developer or site reliability engineer?\n- Examine the history of user activity. If this user only manifested recently, it might be a service account for a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business process.\n- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks that the user is performing.", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon user activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "b4503564-4978-4640-812e-e891e3fc61a2", + "rule_id": "b347b919-665f-4aac-b9e8-68369bf2340c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_linux_anomalous_user_name" + ] + }, + { + "name": "Potential Persistence via Atom Init Script Modification", + "description": "Identifies modifications to the Atom desktop text editor Init File. Adversaries may add malicious JavaScript code to the init.coffee file that will be executed upon the Atom application opening.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/D00MFist/PersistentJXA/blob/master/AtomPersist.js", + "https://flight-manual.atom.io/hacking-atom/sections/the-init-file/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1037", + "name": "Boot or Logon Initialization Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/" + } + ] + } + ], + "id": "4b5c68ee-4799-4e50-8830-8d0ae5a42330", + "rule_id": "b4449455-f986-4b5a-82ed-e36b129331f7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:file and host.os.type:macos and not event.type:\"deletion\" and\n file.path:/Users/*/.atom/init.coffee and not process.name:(Atom or xpcproxy) and not user.name:root\n", + "language": "kuery" + }, + { + "name": "Potential Privilege Escalation via OverlayFS", + "description": "Identifies an attempt to exploit a local privilege escalation (CVE-2023-2640 and CVE-2023-32629) via a flaw in Ubuntu's modifications to OverlayFS. These flaws allow the creation of specialized executables, which, upon execution, grant the ability to escalate privileges to root on the affected machine.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.wiz.io/blog/ubuntu-overlayfs-vulnerability", + "https://twitter.com/liadeliyahu/status/1684841527959273472" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "ba0b45fd-6c1a-48aa-af50-9729d9908e4b", + "rule_id": "b51dbc92-84e2-4af1-ba47-65183fcd0c57", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by process.parent.entity_id, host.id with maxspan=5s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name == \"unshare\" and process.args : (\"-r\", \"-rm\", \"m\") and process.args : \"*cap_setuid*\" and user.id != \"0\"]\n [process where host.os.type == \"linux\" and event.action == \"uid_change\" and event.type == \"change\" and \n user.id == \"0\"]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Volume Shadow Copy Deleted or Resized via VssAdmin", + "description": "Identifies use of vssadmin.exe for shadow copy deletion or resizing on endpoints. This commonly occurs in tandem with ransomware or other destructive attacks.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Volume Shadow Copy Deleted or Resized via VssAdmin\n\nThe Volume Shadow Copy Service (VSS) is a Windows feature that enables system administrators to take snapshots of volumes that can later be restored or mounted to recover specific files or folders.\n\nA typical step in the playbook of an attacker attempting to deploy ransomware is to delete Volume Shadow Copies to ensure that victims have no alternative to paying the ransom, making any action that deletes shadow copies worth monitoring.\n\nThis rule monitors the execution of Vssadmin.exe to either delete or resize shadow copies.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- In the case of a resize operation, check if the resize value is equal to suspicious values, like 401MB.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- If unsigned files are found on the process tree, retrieve them and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Use process name, command line, and file hash to search for occurrences in other hosts.\n- Check if any files on the host machine have been encrypted.\n\n\n### False positive analysis\n\n- This rule may produce benign true positives (B-TPs). If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Related rules\n\n- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921\n- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- Priority should be given due to the advanced stage of this activity on the attack.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- If data was encrypted, deleted, or modified, activate your data recovery plan.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Impact", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1490", + "name": "Inhibit System Recovery", + "reference": "https://attack.mitre.org/techniques/T1490/" + } + ] + } + ], + "id": "54e20874-f3e4-4d6b-9edd-98a0c51ebb79", + "rule_id": "b5ea4bfe-a1b2-421f-9d47-22a75a6f2921", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\"\n and (process.name : \"vssadmin.exe\" or process.pe.original_file_name == \"VSSADMIN.EXE\") and\n process.args in (\"delete\", \"resize\") and process.args : \"shadows*\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "PowerShell Invoke-NinjaCopy script", + "description": "Detects PowerShell scripts that contain the default exported functions used on Invoke-NinjaCopy. Attackers can use Invoke-NinjaCopy to read SYSTEM files that are normally locked, such as the NTDS.dit file or registry hives.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Invoke-NinjaCopy script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks, making it available for use in various environments, creating an attractive way for attackers to execute code.\n\nInvoke-NinjaCopy is a PowerShell script capable of reading SYSTEM files that were normally locked, such as `NTDS.dit` or sensitive registry locations. It does so by using the direct volume access technique, which enables attackers to bypass access control mechanisms and file system monitoring by reading the raw data directly from the disk and extracting the file by parsing the file system structures.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Determine whether the script stores the captured data locally.\n- Check if the imported function was executed and which file it targeted.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: PowerShell Logs", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/BC-SECURITY/Empire/blob/main/empire/server/data/module_source/collection/Invoke-NinjaCopy.ps1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.002", + "name": "Security Account Manager", + "reference": "https://attack.mitre.org/techniques/T1003/002/" + }, + { + "id": "T1003.003", + "name": "NTDS", + "reference": "https://attack.mitre.org/techniques/T1003/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1006", + "name": "Direct Volume Access", + "reference": "https://attack.mitre.org/techniques/T1006/" + } + ] + } + ], + "id": "3be2db29-2d9d-4b41-9dcd-4e1cf39be958", + "rule_id": "b8386923-b02c-4b94-986a-d223d9b01f88", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"StealthReadFile\" or\n \"StealthReadFileAddr\" or\n \"StealthCloseFileDelegate\" or\n \"StealthOpenFile\" or\n \"StealthCloseFile\" or\n \"StealthReadFile\" or\n \"Invoke-NinjaCopy\"\n )\n and not user.id : \"S-1-5-18\"\n and not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n", + "language": "kuery" + }, + { + "name": "Creation or Modification of Domain Backup DPAPI private key", + "description": "Identifies the creation or modification of Domain Backup private keys. Adversaries may extract the Data Protection API (DPAPI) domain backup key from a Domain Controller (DC) to be able to decrypt any domain user master key file.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\nDomain DPAPI Backup keys are stored on domain controllers and can be dumped remotely with tools such as Mimikatz. The resulting .pvk private key can be used to decrypt ANY domain user masterkeys, which then can be used to decrypt any secrets protected by those keys.", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.dsinternals.com/en/retrieving-dpapi-backup-keys-from-active-directory/", + "https://posts.specterops.io/operational-guidance-for-offensive-user-dpapi-abuse-1fb7fac8b107" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.004", + "name": "Private Keys", + "reference": "https://attack.mitre.org/techniques/T1552/004/" + } + ] + }, + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/" + } + ] + } + ], + "id": "d011bc68-ace9-4f89-8a60-62997dd42cf3", + "rule_id": "b83a7e96-2eb3-4edf-8346-427b6858d3bd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and file.name : (\"ntds_capi_*.pfx\", \"ntds_capi_*.pvk\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Network Connection via MsXsl", + "description": "Identifies msxsl.exe making a network connection. This may indicate adversarial activity as msxsl.exe is often leveraged by adversaries to execute malicious scripts and evade detection.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1220", + "name": "XSL Script Processing", + "reference": "https://attack.mitre.org/techniques/T1220/" + } + ] + } + ], + "id": "f36617b3-0798-42c5-933e-5a6d7832ed06", + "rule_id": "b86afe07-0d98-4738-b15d-8d7465f95ff5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"msxsl.exe\" and event.type == \"start\"]\n [network where host.os.type == \"windows\" and process.name : \"msxsl.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Group Policy Abuse for Privilege Addition", + "description": "Detects the first occurrence of a modification to Group Policy Object Attributes to add privileges to user accounts or use them to add users as local admins.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Group Policy Abuse for Privilege Addition\n\nGroup Policy Objects (GPOs) can be used to add rights and/or modify Group Membership on GPOs by changing the contents of an INF file named GptTmpl.inf, which is responsible for storing every setting under the Security Settings container in the GPO. This file is unique for each GPO, and only exists if the GPO contains security settings. Example Path: \"\\\\DC.com\\SysVol\\DC.com\\Policies\\{PolicyGUID}\\Machine\\Microsoft\\Windows NT\\SecEdit\\GptTmpl.inf\"\n\n#### Possible investigation steps\n\n- This attack abuses a legitimate mechanism of Active Directory, so it is important to determine whether the activity is legitimate and the administrator is authorized to perform this operation.\n- Retrieve the contents of the `GptTmpl.inf` file, and under the `Privilege Rights` section, look for potentially dangerous high privileges, for example: SeTakeOwnershipPrivilege, SeEnableDelegationPrivilege, etc.\n- Inspect the user security identifiers (SIDs) associated with these privileges, and if they should have these privileges.\n\n### False positive analysis\n\n- Inspect whether the user that has done the modifications should be allowed to. The user name can be found in the `winlog.event_data.SubjectUserName` field.\n\n### Related rules\n\n- Scheduled Task Execution at Scale via GPO - 15a8ba77-1c13-4274-88fe-6bd14133861e\n- Startup/Logon Script added to Group Policy Object - 16fac1a1-21ee-4ca6-b720-458e3855d046\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- The investigation and containment must be performed in every computer controlled by the GPO, where necessary.\n- Remove the script from the GPO.\n- Check if other GPOs have suspicious scripts attached.", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Active Directory", + "Resources: Investigation Guide", + "Use Case: Active Directory Monitoring" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0025_windows_audit_directory_service_changes.md", + "https://labs.f-secure.com/tools/sharpgpoabuse" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1484", + "name": "Domain Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1484/", + "subtechnique": [ + { + "id": "T1484.001", + "name": "Group Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1484/001/" + } + ] + } + ] + } + ], + "id": "abc38ef5-e74c-49de-8060-082d8f0da7a0", + "rule_id": "b9554892-5e0e-424b-83a0-5aef95aa43bf", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.AttributeLDAPDisplayName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.AttributeValue", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'Audit Directory Service Changes' audit policy must be configured (Success Failure).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.code: \"5136\" and\n winlog.event_data.AttributeLDAPDisplayName:\"gPCMachineExtensionNames\" and\n winlog.event_data.AttributeValue:(*827D319E-6EAC-11D2-A4EA-00C04F79F83A* and *803E14A0-B4FB-11D0-A0D0-00A0C90F574B*)\n", + "language": "kuery" + }, + { + "name": "Unusual Windows Network Activity", + "description": "Identifies Windows processes that do not usually use the network but have unexpected network activity, which can indicate command-and-control, lateral movement, persistence, or data exfiltration activity. A process with unusual network activity can denote process exploitation or injection, where the process is used to run persistence mechanisms that allow a malicious actor remote access or control of the host, data exfiltration, and execution of unauthorized network applications.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Unusual Network Activity\nDetection alerts from this rule indicate the presence of network activity from a Windows process for which network activity is very unusual. Here are some possible avenues of investigation:\n- Consider the IP addresses, protocol and ports. Are these used by normal but infrequent network workflows? Are they expected or unexpected?\n- If the destination IP address is remote or external, does it associate with an expected domain, organization or geography? Note: avoid interacting directly with suspected malicious IP addresses.\n- Consider the user as identified by the username field. Is this network activity part of an expected workflow for the user who ran the program?\n- Examine the history of execution. If this process only manifested recently, it might be part of a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business process.\n- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n- Consider the same for the parent process. If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.\n- If you have file hash values in the event data, and you suspect malware, you can optionally run a search for the file hash to see if the file is identified as malware by anti-malware tools.", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program or one that rarely uses the network could trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "d7afa7a0-289d-45c6-af86-f3313cd13141", + "rule_id": "ba342eb2-583c-439f-b04d-1fdd7c1417cc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_windows_anomalous_network_activity" + ] + }, + { + "name": "Attempt to Install Root Certificate", + "description": "Adversaries may install a root certificate on a compromised system to avoid warnings when connecting to their command and control servers. Root certificates are used in public key cryptography to identify a root certificate authority (CA). When a root certificate is installed, the system or application will trust certificates in the root's chain of trust that have been signed by the root certificate.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Certain applications may install root certificates for the purpose of inspecting SSL traffic." + ], + "references": [ + "https://ss64.com/osx/security-cert.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1553", + "name": "Subvert Trust Controls", + "reference": "https://attack.mitre.org/techniques/T1553/", + "subtechnique": [ + { + "id": "T1553.004", + "name": "Install Root Certificate", + "reference": "https://attack.mitre.org/techniques/T1553/004/" + } + ] + } + ] + } + ], + "id": "ada1001a-77bd-4499-a66e-c4ad5644dd77", + "rule_id": "bc1eeacf-2972-434f-b782-3a532b100d67", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:security and process.args:\"add-trusted-cert\" and\n not process.parent.executable:(\"/Library/Bitdefender/AVP/product/bin/BDCoreIssues\" or \"/Applications/Bitdefender/SecurityNetworkInstallerApp.app/Contents/MacOS/SecurityNetworkInstallerApp\"\n)\n", + "language": "kuery" + }, + { + "name": "Suspicious Print Spooler Point and Print DLL", + "description": "Detects attempts to exploit a privilege escalation vulnerability (CVE-2020-1030) related to the print spooler service. Exploitation involves chaining multiple primitives to load an arbitrary DLL into the print spooler process running as SYSTEM.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.accenture.com/us-en/blogs/cyber-defense/discovering-exploiting-shutting-down-dangerous-windows-print-spooler-vulnerability", + "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Privilege%20Escalation/privesc_sysmon_cve_20201030_spooler.evtx", + "https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2020-1030" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "ca05ec86-fc4c-4281-841a-d44599e0e6ec", + "rule_id": "bd7eefee-f671-494e-98df-f01daf9e5f17", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=30s\n[registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Print\\\\Printers\\\\*\\\\SpoolDirectory\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Print\\\\Printers\\\\*\\\\SpoolDirectory\"\n ) and\n registry.data.strings : \"C:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\4\"]\n[registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Print\\\\Printers\\\\*\\\\CopyFiles\\\\Payload\\\\Module\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Print\\\\Printers\\\\*\\\\CopyFiles\\\\Payload\\\\Module\"\n ) and\n registry.data.strings : \"C:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\4\\\\*\"]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Potential Pspy Process Monitoring Detected", + "description": "This rule leverages auditd to monitor for processes scanning different processes within the /proc directory using the openat syscall. This is a strong indication for the usage of the pspy utility. Attackers may leverage the pspy process monitoring utility to monitor system processes without requiring root permissions, in order to find potential privilege escalation vectors.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/DominicBreuker/pspy" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1057", + "name": "Process Discovery", + "reference": "https://attack.mitre.org/techniques/T1057/" + }, + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "db20a821-6d2f-40b4-a51d-1447851999f1", + "rule_id": "bdb04043-f0e3-4efa-bdee-7d9d13fa9edc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0", + "integration": "auditd" + } + ], + "required_fields": [ + { + "name": "auditd.data.a0", + "type": "unknown", + "ecs": false + }, + { + "name": "auditd.data.a2", + "type": "unknown", + "ecs": false + }, + { + "name": "auditd.data.syscall", + "type": "unknown", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Auditd Manager integration.\n\n### Auditd Manager Integration Setup\nThe Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.\nAuditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.\n\n#### The following steps should be executed in order to add the Elastic Agent System integration \"auditd_manager\" on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Auditd Manager and select the integration to see more details about it.\n- Click Add Auditd Manager.\n- Configure the integration name and optionally add a description.\n- Review optional and advanced settings accordingly.\n- Add the newly installed `auditd manager` to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.\n- Click Save and Continue.\n- For more details on the integeration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).\n\n#### Rule Specific Setup Note\nAuditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.\nHowever, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n- For this detection rule the following additional audit rules are required to be added to the integration:\n -- \"-w /proc/ -p r -k audit_proc\"\n\n", + "type": "eql", + "query": "sequence by process.pid, host.id with maxspan=5s\n[ file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n auditd.data.syscall == \"openat\" and file.path == \"/proc\" and auditd.data.a0 : (\"ffffffffffffff9c\", \"ffffff9c\") and \n auditd.data.a2 : (\"80000\", \"88000\") ] with runs=10\n", + "language": "eql", + "index": [ + "logs-auditd_manager.auditd-*" + ] + }, + { + "name": "Searching for Saved Credentials via VaultCmd", + "description": "Windows Credential Manager allows you to create, view, or delete saved credentials for signing into websites, connected applications, and networks. An adversary may abuse this to list or dump credentials stored in the Credential Manager for saved usernames and passwords. This may also be performed in preparation of lateral movement.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16", + "https://web.archive.org/web/20201004080456/https://rastamouse.me/blog/rdp-jump-boxes/", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + }, + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/", + "subtechnique": [ + { + "id": "T1555.004", + "name": "Windows Credential Manager", + "reference": "https://attack.mitre.org/techniques/T1555/004/" + } + ] + } + ] + } + ], + "id": "1f2a77f5-05b5-444b-9f00-4f33af565ac5", + "rule_id": "be8afaed-4bcd-4e0a-b5f9-5562003dde81", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.pe.original_file_name:\"vaultcmd.exe\" or process.name:\"vaultcmd.exe\") and\n process.args:\"/list*\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Privacy Control Bypass via Localhost Secure Copy", + "description": "Identifies use of the Secure Copy Protocol (SCP) to copy files locally by abusing the auto addition of the Secure Shell Daemon (sshd) to the authorized application list for Full Disk Access. This may indicate attempts to bypass macOS privacy controls to access sensitive files.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.trendmicro.com/en_us/research/20/h/xcsset-mac-malware--infects-xcode-projects--uses-0-days.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/" + } + ] + } + ], + "id": "00beb98c-2da1-4c50-9969-857fe9dd87e2", + "rule_id": "c02c8b9f-5e1d-463c-a1b0-04edcdfe1a3d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.name:\"scp\" and\n process.args:\"StrictHostKeyChecking=no\" and\n process.command_line:(\"scp *localhost:/*\", \"scp *127.0.0.1:/*\") and\n not process.args:\"vagrant@*127.0.0.1*\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Microsoft IIS Connection Strings Decryption", + "description": "Identifies use of aspnet_regiis to decrypt Microsoft IIS connection strings. An attacker with Microsoft IIS web server access via a webshell or alike can decrypt and dump any hardcoded connection strings, such as the MSSQL service account password using aspnet_regiis command.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.netspi.com/decrypting-iis-passwords-to-break-out-of-the-dmz-part-1/", + "https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/greenbug-espionage-telco-south-asia" + ], + "max_signals": 33, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + } + ] + } + ], + "id": "536fd9ff-1dca-452d-8d2a-62a9cb8e1333", + "rule_id": "c25e9c87-95e1-4368-bfab-9fd34cf867ec", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"aspnet_regiis.exe\" or process.pe.original_file_name == \"aspnet_regiis.exe\") and\n process.args : \"connectionStrings\" and process.args : \"-pdf\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Unusual Linux Network Connection Discovery", + "description": "Looks for commands related to system network connection discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used by a threat actor to engage in system network connection discovery in order to increase their understanding of connected services and systems. This information may be used to shape follow-up behaviors such as lateral movement or additional discovery.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Discovery" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon user command activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1049", + "name": "System Network Connections Discovery", + "reference": "https://attack.mitre.org/techniques/T1049/" + } + ] + } + ], + "id": "a29e26d8-4438-46d1-a2cf-4de558a96b02", + "rule_id": "c28c4d8c-f014-40ef-88b6-79a1d67cd499", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 25, + "machine_learning_job_id": [ + "v3_linux_network_connection_discovery" + ] + }, + { + "name": "Persistence via Folder Action Script", + "description": "Detects modification of a Folder Action script. A Folder Action script is executed when the folder to which it is attached has items added or removed, or when its window is opened, closed, moved, or resized. Adversaries may abuse this feature to establish persistence by utilizing a malicious script.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://posts.specterops.io/folder-actions-for-persistence-on-macos-8923f222343d" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1037", + "name": "Boot or Logon Initialization Scripts", + "reference": "https://attack.mitre.org/techniques/T1037/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "ae2dd420-77c2-4033-b66a-beb48042b085", + "rule_id": "c292fa52-4115-408a-b897-e14f684b3cb7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.pid", + "type": "long", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=5s\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\", \"info\") and process.name == \"com.apple.foundation.UserScriptService\"] by process.pid\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name in (\"osascript\", \"python\", \"tcl\", \"node\", \"perl\", \"ruby\", \"php\", \"bash\", \"csh\", \"zsh\", \"sh\") and\n not process.args : \"/Users/*/Library/Application Support/iTerm2/Scripts/AutoLaunch/*.scpt\"\n ] by process.parent.pid\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Mshta Making Network Connections", + "description": "Identifies Mshta.exe making outbound network connections. This may indicate adversarial activity, as Mshta is often leveraged by adversaries to execute malicious scripts and evade detection.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-20m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.005", + "name": "Mshta", + "reference": "https://attack.mitre.org/techniques/T1218/005/" + } + ] + } + ] + } + ], + "id": "0e2807a1-b315-469a-83b1-32d19ee1398c", + "rule_id": "c2d90150-0133-451c-a783-533e736c12d7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id with maxspan=10m\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"mshta.exe\" and\n not process.parent.name : \"Microsoft.ConfigurationManagement.exe\" and\n not (process.parent.executable : \"C:\\\\Amazon\\\\Amazon Assistant\\\\amazonAssistantService.exe\" or\n process.parent.executable : \"C:\\\\TeamViewer\\\\TeamViewer.exe\") and\n not process.args : \"ADSelfService_Enroll.hta\"]\n [network where host.os.type == \"windows\" and process.name : \"mshta.exe\"]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Persistence via BITS Job Notify Cmdline", + "description": "An adversary can use the Background Intelligent Transfer Service (BITS) SetNotifyCmdLine method to execute a program that runs after a job finishes transferring data or after a job enters a specified state in order to persist on a system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://pentestlab.blog/2019/10/30/persistence-bits-jobs/", + "https://docs.microsoft.com/en-us/windows/win32/api/bits1_5/nf-bits1_5-ibackgroundcopyjob2-setnotifycmdline", + "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-setnotifycmdline", + "https://www.elastic.co/blog/hunting-for-persistence-using-elastic-security-part-2" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1197", + "name": "BITS Jobs", + "reference": "https://attack.mitre.org/techniques/T1197/" + } + ] + } + ], + "id": "609316fc-8548-493d-ba0d-95c55b9870e7", + "rule_id": "c3b915e0-22f3-4bf7-991d-b643513c722f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"svchost.exe\" and process.parent.args : \"BITS\" and\n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\wermgr.exe\",\n \"?:\\\\WINDOWS\\\\system32\\\\directxdatabaseupdater.exe\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential JAVA/JNDI Exploitation Attempt", + "description": "Identifies an outbound network connection by JAVA to LDAP, RMI or DNS standard ports followed by a suspicious JAVA child processes. This may indicate an attempt to exploit a JAVA/NDI (Java Naming and Directory Interface) injection vulnerability.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Execution", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.lunasec.io/docs/blog/log4j-zero-day/", + "https://github.com/christophetd/log4shell-vulnerable-app", + "https://www.blackhat.com/docs/us-16/materials/us-16-Munoz-A-Journey-From-JNDI-LDAP-Manipulation-To-RCE.pdf", + "https://www.elastic.co/security-labs/detecting-log4j2-with-elastic-security", + "https://www.elastic.co/security-labs/analysis-of-log4shell-cve-2021-45046" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.007", + "name": "JavaScript", + "reference": "https://attack.mitre.org/techniques/T1059/007/" + } + ] + }, + { + "id": "T1203", + "name": "Exploitation for Client Execution", + "reference": "https://attack.mitre.org/techniques/T1203/" + } + ] + } + ], + "id": "15c4eae3-23c7-4e03-96da-1eff9f523022", + "rule_id": "c3f5e1d8-910e-43b4-8d44-d748e498ca86", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.pid", + "type": "long", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=1m\n [network where event.action == \"connection_attempted\" and\n process.name : \"java\" and\n /*\n outbound connection attempt to\n LDAP, RMI or DNS standard ports\n by JAVA process\n */\n destination.port in (1389, 389, 1099, 53, 5353)] by process.pid\n [process where event.type == \"start\" and\n\n /* Suspicious JAVA child process */\n process.parent.name : \"java\" and\n process.name : (\"sh\",\n \"bash\",\n \"dash\",\n \"ksh\",\n \"tcsh\",\n \"zsh\",\n \"curl\",\n \"perl*\",\n \"python*\",\n \"ruby*\",\n \"php*\",\n \"wget\")] by process.parent.pid\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Mounting Hidden or WebDav Remote Shares", + "description": "Identifies the use of net.exe to mount a WebDav or hidden remote share. This may indicate lateral movement or preparation for data exfiltration.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.002", + "name": "SMB/Windows Admin Shares", + "reference": "https://attack.mitre.org/techniques/T1021/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.003", + "name": "Local Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1087", + "name": "Account Discovery", + "reference": "https://attack.mitre.org/techniques/T1087/", + "subtechnique": [ + { + "id": "T1087.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1087/001/" + }, + { + "id": "T1087.002", + "name": "Domain Account", + "reference": "https://attack.mitre.org/techniques/T1087/002/" + } + ] + } + ] + } + ], + "id": "6412dc0e-dbe1-479f-a6a3-6035d4d45c78", + "rule_id": "c4210e1c-64f2-4f48-b67e-b5a8ffe3aa14", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n ((process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or ((process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and\n not process.parent.name : \"net.exe\")) and\n process.args : \"use\" and\n /* including hidden and webdav based online shares such as onedrive */\n process.args : (\"\\\\\\\\*\\\\*$*\", \"\\\\\\\\*@SSL\\\\*\", \"http*\") and\n /* excluding shares deletion operation */\n not process.args : \"/d*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Print Spooler File Deletion", + "description": "Detects deletion of print driver files by an unusual process. This may indicate a clean up attempt post successful privilege escalation via Print Spooler service related vulnerabilities.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uninstall or manual deletion of a legitimate printing driver files. Verify the printer file metadata such as manufacturer and signature information." + ], + "references": [ + "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "a0765668-6f20-4b0c-8bde-707fcbe6e2bc", + "rule_id": "c4818812-d44f-47be-aaef-4cfb2f9cc799", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type : \"deletion\" and\n not process.name : (\"spoolsv.exe\", \"dllhost.exe\", \"explorer.exe\") and\n file.path : \"?:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\3\\\\*.dll\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Windows System Network Connections Discovery", + "description": "This rule identifies the execution of commands that can be used to enumerate network connections. Adversaries may attempt to get a listing of network connections to or from a compromised system to identify targets within an environment.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1049", + "name": "System Network Connections Discovery", + "reference": "https://attack.mitre.org/techniques/T1049/" + }, + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "58452964-539b-4bdd-b795-853d9ad12df0", + "rule_id": "c4e9ed3e-55a2-4309-a012-bc3c78dad10a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and\n(\n process.name : \"netstat.exe\" or\n (\n (\n (process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or\n (\n (process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and\n not process.parent.name : \"net.exe\"\n )\n ) and process.args : (\"use\", \"user\", \"session\", \"config\") and not process.args: (\"/persistent:*\", \"/delete\", \"\\\\\\\\*\")\n ) or\n (process.name : \"nbtstat.exe\" and process.args : \"-s*\")\n) and not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Credential Access via Renamed COM+ Services DLL", + "description": "Identifies suspicious renamed COMSVCS.DLL Image Load, which exports the MiniDump function that can be used to dump a process memory. This may indicate an attempt to dump LSASS memory while bypassing command-line based detection in preparation for credential access.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Defense Evasion", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://modexp.wordpress.com/2019/08/30/minidumpwritedump-via-com-services-dll/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.011", + "name": "Rundll32", + "reference": "https://attack.mitre.org/techniques/T1218/011/" + } + ] + } + ] + } + ], + "id": "75ea0a03-07a0-4cb9-a8f7-a94252bad19b", + "rule_id": "c5c9f591-d111-4cf8-baec-c26a39bc31ef", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.pe.imphash", + "type": "keyword", + "ecs": true + }, + { + "name": "file.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "You will need to enable logging of ImageLoads in your Sysmon configuration to include COMSVCS.DLL by Imphash or Original\nFile Name.", + "type": "eql", + "query": "sequence by process.entity_id with maxspan=1m\n [process where host.os.type == \"windows\" and event.category == \"process\" and\n process.name : \"rundll32.exe\"]\n [process where host.os.type == \"windows\" and event.category == \"process\" and event.dataset : \"windows.sysmon_operational\" and event.code == \"7\" and\n (file.pe.original_file_name : \"COMSVCS.DLL\" or file.pe.imphash : \"EADBCCBB324829ACB5F2BBE87E5549A8\") and\n /* renamed COMSVCS */\n not file.name : \"COMSVCS.DLL\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Installation of Custom Shim Databases", + "description": "Identifies the installation of custom Application Compatibility Shim databases. This Windows functionality has been abused by attackers to stealthily gain persistence and arbitrary code execution in legitimate Windows processes.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.011", + "name": "Application Shimming", + "reference": "https://attack.mitre.org/techniques/T1546/011/" + } + ] + } + ] + } + ], + "id": "310b03ba-aef8-4083-a8f4-0100c3ff5353", + "rule_id": "c5ce48a6-7f57-4ee8-9313-3d0024caee10", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id with maxspan = 5m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n not (process.name : \"sdbinst.exe\" and process.parent.name : \"msiexec.exe\")]\n [registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n registry.path : \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\AppCompatFlags\\\\Custom\\\\*.sdb\"]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Unusual Network Connection via DllHost", + "description": "Identifies unusual instances of dllhost.exe making outbound network connections. This may indicate adversarial Command and Control activity.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.microsoft.com/security/blog/2021/05/27/new-sophisticated-email-based-attack-from-nobelium/", + "https://www.volexity.com/blog/2021/05/27/suspected-apt29-operation-launches-election-fraud-themed-phishing-campaigns/", + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "5fb826f0-8409-4484-92b7-9e9dfea733d4", + "rule_id": "c7894234-7814-44c2-92a9-f7d851ea246a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=1m\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"dllhost.exe\" and process.args_count == 1]\n [network where host.os.type == \"windows\" and process.name : \"dllhost.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\", \"192.0.2.0/24\",\n \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\",\n \"192.175.48.0/24\", \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\", \"FE80::/10\",\n \"FF00::/8\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Spike in Network Traffic To a Country", + "description": "A machine learning job detected an unusually large spike in network activity to one destination country in the network logs. This could be due to unusually large amounts of reconnaissance or enumeration traffic. Data exfiltration activity may also produce such a surge in traffic to a destination country that does not normally appear in network traffic or business workflows. Malware instances and persistence mechanisms may communicate with command-and-control (C2) infrastructure in their country of origin, which may be an unusual destination country for the source network.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Spike in Network Traffic To a Country\n\nMonitoring network traffic for anomalies is a good methodology for uncovering various potentially suspicious activities. For example, data exfiltration or infected machines may communicate with a command-and-control (C2) server in another country your company doesn't have business with.\n\nThis rule uses a machine learning job to detect a significant spike in the network traffic to a country, which can indicate reconnaissance or enumeration activities, an infected machine being used as a bot in a DDoS attack, or potentially data exfiltration.\n\n#### Possible investigation steps\n\n- Identify the specifics of the involved assets, such as role, criticality, and associated users.\n- Investigate other alerts associated with the involved assets during the past 48 hours.\n- Examine the data available and determine the exact users and processes involved in those connections.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Consider the time of day. If the user is a human (not a program or script), did the activity occurs during working hours?\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n\n### False positive analysis\n\n- Understand the context of the connections by contacting the asset owners. If this activity is related to a new business process or newly implemented (approved) technology, consider adding exceptions — preferably with a combination of user and source conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n - Remove and block malicious artifacts identified during triage.\n- Consider implementing temporary network border rules to block or alert connections to the target country, if relevant.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 104, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Business workflows that occur very occasionally, and involve an unusual surge in network traffic to one destination country, can trigger this alert. A new business workflow or a surge in business activity in a particular country may trigger this alert. Business travelers who roam to many countries for brief periods may trigger this alert if they engage in volumetric network activity." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "399e0bde-92b4-4f86-9c05-b4861a8c9471", + "rule_id": "c7db5533-ca2a-41f6-a8b0-ee98abe0f573", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "high_count_by_destination_country" + }, + { + "name": "Persistence via Docker Shortcut Modification", + "description": "An adversary can establish persistence by modifying an existing macOS dock property list in order to execute a malicious application instead of the intended one when invoked.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/specterops/presentations/raw/master/Leo%20Pitt/Hey_Im_Still_in_Here_Modern_macOS_Persistence_SO-CON2020.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/" + } + ] + } + ], + "id": "fff686b7-9916-4e9a-9ac6-cbc8630d5b72", + "rule_id": "c81cefcb-82b9-4408-a533-3c3df549e62d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:file and host.os.type:macos and event.action:modification and\n file.path:/Users/*/Library/Preferences/com.apple.dock.plist and\n not process.name:(xpcproxy or cfprefsd or plutil or jamf or PlistBuddy or InstallerRemotePluginService)\n", + "language": "kuery" + }, + { + "name": "Virtual Machine Fingerprinting via Grep", + "description": "An adversary may attempt to get detailed information about the operating system and hardware. This rule identifies common locations used to discover virtual machine hardware by a non-root user. This technique has been used by the Pupy RAT and other malware.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Certain tools or automated software may enumerate hardware information. These tools can be exempted via user name or process arguments to eliminate potential noise." + ], + "references": [ + "https://objective-see.com/blog/blog_0x4F.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "09e72b0d-2935-4f35-9e5c-4cd277ee041e", + "rule_id": "c85eb82c-d2c8-485c-a36f-534f914b7663", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where event.type == \"start\" and\n process.name in (\"grep\", \"egrep\") and user.id != \"0\" and\n process.args : (\"parallels*\", \"vmware*\", \"virtualbox*\") and process.args : \"Manufacturer*\" and\n not process.parent.executable in (\"/Applications/Docker.app/Contents/MacOS/Docker\", \"/usr/libexec/kcare/virt-what\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Calendar File Modification", + "description": "Identifies suspicious modifications of the calendar file by an unusual process. Adversaries may create a custom calendar notification procedure to execute a malicious program at a recurring interval to establish persistence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trusted applications for managing calendars and reminders." + ], + "references": [ + "https://labs.f-secure.com/blog/operationalising-calendar-alerts-persistence-on-macos", + "https://github.com/FSecureLABS/CalendarPersist", + "https://github.com/D00MFist/PersistentJXA/blob/master/CalendarPersist.js" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/" + } + ] + } + ], + "id": "a67dc9e2-ec9d-4eb7-be95-d427e5e36783", + "rule_id": "cb71aa62-55c8-42f0-b0dd-afb0bb0b1f51", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "logs-endpoint.events.*", + "auditbeat-*" + ], + "query": "event.category:file and host.os.type:macos and event.action:modification and\n file.path:/Users/*/Library/Calendars/*.calendar/Events/*.ics and\n process.executable:\n (* and not\n (\n /System/Library/* or\n /System/Applications/Calendar.app/Contents/MacOS/* or\n /System/Applications/Mail.app/Contents/MacOS/Mail or\n /usr/libexec/xpcproxy or\n /sbin/launchd or\n /Applications/*\n )\n )\n", + "language": "kuery" + }, + { + "name": "Attempt to Enable the Root Account", + "description": "Identifies attempts to enable the root account using the dsenableroot command. This command may be abused by adversaries for persistence, as the root account is disabled by default.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://ss64.com/osx/dsenableroot.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.003", + "name": "Local Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/003/" + } + ] + } + ] + } + ], + "id": "a142c7de-fb34-413c-8b44-f481b2048b36", + "rule_id": "cc2fd2d0-ba3a-4939-b87f-2901764ed036", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:dsenableroot and not process.args:\"-d\"\n", + "language": "kuery" + }, + { + "name": "Google Workspace User Organizational Unit Changed", + "description": "Users in Google Workspace are typically assigned a specific organizational unit that grants them permissions to certain services and roles that are inherited from this organizational unit. Adversaries may compromise a valid account and change which organizational account the user belongs to which then could allow them to inherit permissions to applications and resources inaccessible prior to.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace User Organizational Unit Changed\n\nAn organizational unit is a group that an administrator can create in the Google Admin console to apply settings to a specific set of users for Google Workspace. By default, all users are placed in the top-level (parent) organizational unit. Child organizational units inherit the settings from the parent but can be changed to fit the needs of the child organizational unit.\n\nPermissions and privileges for users are often inherited from the organizational unit they are placed in. Therefore, if a user is changed to a separate organizational unit, they will inherit all privileges and permissions. User accounts may have unexpected privileges when switching organizational units that would allow a threat actor to gain a stronger foothold within the organization. The principle of least privileged (PoLP) should be followed when users are switched to different groups in Google Workspace.\n\nThis rule identifies when a user has been moved to a different organizational unit.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n - The `user.target.email` field contains the user that had their assigned organizational unit switched.\n- Identify the user's previously assigned unit and new organizational unit by checking the `google_workspace.admin.org_unit.name` and `google_workspace.admin.new_value` fields.\n- Identify Google Workspace applications whose settings were explicitly set for this organizational unit.\n - Search for `event.action` is `CREATE_APPLICATION_SETTING` where `google_workspace.admin.org_unit.name` is the new organizational unit.\n- After identifying the involved user, verify administrative privileges are scoped properly to allow changing user organizational units.\n- Identify if the user account was recently created by searching for `event.action: CREATE_USER`.\n - Add `user.email` with the target user account that recently had their organizational unit changed.\n- Filter on `user.name` or `user.target.email` of the user who took this action and review the last 48 hours of activity for anything that may indicate a compromise.\n\n### False positive analysis\n\n- After identifying the user account that changed another user's organizational unit, verify the action was intentional.\n- Verify whether the target user who received this update is expected to inherit privileges from the new organizational unit.\n- Review potential maintenance notes or organizational changes. They might explain why a user's organization was changed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 106, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Configuration Audit", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Google Workspace administrators may adjust change which organizational unit a user belongs to as a result of internal role adjustments." + ], + "references": [ + "https://support.google.com/a/answer/6328701?hl=en#" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.003", + "name": "Additional Cloud Roles", + "reference": "https://attack.mitre.org/techniques/T1098/003/" + } + ] + } + ] + } + ], + "id": "556477ae-d350-4d42-8039-30f52e80c238", + "rule_id": "cc6a8a20-2df2-11ed-8378-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.event.type", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:\"google_workspace.admin\" and event.type:change and event.category:iam\n and google_workspace.event.type:\"USER_SETTINGS\" and event.action:\"MOVE_USER_TO_ORG_UNIT\"\n", + "language": "kuery" + }, + { + "name": "Potential Process Herpaderping Attempt", + "description": "Identifies process execution followed by a file overwrite of an executable by the same parent process. This may indicate an evasion attempt to execute malicious code in a stealthy way.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/jxy-s/herpaderping" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + } + ], + "id": "7d56ba3e-64b8-4578-a077-770aee3b3d20", + "rule_id": "ccc55af4-9882-4c67-87b4-449a7ae8079c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=5s\n [process where host.os.type == \"windows\" and event.type == \"start\" and not process.parent.executable :\n (\n \"?:\\\\Windows\\\\SoftwareDistribution\\\\*.exe\",\n \"?:\\\\Program Files\\\\Elastic\\\\Agent\\\\data\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Trend Micro\\\\*.exe\"\n )\n ] by host.id, process.executable, process.parent.entity_id\n [file where host.os.type == \"windows\" and event.type == \"change\" and event.action == \"overwrite\" and file.extension == \"exe\"] by host.id, file.path, process.entity_id\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Anomalous Linux Compiler Activity", + "description": "Looks for compiler activity by a user context which does not normally run compilers. This can be the result of ad-hoc software changes or unauthorized software deployment. This can also be due to local privilege elevation via locally run exploits or malware activity.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Resource Development" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon compiler activity can be due to an engineer running a local build on a production or staging instance in the course of troubleshooting or fixing a software issue." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0042", + "name": "Resource Development", + "reference": "https://attack.mitre.org/tactics/TA0042/" + }, + "technique": [ + { + "id": "T1588", + "name": "Obtain Capabilities", + "reference": "https://attack.mitre.org/techniques/T1588/", + "subtechnique": [ + { + "id": "T1588.001", + "name": "Malware", + "reference": "https://attack.mitre.org/techniques/T1588/001/" + } + ] + } + ] + } + ], + "id": "c5c18c27-a5ad-4889-9dd8-53d335bbb82f", + "rule_id": "cd66a419-9b3f-4f57-8ff8-ac4cd2d5f530", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 50, + "machine_learning_job_id": [ + "v3_linux_rare_user_compiler" + ] + }, + { + "name": "Domain Added to Google Workspace Trusted Domains", + "description": "Detects when a domain is added to the list of trusted Google Workspace domains. An adversary may add a trusted domain in order to collect and exfiltrate data from their target’s organization with less restrictive security controls.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Domain Added to Google Workspace Trusted Domains\n\nOrganizations use trusted domains in Google Workspace to give external users access to resources.\n\nA threat actor with administrative privileges may be able to add a malicious domain to the trusted domain list. Based on the configuration, potentially sensitive resources may be exposed or accessible by an unintended third-party.\n\nThis rule detects when a third-party domain is added to the list of trusted domains in Google Workspace.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- After identifying the user, verify if the user should have administrative privileges to add external domains.\n- Check the `google_workspace.admin.domain.name` field to find the newly added domain.\n- Use reputational services, such as VirusTotal, for the trusted domain's third-party intelligence reputation.\n- Filter your data. Create a filter where `event.dataset` is `google_workspace.drive` and `google_workspace.drive.file.owner.email` is being compared to `user.email`.\n - If mismatches are identified, this could indicate access from an external Google Workspace domain.\n\n### False positive analysis\n\n- Verify that the user account should have administrative privileges that allow them to edit trusted domains in Google Workspace.\n- Talk to the user to evaluate why they added the third-party domain and if the domain has confidentiality risks.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trusted domains may be added by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://support.google.com/a/answer/6160020?hl=en" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "686ee79c-9fae-41df-a1e0-8fe1c30c714d", + "rule_id": "cf549724-c577-4fd6-8f9b-d1b8ec519ec0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:ADD_TRUSTED_DOMAINS\n", + "language": "kuery" + }, + { + "name": "Expired or Revoked Driver Loaded", + "description": "Identifies an attempt to load a revoked or expired driver. Adversaries may bring outdated drivers with vulnerabilities to gain code execution in kernel mode or abuse revoked certificates to sign their drivers.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653559(v=vs.85)?redirectedfrom=MSDN" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + } + ] + } + ] + } + ], + "id": "6d164611-282f-4186-bb46-7ac3c1d88e4a", + "rule_id": "d12bac54-ab2a-4159-933f-d7bcefa7b61d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "driver where host.os.type == \"windows\" and process.pid == 4 and\n dll.code_signature.status : (\"errorExpired\", \"errorRevoked\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Microsoft Office Sandbox Evasion", + "description": "Identifies the creation of a suspicious zip file prepended with special characters. Sandboxed Microsoft Office applications on macOS are allowed to write files that start with special characters, which can be combined with an AutoStart location to achieve sandbox evasion.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://i.blackhat.com/USA-20/Wednesday/us-20-Wardle-Office-Drama-On-macOS.pdf", + "https://www.mdsec.co.uk/2018/08/escaping-the-sandbox-microsoft-office-on-macos/", + "https://desi-jarvis.medium.com/office365-macos-sandbox-escape-fcce4fa4123c" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1497", + "name": "Virtualization/Sandbox Evasion", + "reference": "https://attack.mitre.org/techniques/T1497/" + } + ] + } + ], + "id": "0e1ee932-71c6-4860-9367-8d6b33970422", + "rule_id": "d22a85c6-d2ad-4cc4-bf7b-54787473669a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:file and host.os.type:(macos and macos) and not event.type:deletion and file.name:~$*.zip\n", + "language": "kuery" + }, + { + "name": "Remote Windows Service Installed", + "description": "Identifies a network logon followed by Windows service creation with same LogonId. This could be indicative of lateral movement, but will be noisy if commonly done by administrators.\"", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 6, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + } + ], + "id": "c3fca815-699b-4f7f-b53c-711c43404195", + "rule_id": "d33ea3bf-9a11-463e-bd46-f648f2a0f4b1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.ServiceFileName", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectLogonId", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.logon.id", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.logon.type", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "sequence by winlog.logon.id, winlog.computer_name with maxspan=1m\n[authentication where event.action == \"logged-in\" and winlog.logon.type : \"Network\" and\nevent.outcome==\"success\" and source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\"]\n[iam where event.action == \"service-installed\" and\n not winlog.event_data.SubjectLogonId : \"0x3e7\" and\n not winlog.event_data.ServiceFileName :\n (\"?:\\\\Windows\\\\ADCR_Agent\\\\adcrsvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\VSSVC.exe\",\n \"?:\\\\Windows\\\\servicing\\\\TrustedInstaller.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Windows\\\\PSEXESVC.EXE\",\n \"?:\\\\Windows\\\\System32\\\\sppsvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\wbem\\\\WmiApSrv.exe\",\n \"?:\\\\WINDOWS\\\\RemoteAuditService.exe\",\n \"?:\\\\Windows\\\\VeeamVssSupport\\\\VeeamGuestHelper.exe\",\n \"?:\\\\Windows\\\\VeeamLogShipper\\\\VeeamLogShipper.exe\",\n \"?:\\\\Windows\\\\CAInvokerService.exe\",\n \"?:\\\\Windows\\\\System32\\\\upfc.exe\",\n \"?:\\\\Windows\\\\AdminArsenal\\\\PDQ*.exe\",\n \"?:\\\\Windows\\\\System32\\\\vds.exe\",\n \"?:\\\\Windows\\\\Veeam\\\\Backup\\\\VeeamDeploymentSvc.exe\",\n \"?:\\\\Windows\\\\ProPatches\\\\Scheduler\\\\STSchedEx.exe\",\n \"?:\\\\Windows\\\\System32\\\\certsrv.exe\",\n \"?:\\\\Windows\\\\eset-remote-install-service.exe\",\n \"?:\\\\Pella Corporation\\\\Pella Order Management\\\\GPAutoSvc.exe\",\n \"?:\\\\Pella Corporation\\\\OSCToGPAutoService\\\\OSCToGPAutoSvc.exe\",\n \"?:\\\\Pella Corporation\\\\Pella Order Management\\\\GPAutoSvc.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\NwxExeSvc\\\\NwxExeSvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\taskhostex.exe\")]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "Shell Execution via Apple Scripting", + "description": "Identifies the execution of the shell process (sh) via scripting (JXA or AppleScript). Adversaries may use the doShellScript functionality in JXA or do shell script in AppleScript to execute system commands.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://developer.apple.com/library/archive/technotes/tn2065/_index.html", + "https://objectivebythesea.com/v2/talks/OBTS_v2_Thomas.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "b566c26a-6996-4c47-8134-bb254fe53c7f", + "rule_id": "d461fac0-43e8-49e2-85ea-3a58fe120b4f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.pid", + "type": "long", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id with maxspan=5s\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\", \"info\") and process.name == \"osascript\"] by process.pid\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name == \"sh\" and process.args == \"-c\"] by process.parent.pid\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual Linux System Information Discovery Activity", + "description": "Looks for commands related to system information discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used to engage in system information discovery in order to gather detailed information about system configuration and software versions. This may be a precursor to selection of a persistence mechanism or a method of privilege elevation.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Discovery" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Uncommon user command activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "6a56500b-a433-432d-827e-c390c2a2a57d", + "rule_id": "d4af3a06-1e0a-48ec-b96a-faf2309fae46", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": [ + "v3_linux_system_information_discovery" + ] + }, + { + "name": "Unusual Source IP for a User to Logon from", + "description": "A machine learning job detected a user logging in from an IP address that is unusual for the user. This can be due to credentialed access via a compromised account when the user and the threat actor are in different locations. An unusual source IP address for a username could also be due to lateral movement when a compromised account is used to pivot between hosts.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Identity and Access Audit", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Business travelers who roam to new locations may trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "84ca4b20-7c9a-4449-91c9-a9dc18eaea62", + "rule_id": "d4b73fa0-9d43-465e-b8bf-50230da6718b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "auth_rare_source_ip_for_a_user" + }, + { + "name": "Potential Privilege Escalation via UID INT_MAX Bug Detected", + "description": "This rule monitors for the execution of the systemd-run command by a user with a UID that is larger than the maximum allowed UID size (INT_MAX). Some older Linux versions were affected by a bug which allows user accounts with a UID greater than INT_MAX to escalate privileges by spawning a shell through systemd-run.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://twitter.com/paragonsec/status/1071152249529884674", + "https://github.com/mirchr/security-research/blob/master/vulnerabilities/CVE-2018-19788.sh", + "https://gitlab.freedesktop.org/polkit/polkit/-/issues/74" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "77de8939-c0cb-4557-99ed-509800e7f2c8", + "rule_id": "d55436a8-719c-445f-92c4-c113ff2f9ba5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"systemd-run\" and process.args == \"-t\" and process.args_count >= 3 and user.id >= \"1000000000\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Privilege Escalation via Windir Environment Variable", + "description": "Identifies a privilege escalation attempt via a rogue Windows directory (Windir) environment variable. This is a known primitive that is often combined with other vulnerabilities to elevate privileges.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.tiraniddo.dev/2017/05/exploiting-environment-variables-in.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.007", + "name": "Path Interception by PATH Environment Variable", + "reference": "https://attack.mitre.org/techniques/T1574/007/" + } + ] + } + ] + } + ], + "id": "ec4b5fe7-6adf-4402-99ce-e353039630bf", + "rule_id": "d563aaba-2e72-462b-8658-3e5ea22db3a6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKEY_USERS\\\\*\\\\Environment\\\\windir\",\n \"HKEY_USERS\\\\*\\\\Environment\\\\systemroot\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Environment\\\\windir\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Environment\\\\systemroot\"\n ) and\n not registry.data.strings : (\"C:\\\\windows\", \"%SystemRoot%\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Service Command Lateral Movement", + "description": "Identifies use of sc.exe to create, modify, or start services on remote hosts. This could be indicative of adversary lateral movement but will be noisy if commonly done by admins.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1569", + "name": "System Services", + "reference": "https://attack.mitre.org/techniques/T1569/", + "subtechnique": [ + { + "id": "T1569.002", + "name": "Service Execution", + "reference": "https://attack.mitre.org/techniques/T1569/002/" + } + ] + } + ] + } + ], + "id": "bad9c496-7c45-4065-911c-f1bd8da9a5cd", + "rule_id": "d61cbcf8-1bc1-4cff-85ba-e7b21c5beedc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id with maxspan = 1m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"sc.exe\" or process.pe.original_file_name : \"sc.exe\") and\n process.args : \"\\\\\\\\*\" and process.args : (\"binPath=*\", \"binpath=*\") and\n process.args : (\"create\", \"config\", \"failure\", \"start\")]\n [network where host.os.type == \"windows\" and process.name : \"sc.exe\" and destination.ip != \"127.0.0.1\"]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Modification of WDigest Security Provider", + "description": "Identifies attempts to modify the WDigest security provider in the registry to force the user's password to be stored in clear text in memory. This behavior can be indicative of an adversary attempting to weaken the security configuration of an endpoint. Once the UseLogonCredential value is modified, the adversary may attempt to dump clear text passwords from memory.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Modification of WDigest Security Provider\n\nIn Windows XP, Microsoft added support for a protocol known as WDigest. The WDigest protocol allows clients to send cleartext credentials to Hypertext Transfer Protocol (HTTP) and Simple Authentication Security Layer (SASL) applications based on RFC 2617 and 2831. Windows versions up to 8 and 2012 store logon credentials in memory in plaintext by default, which is no longer the case with newer Windows versions.\n\nStill, attackers can force WDigest to store the passwords insecurely on the memory by modifying the `HKLM\\SYSTEM\\*ControlSet*\\Control\\SecurityProviders\\WDigest\\UseLogonCredential` registry key. This activity is commonly related to the execution of credential dumping tools.\n\n#### Possible investigation steps\n\n- It is unlikely that the monitored registry key was modified legitimately in newer versions of Windows. Analysts should treat any activity triggered from this rule with high priority as it typically represents an active adversary.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Determine if credential dumping tools were run on the host, and retrieve and analyze suspicious executables:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Use process name, command line, and file hash to search for occurrences on other hosts.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This modification should not happen legitimately. Any potential benign true positive (B-TP) should be mapped and monitored by the security team, as these modifications expose the entire domain to credential compromises and consequently unauthorized access.\n\n### Related rules\n\n- Mimikatz Powershell Module Activity - ac96ceb8-4399-4191-af1d-4feeac1f1f46\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system and restore compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.csoonline.com/article/3438824/how-to-detect-and-halt-credential-theft-via-windows-wdigest.html", + "https://www.praetorian.com/blog/mitigating-mimikatz-wdigest-cleartext-credential-theft?edition=2019", + "https://frsecure.com/compromised-credentials-response-playbook", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "416b5a88-46bf-4f1c-a73f-48bfea0be547", + "rule_id": "d703a5af-d5b0-43bd-8ddb-7a5d500b7da5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type : (\"creation\", \"change\") and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\SecurityProviders\\\\WDigest\\\\UseLogonCredential\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\SecurityProviders\\\\WDigest\\\\UseLogonCredential\"\n ) and registry.data.strings : (\"1\", \"0x00000001\") and\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\svchost.exe\" and user.id : \"S-1-5-18\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "SystemKey Access via Command Line", + "description": "Keychains are the built-in way for macOS to keep track of users' passwords and credentials for many services and features, including Wi-Fi and website passwords, secure notes, certificates, and Kerberos. Adversaries may collect the keychain storage data from a system to acquire credentials.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/AlessandroZ/LaZagne/blob/master/Mac/lazagne/softwares/system/chainbreaker.py" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1555", + "name": "Credentials from Password Stores", + "reference": "https://attack.mitre.org/techniques/T1555/", + "subtechnique": [ + { + "id": "T1555.001", + "name": "Keychain", + "reference": "https://attack.mitre.org/techniques/T1555/001/" + } + ] + } + ] + } + ], + "id": "ae67fe29-5ef6-49fb-b8cb-6e2b5605b090", + "rule_id": "d75991f2-b989-419d-b797-ac1e54ec2d61", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.args:(\"/private/var/db/SystemKey\" or \"/var/db/SystemKey\")\n", + "language": "kuery" + }, + { + "name": "Azure Blob Permissions Modification", + "description": "Identifies when the Azure role-based access control (Azure RBAC) permissions are modified for an Azure Blob. An adversary may modify the permissions on a blob to weaken their target's security controls or an administrator may inadvertently modify the permissions, which could lead to data exposure or loss.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 103, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Blob permissions may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1222", + "name": "File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/" + } + ] + } + ], + "id": "f6cab505-2cd2-4695-93ab-95c07f74f5e1", + "rule_id": "d79c4b2a-6134-4edd-86e6-564a92a933f9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:(\n \"MICROSOFT.STORAGE/STORAGEACCOUNTS/BLOBSERVICES/CONTAINERS/BLOBS/MANAGEOWNERSHIP/ACTION\" or\n \"MICROSOFT.STORAGE/STORAGEACCOUNTS/BLOBSERVICES/CONTAINERS/BLOBS/MODIFYPERMISSIONS/ACTION\") and\n event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Spike in Logon Events", + "description": "A machine learning job found an unusually large spike in successful authentication events. This can be due to password spraying, user enumeration or brute force activity.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Identity and Access Audit", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Build servers and CI systems can sometimes trigger this alert. Security test cycles that include brute force or password spraying activities may trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "52d24b2c-97df-494c-b885-e63d780154a2", + "rule_id": "d7d5c059-c19a-4a96-8ae3-41496ef3bcf9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "auth_high_count_logon_events" + }, + { + "name": "Execution via Windows Subsystem for Linux", + "description": "Detects attempts to execute a program on the host from the Windows Subsystem for Linux. Adversaries may enable and use WSL for Linux to avoid detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://learn.microsoft.com/en-us/windows/wsl/wsl-config" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1202", + "name": "Indirect Command Execution", + "reference": "https://attack.mitre.org/techniques/T1202/" + } + ] + } + ], + "id": "8e76a42b-6328-45c4-a1c1-7bd121f30b8b", + "rule_id": "db7dbad5-08d2-4d25-b9b1-d3a1e4a15efd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type : \"start\" and\n process.parent.executable : \n (\"?:\\\\Windows\\\\System32\\\\wsl.exe\", \n \"?:\\\\Program Files*\\\\WindowsApps\\\\MicrosoftCorporationII.WindowsSubsystemForLinux_*\\\\wsl.exe\", \n \"?:\\\\Windows\\\\System32\\\\wslhost.exe\", \n \"?:\\\\Program Files*\\\\WindowsApps\\\\MicrosoftCorporationII.WindowsSubsystemForLinux_*\\\\wslhost.exe\") and \n not process.executable : \n (\"?:\\\\Windows\\\\System32\\\\conhost.exe\", \n \"?:\\\\Windows\\\\System32\\\\lxss\\\\wslhost.exe\", \n \"?:\\\\Windows\\\\Sys*\\\\wslconfig.exe\", \n \"?:\\\\Program Files*\\\\WindowsApps\\\\MicrosoftCorporationII.WindowsSubsystemForLinux_*\\\\wsl*.exe\", \n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\", \n \"?:\\\\Program Files\\\\*\", \n \"?:\\\\Program Files (x86)\\\\*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Content Extracted or Decompressed via Funzip", + "description": "Identifies when suspicious content is extracted from a file and subsequently decompressed using the funzip utility. Malware may execute the tail utility using the \"-c\" option to read a sequence of bytes from the end of a file. The output from tail can be piped to funzip in order to decompress malicious code before it is executed. This behavior is consistent with malware families such as Bundlore.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://attack.mitre.org/software/S0482/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1027", + "name": "Obfuscated Files or Information", + "reference": "https://attack.mitre.org/techniques/T1027/" + }, + { + "id": "T1140", + "name": "Deobfuscate/Decode Files or Information", + "reference": "https://attack.mitre.org/techniques/T1140/" + } + ] + } + ], + "id": "b106b7f8-1f96-4010-bf50-1cc5def707fb", + "rule_id": "dc0b7782-0df0-47ff-8337-db0d678bdb66", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and\n((process.args == \"tail\" and process.args == \"-c\" and process.args == \"funzip\")) and\nnot process.args : \"/var/log/messages\" and \nnot process.parent.executable : (\"/usr/bin/dracut\", \"/sbin/dracut\", \"/usr/bin/xargs\") and\nnot (process.parent.name in (\"sh\", \"sudo\") and process.parent.command_line : \"*nessus_su*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Unusual Child Process from a System Virtual Process", + "description": "Identifies a suspicious child process of the Windows virtual system process, which could indicate code injection.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + } + ], + "id": "76616eff-d3aa-4858-a0e8-0d5dba50b6df", + "rule_id": "de9bd7e0-49e9-4e92-a64d-53ade2e66af1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.pid", + "type": "long", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.pid == 4 and\n not process.executable : (\"Registry\", \"MemCompression\", \"?:\\\\Windows\\\\System32\\\\smss.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Query Registry using Built-in Tools", + "description": "This rule identifies the execution of commands that can be used to query the Windows Registry. Adversaries may query the registry to gain situational awareness about the host, like installed security software, programs and settings.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 102, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1012", + "name": "Query Registry", + "reference": "https://attack.mitre.org/techniques/T1012/" + } + ] + } + ], + "id": "0c5f4813-b4f8-4a42-850a-702aba3d582d", + "rule_id": "ded09d02-0137-4ccc-8005-c45e617e8d4c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line.caseless", + "type": "unknown", + "ecs": false + }, + { + "name": "process.name.caseless", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type:windows and event.category:process and event.type:start and (\n (process.name.caseless:\"reg.exe\" and process.args:\"query\") or \n (process.name.caseless:(\"powershell.exe\" or \"powershell_ise.exe\" or \"pwsh.exe\") and \n process.command_line.caseless:((*Get-ChildItem* or *Get-Item* or *Get-ItemProperty*) and \n (*HKCU* or *HKEY_CURRENT_USER* or *HKEY_LOCAL_MACHINE* or *HKLM* or *Registry\\:\\:*))))\n", + "new_terms_fields": [ + "host.id", + "user.id" + ], + "history_window_start": "now-14d", + "index": [ + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "Unusual Windows User Calling the Metadata Service", + "description": "Looks for anomalous access to the cloud platform metadata service by an unusual user. The metadata service may be targeted in order to harvest credentials or user data scripts containing secrets.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A newly installed program, or one that runs under a new or rarely used user context, could trigger this detection rule. Manual interrogation of the metadata service during debugging or troubleshooting could trigger this rule." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.005", + "name": "Cloud Instance Metadata API", + "reference": "https://attack.mitre.org/techniques/T1552/005/" + } + ] + } + ] + } + ], + "id": "a07105d4-134d-45f2-ab83-b907b10d9ec4", + "rule_id": "df197323-72a8-46a9-a08e-3f5b04a4a97a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": [ + "v3_windows_rare_metadata_user" + ] + }, + { + "name": "KRBTGT Delegation Backdoor", + "description": "Identifies the modification of the msDS-AllowedToDelegateTo attribute to KRBTGT. Attackers can use this technique to maintain persistence to the domain by having the ability to request tickets for the KRBTGT service.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Use Case: Active Directory Monitoring", + "Data Source: Active Directory" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://skyblue.team/posts/delegate-krbtgt", + "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0026_windows_audit_user_account_management.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/" + } + ] + } + ], + "id": "ee2ff0d6-793a-42ef-912b-fc02631d04c8", + "rule_id": "e052c845-48d0-4f46-8a13-7d0aba05df82", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.AllowedToDelegateTo", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'Audit User Account Management' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nAccount Management >\nAudit User Account Management (Success,Failure)\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.action:modified-user-account and event.code:4738 and\n winlog.event_data.AllowedToDelegateTo:*krbtgt*\n", + "language": "kuery" + }, + { + "name": "Spike in Successful Logon Events from a Source IP", + "description": "A machine learning job found an unusually large spike in successful authentication events from a particular source IP address. This can be due to password spraying, user enumeration or brute force activity.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Spike in Successful Logon Events from a Source IP\n\nThis rule uses a machine learning job to detect a substantial spike in successful authentication events. This could indicate post-exploitation activities that aim to test which hosts, services, and other resources the attacker can access with the compromised credentials.\n\n#### Possible investigation steps\n\n- Identify the specifics of the involved assets, such as role, criticality, and associated users.\n- Check if the authentication comes from different sources.\n- Use the historical data available to determine if the same behavior happened in the past.\n- Investigate other alerts associated with the involved users during the past 48 hours.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n\n### False positive analysis\n\n- Understand the context of the authentications by contacting the asset owners. If this activity is related to a new business process or newly implemented (approved) technology, consider adding exceptions — preferably with a combination of user and source conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 104, + "tags": [ + "Use Case: Identity and Access Audit", + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Credential Access", + "Tactic: Defense Evasion", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Build servers and CI systems can sometimes trigger this alert. Security test cycles that include brute force or password spraying activities may trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.002", + "name": "Domain Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/002/" + }, + { + "id": "T1078.003", + "name": "Local Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/003/" + } + ] + } + ] + } + ], + "id": "ac075148-4d41-4733-b4ca-fc29ae520145", + "rule_id": "e26aed74-c816-40d3-a810-48d6fbd8b2fd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "auth_high_count_logon_events_for_a_source_ip" + }, + { + "name": "Windows Subsystem for Linux Enabled via Dism Utility", + "description": "Detects attempts to enable the Windows Subsystem for Linux using Microsoft Dism utility. Adversaries may enable and use WSL for Linux to avoid detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.f-secure.com/hunting-for-windows-subsystem-for-linux/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1202", + "name": "Indirect Command Execution", + "reference": "https://attack.mitre.org/techniques/T1202/" + } + ] + } + ], + "id": "fb4424ec-7845-4699-a4a8-89fb97e96d59", + "rule_id": "e2e0537d-7d8f-4910-a11d-559bcf61295a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type : \"start\" and\n (process.name : \"Dism.exe\" or process.pe.original_file_name == \"DISM.EXE\") and \n process.command_line : \"*Microsoft-Windows-Subsystem-Linux*\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Connection to Commonly Abused Free SSL Certificate Providers", + "description": "Identifies unusual processes connecting to domains using known free SSL certificates. Adversaries may employ a known encryption algorithm to conceal command and control traffic.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1573", + "name": "Encrypted Channel", + "reference": "https://attack.mitre.org/techniques/T1573/" + } + ] + } + ], + "id": "7fcc9a27-bebf-451d-8429-b63c37b481fe", + "rule_id": "e3cf38fa-d5b8-46cc-87f9-4a7513e4281d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "dns.question.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "network where host.os.type == \"windows\" and network.protocol == \"dns\" and\n /* Add new free SSL certificate provider domains here */\n dns.question.name : (\"*letsencrypt.org\", \"*.sslforfree.com\", \"*.zerossl.com\", \"*.freessl.org\") and\n\n /* Native Windows process paths that are unlikely to have network connections to domains secured using free SSL certificates */\n process.executable : (\"C:\\\\Windows\\\\System32\\\\*.exe\",\n \"C:\\\\Windows\\\\System\\\\*.exe\",\n\t \"C:\\\\Windows\\\\SysWOW64\\\\*.exe\",\n\t\t \"C:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\*.exe\",\n\t\t \"C:\\\\Windows\\\\explorer.exe\",\n\t\t \"C:\\\\Windows\\\\notepad.exe\") and\n\n /* Insert noisy false positives here */\n not process.name : (\"svchost.exe\", \"MicrosoftEdge*.exe\", \"msedge.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Service Creation via Local Kerberos Authentication", + "description": "Identifies a suspicious local successful logon event where the Logon Package is Kerberos, the remote address is set to localhost, followed by a sevice creation from the same LogonId. This may indicate an attempt to leverage a Kerberos relay attack variant that can be used to elevate privilege locally from a domain joined user to local System privileges.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Tactic: Credential Access", + "Use Case: Active Directory Monitoring", + "Data Source: Active Directory" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/Dec0ne/KrbRelayUp", + "https://googleprojectzero.blogspot.com/2021/10/using-kerberos-for-authentication-relay.html", + "https://github.com/cube0x0/KrbRelay", + "https://gist.github.com/tyranid/c24cfd1bd141d14d4925043ee7e03c82" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/" + } + ] + } + ], + "id": "aa01f8c7-6957-439a-bdd7-8f9b05779776", + "rule_id": "e4e31051-ee01-4307-a6ee-b21b186958f4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "source.port", + "type": "long", + "ecs": true + }, + { + "name": "winlog.computer_name", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.AuthenticationPackageName", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectLogonId", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.TargetLogonId", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.logon.type", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "sequence by winlog.computer_name with maxspan=5m\n [authentication where\n\n /* event 4624 need to be logged */\n event.action == \"logged-in\" and event.outcome == \"success\" and\n\n /* authenticate locally using relayed kerberos Ticket */\n winlog.event_data.AuthenticationPackageName :\"Kerberos\" and winlog.logon.type == \"Network\" and\n cidrmatch(source.ip, \"127.0.0.0/8\", \"::1\") and source.port > 0] by winlog.event_data.TargetLogonId\n\n [any where\n /* event 4697 need to be logged */\n event.action : \"service-installed\"] by winlog.event_data.SubjectLogonId\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "MFA Disabled for Google Workspace Organization", + "description": "Detects when multi-factor authentication (MFA) is disabled for a Google Workspace organization. An adversary may attempt to modify a password policy in order to weaken an organization’s security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating MFA Disabled for Google Workspace Organization\n\nMulti-factor authentication (MFA) is a process in which users are prompted for an additional form of identification, such as a code on their cell phone or a fingerprint scan, during the sign-in process.\n\nIf you only use a password to authenticate a user, it leaves an insecure vector for attack. If the users's password is weak or has been exposed elsewhere, an attacker could use it to gain access. Requiring a second form of authentication increases security because attackers cannot easily obtain or duplicate the additional authentication factor.\n\nFor more information about using MFA in Google Workspace, access the [official documentation](https://support.google.com/a/answer/175197).\n\nThis rule identifies when MFA enforcement is turned off in Google Workspace. This modification weakens account security and can lead to accounts and other assets being compromised.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- While this activity can be done by administrators, all users must use MFA. The security team should address any potential benign true positive (B-TP), as this configuration can risk the user and domain.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate the multi-factor authentication enforcement.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 205, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Identity and Access Audit", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "MFA settings may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1556", + "name": "Modify Authentication Process", + "reference": "https://attack.mitre.org/techniques/T1556/" + } + ] + } + ], + "id": "d7a3359e-7c56-4b97-8750-11c1135151d2", + "rule_id": "e555105c-ba6d-481f-82bb-9b633e7b4827", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.admin.new_value", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:(ENFORCE_STRONG_AUTHENTICATION or ALLOW_STRONG_AUTHENTICATION) and google_workspace.admin.new_value:false\n", + "language": "kuery" + }, + { + "name": "Authorization Plugin Modification", + "description": "Authorization plugins are used to extend the authorization services API and implement mechanisms that are not natively supported by the OS, such as multi-factor authentication with third party software. Adversaries may abuse this feature to persist and/or collect clear text credentials as they traverse the registered plugins during user logon.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://developer.apple.com/documentation/security/authorization_plug-ins", + "https://www.xorrior.com/persistent-credential-theft/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.002", + "name": "Authentication Package", + "reference": "https://attack.mitre.org/techniques/T1547/002/" + } + ] + } + ] + } + ], + "id": "62dcf497-4623-445a-b7c0-0faddabc1c7b", + "rule_id": "e6c98d38-633d-4b3e-9387-42112cd5ac10", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:file and host.os.type:macos and not event.type:deletion and\n file.path:(/Library/Security/SecurityAgentPlugins/* and\n not /Library/Security/SecurityAgentPlugins/TeamViewerAuthPlugin.bundle/*) and\n not process.name:shove and process.code_signature.trusted:true\n", + "language": "kuery" + }, + { + "name": "Screensaver Plist File Modified by Unexpected Process", + "description": "Identifies when a screensaver plist file is modified by an unexpected process. An adversary can maintain persistence on a macOS endpoint by creating a malicious screensaver (.saver) file and configuring the screensaver plist file to execute code each time the screensaver is activated.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n- Analyze the plist file modification event to identify whether the change was expected or not\n- Investigate the process that modified the plist file for malicious code or other suspicious behavior\n- Identify if any suspicious or known malicious screensaver (.saver) files were recently written to or modified on the host", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://posts.specterops.io/saving-your-access-d562bf5bf90b", + "https://github.com/D00MFist/PersistentJXA" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/" + } + ] + } + ], + "id": "4d28a6d3-fe85-4b09-b28d-4e3e2a46295e", + "rule_id": "e6e8912f-283f-4d0d-8442-e0dcaf49944b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.exists", + "type": "boolean", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"macos\" and event.type != \"deletion\" and\n file.name: \"com.apple.screensaver.*.plist\" and\n file.path : (\n \"/Users/*/Library/Preferences/ByHost/*\",\n \"/Library/Managed Preferences/*\",\n \"/System/Library/Preferences/*\"\n ) and\n (\n process.code_signature.trusted == false or\n process.code_signature.exists == false or\n\n /* common script interpreters and abused native macOS bins */\n process.name : (\n \"curl\",\n \"mktemp\",\n \"tail\",\n \"funzip\",\n \"python*\",\n \"osascript\",\n \"perl\"\n )\n ) and\n\n /* Filter OS processes modifying screensaver plist files */\n not process.executable : (\n \"/usr/sbin/cfprefsd\",\n \"/usr/libexec/xpcproxy\",\n \"/System/Library/CoreServices/ManagedClient.app/Contents/Resources/MCXCompositor\",\n \"/System/Library/CoreServices/ManagedClient.app/Contents/MacOS/ManagedClient\"\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Default Cobalt Strike Team Server Certificate", + "description": "This rule detects the use of the default Cobalt Strike Team Server TLS certificate. Cobalt Strike is software for Adversary Simulations and Red Team Operations which are security assessments that replicate the tactics and techniques of an advanced adversary in a network. Modifications to the Packetbeat configuration can be made to include MD5 and SHA256 hashing algorithms (the default is SHA1). See the References section for additional information on module configuration.", + "risk_score": 99, + "severity": "critical", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Threat intel\n\nWhile Cobalt Strike is intended to be used for penetration tests and IR training, it is frequently used by actual threat actors (TA) such as APT19, APT29, APT32, APT41, FIN6, DarkHydrus, CopyKittens, Cobalt Group, Leviathan, and many other unnamed criminal TAs. This rule uses high-confidence atomic indicators, so alerts should be investigated rapidly.", + "version": 104, + "tags": [ + "Tactic: Command and Control", + "Threat: Cobalt Strike", + "Use Case: Threat Detection", + "Domain: Endpoint" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://attack.mitre.org/software/S0154/", + "https://www.cobaltstrike.com/help-setup-collaboration", + "https://www.elastic.co/guide/en/beats/packetbeat/current/configuration-tls.html", + "https://www.elastic.co/guide/en/beats/filebeat/7.9/filebeat-module-suricata.html", + "https://www.elastic.co/guide/en/beats/filebeat/7.9/filebeat-module-zeek.html", + "https://www.elastic.co/security-labs/collecting-cobalt-strike-beacons-with-the-elastic-stack" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/", + "subtechnique": [ + { + "id": "T1071.001", + "name": "Web Protocols", + "reference": "https://attack.mitre.org/techniques/T1071/001/" + } + ] + } + ] + } + ], + "id": "9583bdad-28c8-4ec6-b5d4-5f9ddcb97d44", + "rule_id": "e7075e8d-a966-458e-a183-85cd331af255", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "tls.server.hash.md5", + "type": "keyword", + "ecs": true + }, + { + "name": "tls.server.hash.sha1", + "type": "keyword", + "ecs": true + }, + { + "name": "tls.server.hash.sha256", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: network_traffic.tls or event.category: (network or network_traffic))\n and (tls.server.hash.md5:950098276A495286EB2A2556FBAB6D83\n or tls.server.hash.sha1:6ECE5ECE4192683D2D84E25B0BA7E04F9CB7EB7C\n or tls.server.hash.sha256:87F2085C32B6A2CC709B365F55873E207A9CAA10BFFECF2FD16D3CF9D94D390C)\n", + "language": "kuery" + }, + { + "name": "Execution of Persistent Suspicious Program", + "description": "Identifies execution of suspicious persistent programs (scripts, rundll32, etc.) by looking at process lineage and command line usage.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + } + ] + } + ] + } + ], + "id": "7a522371-de92-4417-82f9-40697619285f", + "rule_id": "e7125cea-9fe1-42a5-9a05-b0792cf86f5a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "/* userinit followed by explorer followed by early child process of explorer (unlikely to be launched interactively) within 1m */\nsequence by host.id, user.name with maxspan=1m\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"userinit.exe\" and process.parent.name : \"winlogon.exe\"]\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"explorer.exe\"]\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"explorer.exe\" and\n /* add suspicious programs here */\n process.pe.original_file_name in (\"cscript.exe\",\n \"wscript.exe\",\n \"PowerShell.EXE\",\n \"MSHTA.EXE\",\n \"RUNDLL32.EXE\",\n \"REGSVR32.EXE\",\n \"RegAsm.exe\",\n \"MSBuild.exe\",\n \"InstallUtil.exe\") and\n /* add potential suspicious paths here */\n process.args : (\"C:\\\\Users\\\\*\", \"C:\\\\ProgramData\\\\*\", \"C:\\\\Windows\\\\Temp\\\\*\", \"C:\\\\Windows\\\\Tasks\\\\*\", \"C:\\\\PerfLogs\\\\*\", \"C:\\\\Intel\\\\*\")\n ]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious WMI Event Subscription Created", + "description": "Detects the creation of a WMI Event Subscription. Attackers can abuse this mechanism for persistence or to elevate to SYSTEM privileges.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.blackhat.com/docs/us-15/materials/us-15-Graeber-Abusing-Windows-Management-Instrumentation-WMI-To-Build-A-Persistent%20Asynchronous-And-Fileless-Backdoor-wp.pdf", + "https://medium.com/threatpunter/detecting-removing-wmi-persistence-60ccbb7dff96" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.003", + "name": "Windows Management Instrumentation Event Subscription", + "reference": "https://attack.mitre.org/techniques/T1546/003/" + } + ] + } + ] + } + ], + "id": "6f9d4e57-9934-485b-b731-4a3a7cc21371", + "rule_id": "e72f87d0-a70e-4f8d-8443-a6407bc34643", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.Consumer", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.Operation", + "type": "keyword", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "any where event.dataset == \"windows.sysmon_operational\" and event.code == \"21\" and\n winlog.event_data.Operation : \"Created\" and winlog.event_data.Consumer : (\"*subscription:CommandLineEventConsumer*\", \"*subscription:ActiveScriptEventConsumer*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Host Files System Changes via Windows Subsystem for Linux", + "description": "Detects files creation and modification on the host system from the the Windows Subsystem for Linux. Adversaries may enable and use WSL for Linux to avoid detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/microsoft/WSL" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1202", + "name": "Indirect Command Execution", + "reference": "https://attack.mitre.org/techniques/T1202/" + } + ] + } + ], + "id": "ff59edbe-709d-4f80-a385-be17bc80531d", + "rule_id": "e88d1fe9-b2f4-48d4-bace-a026dc745d4b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id with maxspan=5m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"dllhost.exe\" and \n /* Plan9FileSystem CLSID - WSL Host File System Worker */\n process.command_line : \"*{DFB65C4C-B34F-435D-AFE9-A86218684AA8}*\"]\n [file where host.os.type == \"windows\" and process.name : \"dllhost.exe\" and not file.path : \"?:\\\\Users\\\\*\\\\Downloads\\\\*\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious System Commands Executed by Previously Unknown Executable", + "description": "This rule monitors for the execution of several commonly used system commands executed by a previously unknown executable located in commonly abused directories. An alert from this rule can indicate the presence of potentially malicious activity, such as the execution of unauthorized or suspicious processes attempting to run malicious code. Detecting and investigating such behavior can help identify and mitigate potential security threats, protecting the system and its data from potential compromise.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "aab50a3a-0f06-4356-8bec-fc9f749c4423", + "rule_id": "e9001ee6-2d00-4d2f-849e-b8b1fb05234c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n", + "type": "new_terms", + "query": "host.os.type:linux and event.category:process and event.action:(exec or exec_event or fork or fork_event) and \nprocess.executable:(\n /bin/* or /usr/bin/* or /usr/share/* or /tmp/* or /var/tmp/* or /dev/shm/* or\n /etc/init.d/* or /etc/rc*.d/* or /etc/crontab or /etc/cron.*/* or /etc/update-motd.d/* or \n /usr/lib/update-notifier/* or /home/*/.* or /boot/* or /srv/* or /run/*) \n and process.args:(whoami or id or hostname or uptime or top or ifconfig or netstat or route or ps or pwd or ls) and \n not process.name:(sudo or which or whoami or id or hostname or uptime or top or netstat or ps or pwd or ls or apt or \n dpkg or yum or rpm or dnf or dockerd or docker or snapd or snap) and\n not process.parent.executable:(/bin/* or /usr/bin/* or /run/k3s/* or /etc/network/* or /opt/Elastic/*)\n", + "new_terms_fields": [ + "host.id", + "user.id", + "process.executable" + ], + "history_window_start": "now-14d", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "Potential LSA Authentication Package Abuse", + "description": "Adversaries can use the autostart mechanism provided by the Local Security Authority (LSA) authentication packages for privilege escalation or persistence by placing a reference to a binary in the Windows registry. The binary will then be executed by SYSTEM when the authentication packages are loaded.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.002", + "name": "Authentication Package", + "reference": "https://attack.mitre.org/techniques/T1547/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.002", + "name": "Authentication Package", + "reference": "https://attack.mitre.org/techniques/T1547/002/" + } + ] + } + ] + } + ], + "id": "7b9dc509-459c-4a9d-83da-2eab80ab6101", + "rule_id": "e9abe69b-1deb-4e19-ac4a-5d5ac00f72eb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\Authentication Packages\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\Authentication Packages\"\n ) and\n /* exclude SYSTEM SID - look for changes by non-SYSTEM user */\n not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Spike in Firewall Denies", + "description": "A machine learning job detected an unusually large spike in network traffic that was denied by network access control lists (ACLs) or firewall rules. Such a burst of denied traffic is usually caused by either 1) a mis-configured application or firewall or 2) suspicious or malicious activity. Unsuccessful attempts at network transit, in order to connect to command-and-control (C2), or engage in data exfiltration, may produce a burst of failed connections. This could also be due to unusually large amounts of reconnaissance or enumeration traffic. Denial-of-service attacks or traffic floods may also produce such a surge in traffic.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: ML", + "Rule Type: Machine Learning" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A misconfgured network application or firewall may trigger this alert. Security scans or test cycles may trigger this alert." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" + ], + "max_signals": 100, + "threat": [], + "id": "12946dde-31a2-4920-afd6-45bf525f42e5", + "rule_id": "eaa77d63-9679-4ce3-be25-3ba8b795e5fa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [], + "setup": "", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "high_count_network_denies" + }, + { + "name": "Mimikatz Memssp Log File Detected", + "description": "Identifies the password log file from the default Mimikatz memssp module.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Mimikatz Memssp Log File Detected\n\n[Mimikatz](https://github.com/gentilkiwi/mimikatz) is an open-source tool used to collect, decrypt, and/or use cached credentials. This tool is commonly abused by adversaries during the post-compromise stage where adversaries have gained an initial foothold on an endpoint and are looking to elevate privileges and seek out additional authentication objects such as tokens/hashes/credentials that can then be used to laterally move and pivot across a network.\n\nThis rule looks for the creation of a file named `mimilsa.log`, which is generated when using the Mimikatz misc::memssp module, which injects a malicious Windows SSP to collect locally authenticated credentials, which includes the computer account password, running service credentials, and any accounts that logon.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (e.g., 4624) to the target host.\n- Retrieve and inspect the log file contents.\n- Search for DLL files created in the same location as the log file, and retrieve unsigned DLLs.\n - Use the PowerShell Get-FileHash cmdlet to get the SHA-256 hash value of these files.\n - Search for the existence of these files in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n - Identify the process that created the DLL using file creation events.\n\n### False positive analysis\n\n- This file name `mimilsa.log` should not legitimately be created.\n\n### Related rules\n\n- Mimikatz Powershell Module Activity - ac96ceb8-4399-4191-af1d-4feeac1f1f46\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the host is a Domain Controller (DC):\n - Activate your incident response plan for total Active Directory compromise.\n - Review the privileges assigned to users that can access the DCs to ensure that the least privilege principle is being followed and reduce the attack surface.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reboot the host to remove the injected SSP from memory.\n- Reimage the host operating system or restore compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + } + ] + } + ], + "id": "285a7068-6b0d-40e3-a1f1-49425ae4ad54", + "rule_id": "ebb200e8-adf0-43f8-a0bb-4ee5b5d852c6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and file.name : \"mimilsa.log\" and process.name : \"lsass.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "IIS HTTP Logging Disabled", + "description": "Identifies when Internet Information Services (IIS) HTTP Logging is disabled on a server. An attacker with IIS server access via a webshell or other mechanism can disable HTTP Logging as an effective anti-forensics measure.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating IIS HTTP Logging Disabled\n\nIIS (Internet Information Services) is a Microsoft web server software used to host websites and web applications on Windows. It provides features for serving dynamic and static content, and can be managed through a graphical interface or command-line tools.\n\nIIS logging is a data source that can be used for security monitoring, forensics, and incident response. It contains mainly information related to requests done to the web server, and can be used to spot malicious activities like webshells. Adversaries can tamper, clear, and delete this data to evade detection, cover their tracks, and slow down incident response.\n\nThis rule monitors commands that disable IIS logging.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Verify whether the logs stored in the `C:\\inetpub\\logs\\logfiles\\w3svc1` directory were deleted after this action.\n- Check if this operation is done under change management and approved according to the organization's policy.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Re-enable affected logging components, services, and security monitoring.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Resources: Investigation Guide", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 33, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.002", + "name": "Disable Windows Event Logging", + "reference": "https://attack.mitre.org/techniques/T1562/002/" + } + ] + } + ] + } + ], + "id": "a2b47599-6ccf-4de0-8340-2b45a7cd7444", + "rule_id": "ebf1adea-ccf2-4943-8b96-7ab11ca173a5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"appcmd.exe\" or process.pe.original_file_name == \"appcmd.exe\") and\n process.args : \"/dontLog*:*True\" and\n not process.parent.name : \"iissetup.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Process Execution from an Unusual Directory", + "description": "Identifies process execution from suspicious default Windows directories. This is sometimes done by adversaries to hide malware in trusted paths.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + } + ], + "id": "f9e7eaea-eb28-4e24-91c7-8f6fb50dc873", + "rule_id": "ebfe1448-7fac-4d59-acea-181bd89b1f7f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n /* add suspicious execution paths here */\nprocess.executable : (\"C:\\\\PerfLogs\\\\*.exe\",\"C:\\\\Users\\\\Public\\\\*.exe\",\"C:\\\\Windows\\\\Tasks\\\\*.exe\",\"C:\\\\Intel\\\\*.exe\",\"C:\\\\AMD\\\\Temp\\\\*.exe\",\"C:\\\\Windows\\\\AppReadiness\\\\*.exe\",\n\"C:\\\\Windows\\\\ServiceState\\\\*.exe\",\"C:\\\\Windows\\\\security\\\\*.exe\",\"C:\\\\Windows\\\\IdentityCRL\\\\*.exe\",\"C:\\\\Windows\\\\Branding\\\\*.exe\",\"C:\\\\Windows\\\\csc\\\\*.exe\",\n \"C:\\\\Windows\\\\DigitalLocker\\\\*.exe\",\"C:\\\\Windows\\\\en-US\\\\*.exe\",\"C:\\\\Windows\\\\wlansvc\\\\*.exe\",\"C:\\\\Windows\\\\Prefetch\\\\*.exe\",\"C:\\\\Windows\\\\Fonts\\\\*.exe\",\n \"C:\\\\Windows\\\\diagnostics\\\\*.exe\",\"C:\\\\Windows\\\\TAPI\\\\*.exe\",\"C:\\\\Windows\\\\INF\\\\*.exe\",\"C:\\\\Windows\\\\System32\\\\Speech\\\\*.exe\",\"C:\\\\windows\\\\tracing\\\\*.exe\",\n \"c:\\\\windows\\\\IME\\\\*.exe\",\"c:\\\\Windows\\\\Performance\\\\*.exe\",\"c:\\\\windows\\\\intel\\\\*.exe\",\"c:\\\\windows\\\\ms\\\\*.exe\",\"C:\\\\Windows\\\\dot3svc\\\\*.exe\",\n \"C:\\\\Windows\\\\panther\\\\*.exe\",\"C:\\\\Windows\\\\RemotePackages\\\\*.exe\",\"C:\\\\Windows\\\\OCR\\\\*.exe\",\"C:\\\\Windows\\\\appcompat\\\\*.exe\",\"C:\\\\Windows\\\\apppatch\\\\*.exe\",\"C:\\\\Windows\\\\addins\\\\*.exe\",\n \"C:\\\\Windows\\\\Setup\\\\*.exe\",\"C:\\\\Windows\\\\Help\\\\*.exe\",\"C:\\\\Windows\\\\SKB\\\\*.exe\",\"C:\\\\Windows\\\\Vss\\\\*.exe\",\"C:\\\\Windows\\\\Web\\\\*.exe\",\"C:\\\\Windows\\\\servicing\\\\*.exe\",\"C:\\\\Windows\\\\CbsTemp\\\\*.exe\",\n \"C:\\\\Windows\\\\Logs\\\\*.exe\",\"C:\\\\Windows\\\\WaaS\\\\*.exe\",\"C:\\\\Windows\\\\ShellExperiences\\\\*.exe\",\"C:\\\\Windows\\\\ShellComponents\\\\*.exe\",\"C:\\\\Windows\\\\PLA\\\\*.exe\",\n \"C:\\\\Windows\\\\Migration\\\\*.exe\",\"C:\\\\Windows\\\\debug\\\\*.exe\",\"C:\\\\Windows\\\\Cursors\\\\*.exe\",\"C:\\\\Windows\\\\Containers\\\\*.exe\",\"C:\\\\Windows\\\\Boot\\\\*.exe\",\"C:\\\\Windows\\\\bcastdvr\\\\*.exe\",\n \"C:\\\\Windows\\\\assembly\\\\*.exe\",\"C:\\\\Windows\\\\TextInput\\\\*.exe\",\"C:\\\\Windows\\\\security\\\\*.exe\",\"C:\\\\Windows\\\\schemas\\\\*.exe\",\"C:\\\\Windows\\\\SchCache\\\\*.exe\",\"C:\\\\Windows\\\\Resources\\\\*.exe\",\n \"C:\\\\Windows\\\\rescache\\\\*.exe\",\"C:\\\\Windows\\\\Provisioning\\\\*.exe\",\"C:\\\\Windows\\\\PrintDialog\\\\*.exe\",\"C:\\\\Windows\\\\PolicyDefinitions\\\\*.exe\",\"C:\\\\Windows\\\\media\\\\*.exe\",\n \"C:\\\\Windows\\\\Globalization\\\\*.exe\",\"C:\\\\Windows\\\\L2Schemas\\\\*.exe\",\"C:\\\\Windows\\\\LiveKernelReports\\\\*.exe\",\"C:\\\\Windows\\\\ModemLogs\\\\*.exe\",\"C:\\\\Windows\\\\ImmersiveControlPanel\\\\*.exe\") and\n not process.name : (\"SpeechUXWiz.exe\",\"SystemSettings.exe\",\"TrustedInstaller.exe\",\"PrintDialog.exe\",\"MpSigStub.exe\",\"LMS.exe\",\"mpam-*.exe\") and\n not process.executable :\n (\"?:\\\\Intel\\\\Wireless\\\\WUSetupLauncher.exe\",\n \"?:\\\\Intel\\\\Wireless\\\\Setup.exe\",\n \"?:\\\\Intel\\\\Move Mouse.exe\",\n \"?:\\\\windows\\\\Panther\\\\DiagTrackRunner.exe\",\n \"?:\\\\Windows\\\\servicing\\\\GC64\\\\tzupd.exe\",\n \"?:\\\\Users\\\\Public\\\\res\\\\RemoteLite.exe\",\n \"?:\\\\Users\\\\Public\\\\IBM\\\\ClientSolutions\\\\*.exe\",\n \"?:\\\\Users\\\\Public\\\\Documents\\\\syspin.exe\",\n \"?:\\\\Users\\\\Public\\\\res\\\\FileWatcher.exe\")\n /* uncomment once in winlogbeat */\n /* and not (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true) */\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Unusual Print Spooler Child Process", + "description": "Detects unusual Print Spooler service (spoolsv.exe) child processes. This may indicate an attempt to exploit privilege escalation vulnerabilities related to the Printing Service on Windows.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Install or update of a legitimate printing driver. Verify the printer driver file metadata such as manufacturer and signature information." + ], + "references": [ + "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "54e17122-d9a1-4cb8-b934-f6588b75ab4a", + "rule_id": "ee5300a7-7e31-4a72-a258-250abb8b3aa1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.token.integrity_level_name", + "type": "unknown", + "ecs": false + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.IntegrityLevel", + "type": "keyword", + "ecs": false + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"spoolsv.exe\" and\n (?process.Ext.token.integrity_level_name : \"System\" or\n ?winlog.event_data.IntegrityLevel : \"System\") and\n\n /* exclusions for FP control below */\n not process.name : (\"splwow64.exe\", \"PDFCreator.exe\", \"acrodist.exe\", \"spoolsv.exe\", \"msiexec.exe\", \"route.exe\", \"WerFault.exe\") and\n not process.command_line : \"*\\\\WINDOWS\\\\system32\\\\spool\\\\DRIVERS*\" and\n not (process.name : \"net.exe\" and process.command_line : (\"*stop*\", \"*start*\")) and\n not (process.name : (\"cmd.exe\", \"powershell.exe\") and process.command_line : (\"*.spl*\", \"*\\\\program files*\", \"*route add*\")) and\n not (process.name : \"netsh.exe\" and process.command_line : (\"*add portopening*\", \"*rule name*\")) and\n not (process.name : \"regsvr32.exe\" and process.command_line : \"*PrintConfig.dll*\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*" + ] + }, + { + "name": "Potential Privacy Control Bypass via TCCDB Modification", + "description": "Identifies the use of sqlite3 to directly modify the Transparency, Consent, and Control (TCC) SQLite database. This may indicate an attempt to bypass macOS privacy controls, including access to sensitive resources like the system camera, microphone, address book, and calendar.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://applehelpwriter.com/2016/08/29/discovering-how-dropbox-hacks-your-mac/", + "https://github.com/bp88/JSS-Scripts/blob/master/TCC.db%20Modifier.sh", + "https://medium.com/@mattshockl/cve-2020-9934-bypassing-the-os-x-transparency-consent-and-control-tcc-framework-for-4e14806f1de8" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "8760ccd7-58ab-456b-8c73-c93aa9a23875", + "rule_id": "eea82229-b002-470e-a9e1-00be38b14d32", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name : \"sqlite*\" and\n process.args : \"/*/Application Support/com.apple.TCC/TCC.db\" and\n not process.parent.executable : \"/Library/Bitdefender/AVP/product/bin/*\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Whoami Process Activity", + "description": "Identifies suspicious use of whoami.exe which displays user, group, and privileges information for the user who is currently logged on to the local system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Whoami Process Activity\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `whoami` utility. Attackers commonly use this utility to measure their current privileges, discover the current user, determine if a privilege escalation was successful, etc.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Related rules\n\n- Account Discovery Command via SYSTEM Account - 2856446a-34e6-435b-9fb5-f8f040bfa7ed\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 107, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Some normal use of this program, at varying levels of frequency, may originate from scripts, automation tools and frameworks. Usage by non-engineers and ordinary users is unusual." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1033", + "name": "System Owner/User Discovery", + "reference": "https://attack.mitre.org/techniques/T1033/" + } + ] + } + ], + "id": "34fb6a7f-db75-4174-930f-ec5cefe20d47", + "rule_id": "ef862985-3f13-4262-a686-5f357bbb9bc2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"whoami.exe\" and\n(\n\n (/* scoped for whoami execution under system privileges */\n (user.domain : (\"NT AUTHORITY\", \"NT-AUTORITÄT\", \"AUTORITE NT\", \"IIS APPPOOL\") or user.id : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\")) and\n\n not (process.parent.name : \"cmd.exe\" and\n process.parent.args : (\"chcp 437>nul 2>&1 & C:\\\\WINDOWS\\\\System32\\\\whoami.exe /groups\",\n \"chcp 437>nul 2>&1 & %systemroot%\\\\system32\\\\whoami /user\",\n \"C:\\\\WINDOWS\\\\System32\\\\whoami.exe /groups\",\n \"*WINDOWS\\\\system32\\\\config\\\\systemprofile*\")) and\n not (process.parent.executable : \"C:\\\\Windows\\\\system32\\\\inetsrv\\\\appcmd.exe\" and process.parent.args : \"LIST\") and\n not process.parent.executable : (\"C:\\\\Program Files\\\\Microsoft Monitoring Agent\\\\Agent\\\\MonitoringHost.exe\",\n \"C:\\\\Program Files\\\\Cohesity\\\\cohesity_windows_agent_service.exe\")) or\n\n process.parent.name : (\"wsmprovhost.exe\", \"w3wp.exe\", \"wmiprvse.exe\", \"rundll32.exe\", \"regsvr32.exe\")\n\n)\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "logs-system.*", + "endgame-*" + ] + }, + { + "name": "Unusual Child Processes of RunDLL32", + "description": "Identifies child processes of unusual instances of RunDLL32 where the command line parameters were suspicious. Misuse of RunDLL32 could indicate malicious activity.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "30m", + "from": "now-60m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.011", + "name": "Rundll32", + "reference": "https://attack.mitre.org/techniques/T1218/011/" + } + ] + } + ] + } + ], + "id": "6efc7e57-9f53-4fe0-87f8-8a7ba01cf764", + "rule_id": "f036953a-4615-4707-a1ca-dc53bf69dcd5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=1h\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"rundll32.exe\" or process.pe.original_file_name == \"RUNDLL32.EXE\") and\n process.args_count == 1\n ] by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"rundll32.exe\"\n ] by process.parent.entity_id\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Suspicious HTML File Creation", + "description": "Identifies the execution of a browser process to open an HTML file with high entropy and size. Adversaries may smuggle data and files past content filters by hiding malicious payloads inside of seemingly benign HTML files.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + }, + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1027", + "name": "Obfuscated Files or Information", + "reference": "https://attack.mitre.org/techniques/T1027/", + "subtechnique": [ + { + "id": "T1027.006", + "name": "HTML Smuggling", + "reference": "https://attack.mitre.org/techniques/T1027/006/" + } + ] + } + ] + } + ], + "id": "b08adbb3-6fe7-4a88-b0cb-2b27fd0b66c3", + "rule_id": "f0493cb4-9b15-43a9-9359-68c23a7f2cf3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.entropy", + "type": "unknown", + "ecs": false + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "file.size", + "type": "long", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "sequence by user.id with maxspan=5m\n [file where host.os.type == \"windows\" and event.action in (\"creation\", \"rename\") and\n file.extension : (\"htm\", \"html\") and\n file.path : (\"?:\\\\Users\\\\*\\\\Downloads\\\\*\",\n \"?:\\\\Users\\\\*\\\\Content.Outlook\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\Temp?_*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\7z*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\Rar$*\") and\n ((file.Ext.entropy >= 5 and file.size >= 150000) or file.size >= 1000000)]\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n (\n (process.name in (\"chrome.exe\", \"msedge.exe\", \"brave.exe\", \"whale.exe\", \"browser.exe\", \"dragon.exe\", \"vivaldi.exe\", \"opera.exe\")\n and process.args == \"--single-argument\") or\n (process.name == \"iexplore.exe\" and process.args_count == 2) or\n (process.name in (\"firefox.exe\", \"waterfox.exe\") and process.args == \"-url\")\n )\n and process.args : (\"?:\\\\Users\\\\*\\\\Downloads\\\\*.htm*\",\n \"?:\\\\Users\\\\*\\\\Content.Outlook\\\\*.htm*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\Temp?_*.htm*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\7z*.htm*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\Rar$*.htm*\")]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Attempt to Remove File Quarantine Attribute", + "description": "Identifies a potential Gatekeeper bypass. In macOS, when applications or programs are downloaded from the internet, there is a quarantine flag set on the file. This attribute is read by Apple's Gatekeeper defense program at execution time. An adversary may disable this attribute to evade defenses.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.trendmicro.com/en_us/research/20/k/new-macos-backdoor-connected-to-oceanlotus-surfaces.html", + "https://ss64.com/osx/xattr.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "cb499ef5-5531-4ba5-b4fd-7c8e9921f615", + "rule_id": "f0b48bbc-549e-4bcf-8ee0-a7a72586c6a7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.name : \"xattr\" and\n (\n (process.args : \"com.apple.quarantine\" and process.args : (\"-d\", \"-w\")) or\n (process.args : \"-c\") or\n (process.command_line : (\"/bin/bash -c xattr -c *\", \"/bin/zsh -c xattr -c *\", \"/bin/sh -c xattr -c *\"))\n ) and not process.args_count > 12\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Execution with Explicit Credentials via Scripting", + "description": "Identifies execution of the security_authtrampoline process via a scripting interpreter. This occurs when programs use AuthorizationExecute-WithPrivileges from the Security.framework to run another program with root privileges. It should not be run by itself, as this is a sign of execution with explicit logon credentials.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://objectivebythesea.com/v2/talks/OBTS_v2_Thomas.pdf", + "https://www.manpagez.com/man/8/security_authtrampoline/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + }, + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.004", + "name": "Elevated Execution with Prompt", + "reference": "https://attack.mitre.org/techniques/T1548/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "baff8a0a-bd8d-4687-977c-30b1f1908bc2", + "rule_id": "f0eb70e9-71e9-40cd-813f-bf8e8c812cb1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:\"security_authtrampoline\" and\n process.parent.name:(osascript or com.apple.automator.runner or sh or bash or dash or zsh or python* or Python or perl* or php* or ruby or pwsh)\n", + "language": "kuery" + }, + { + "name": "Creation of Hidden Login Item via Apple Script", + "description": "Identifies the execution of osascript to create a hidden login item. This may indicate an attempt to persist a malicious program while concealing its presence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.002", + "name": "AppleScript", + "reference": "https://attack.mitre.org/techniques/T1059/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1647", + "name": "Plist File Modification", + "reference": "https://attack.mitre.org/techniques/T1647/" + } + ] + } + ], + "id": "a95f1f25-79b1-4799-97fb-7cb84d1192ac", + "rule_id": "f24bcae1-8980-4b30-b5dd-f851b055c9e7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name : \"osascript\" and\n process.command_line : \"osascript*login item*hidden:true*\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "SIP Provider Modification", + "description": "Identifies modifications to the registered Subject Interface Package (SIP) providers. SIP providers are used by the Windows cryptographic system to validate file signatures on the system. This may be an attempt to bypass signature validation checks or inject code into critical processes.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/mattifestation/PoCSubjectInterfacePackage" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1553", + "name": "Subvert Trust Controls", + "reference": "https://attack.mitre.org/techniques/T1553/", + "subtechnique": [ + { + "id": "T1553.003", + "name": "SIP and Trust Provider Hijacking", + "reference": "https://attack.mitre.org/techniques/T1553/003/" + } + ] + } + ] + } + ], + "id": "0a30e16e-e7ea-4859-b517-730551156bf1", + "rule_id": "f2c7b914-eda3-40c2-96ac-d23ef91776ca", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type:\"change\" and\n registry.path: (\n \"*\\\\SOFTWARE\\\\Microsoft\\\\Cryptography\\\\OID\\\\EncodingType 0\\\\CryptSIPDllPutSignedDataMsg\\\\{*}\\\\Dll\",\n \"*\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Cryptography\\\\OID\\\\EncodingType 0\\\\CryptSIPDllPutSignedDataMsg\\\\{*}\\\\Dll\",\n \"*\\\\SOFTWARE\\\\Microsoft\\\\Cryptography\\\\Providers\\\\Trust\\\\FinalPolicy\\\\{*}\\\\$Dll\",\n \"*\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Cryptography\\\\Providers\\\\Trust\\\\FinalPolicy\\\\{*}\\\\$Dll\"\n ) and\n registry.data.strings:\"*.dll\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Google Workspace Object Copied from External Drive and Access Granted to Custom Application", + "description": "Detects when a user copies a Google spreadsheet, form, document or script from an external drive. Sequence logic has been added to also detect when a user grants a custom Google application permission via OAuth shortly after. An adversary may send a phishing email to the victim with a Drive object link where \"copy\" is included in the URI, thus copying the object to the victim's drive. If a container-bound script exists within the object, execution will require permission access via OAuth in which the user has to accept.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace Resource Copied from External Drive and Access Granted to Custom Application\n\nGoogle Workspace users can share access to Drive objects such as documents, sheets, and forms via email delivery or a shared link. Shared link URIs have parameters like `view` or `edit` to indicate the recipient's permissions. The `copy` parameter allows the recipient to copy the object to their own Drive, which grants the object with the same privileges as the recipient. Specific objects in Google Drive allow container-bound scripts that run on Google's Apps Script platform. Container-bound scripts can contain malicious code that executes with the recipient's privileges if in their Drive.\n\nThis rule aims to detect when a user copies an external Drive object to their Drive storage and then grants permissions to a custom application via OAuth prompt.\n\n#### Possible investigation steps\n- Identify user account(s) associated by reviewing `user.name` or `source.user.email` in the alert.\n- Identify the name of the file copied by reviewing `file.name` as well as the `file.id` for triaging.\n- Identify the file type by reviewing `google_workspace.drive.file.type`.\n- With the information gathered so far, query across data for the file metadata to determine if this activity is isolated or widespread.\n- Within the OAuth token event, identify the application name by reviewing `google_workspace.token.app_name`.\n - Review the application ID as well from `google_workspace.token.client.id`.\n - This metadata can be used to report the malicious application to Google for permanent blacklisting.\n- Identify the permissions granted to the application by the user by reviewing `google_workspace.token.scope.data.scope_name`.\n - This information will help pivot and triage into what services may have been affected.\n- If a container-bound script was attached to the copied object, it will also exist in the user's drive.\n - This object should be removed from all users affected and investigated for a better understanding of the malicious code.\n\n### False positive analysis\n- Communicate with the affected user to identify if these actions were intentional\n- If a container-bound script exists, review code to identify if it is benign or malicious\n\n### Response and remediation\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n - Resetting passwords will revoke OAuth tokens which could have been stolen.\n- Reactivate multi-factor authentication for the user.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security defaults [provided by Google](https://cloud.google.com/security-command-center/docs/how-to-investigate-threats).\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n## Setup\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 3, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Tactic: Initial Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Google Workspace users typically share Drive resources with a shareable link where parameters are edited to indicate when it is viewable or editable by the intended recipient. It is uncommon for a user in an organization to manually copy a Drive object from an external drive to their corporate drive. This may happen where users find a useful spreadsheet in a public drive, for example, and replicate it to their Drive. It is uncommon for the copied object to execute a container-bound script either unless the user was intentionally aware, suggesting the object uses container-bound scripts to accomplish a legitimate task." + ], + "references": [ + "https://www.elastic.co/security-labs/google-workspace-attack-surface-part-one", + "https://developers.google.com/apps-script/guides/bound", + "https://support.google.com/a/users/answer/13004165#share_make_a_copy_links" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + } + ], + "id": "f3909ba7-71f9-4eb6-b505-c067b5850758", + "rule_id": "f33e68a4-bd19-11ed-b02f-f661ea17fbcc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.drive.copy_type", + "type": "unknown", + "ecs": false + }, + { + "name": "google_workspace.drive.file.type", + "type": "unknown", + "ecs": false + }, + { + "name": "google_workspace.drive.owner_is_team_drive", + "type": "unknown", + "ecs": false + }, + { + "name": "google_workspace.token.client.id", + "type": "unknown", + "ecs": false + }, + { + "name": "source.user.email", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "eql", + "query": "sequence by source.user.email with maxspan=3m\n[file where event.dataset == \"google_workspace.drive\" and event.action == \"copy\" and\n\n /* Should only match if the object lives in a Drive that is external to the user's GWS organization */\n google_workspace.drive.owner_is_team_drive == \"false\" and google_workspace.drive.copy_type == \"external\" and\n\n /* Google Script, Forms, Sheets and Document can have container-bound scripts */\n google_workspace.drive.file.type: (\"script\", \"form\", \"spreadsheet\", \"document\")]\n\n[any where event.dataset == \"google_workspace.token\" and event.action == \"authorize\" and\n\n /* Ensures application ID references custom app in Google Workspace and not GCP */\n google_workspace.token.client.id : \"*apps.googleusercontent.com\"]\n", + "language": "eql", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ] + }, + { + "name": "Sudo Heap-Based Buffer Overflow Attempt", + "description": "Identifies the attempted use of a heap-based buffer overflow vulnerability for the Sudo binary in Unix-like systems (CVE-2021-3156). Successful exploitation allows an unprivileged user to escalate to the root user.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "This rule could generate false positives if the process arguments leveraged by the exploit are shared by custom scripts using the Sudo or Sudoedit binaries. Only Sudo versions 1.8.2 through 1.8.31p2 and 1.9.0 through 1.9.5p1 are affected; if those versions are not present on the endpoint, this could be a false positive." + ], + "references": [ + "https://cve.mitre.org/cgi-bin/cvename.cgi?name=2021-3156", + "https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit", + "https://www.bleepingcomputer.com/news/security/latest-macos-big-sur-also-has-sudo-root-privilege-escalation-flaw", + "https://www.sudo.ws/alerts/unescape_overflow.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "bedf595e-f271-49ca-a286-73ab0f7d3ef1", + "rule_id": "f37f3054-d40b-49ac-aa9b-a786c74c58b8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "event.category:process and event.type:start and\n process.name:(sudo or sudoedit) and\n process.args:(*\\\\ and (\"-i\" or \"-s\"))\n", + "threshold": { + "field": [ + "host.hostname" + ], + "value": 100 + }, + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "Threat Intel URL Indicator Match", + "description": "This rule is triggered when a URL indicator from the Threat Intel Filebeat module or integrations has a match against an event that contains URL data, like DNS events, network logs, etc.", + "risk_score": 99, + "severity": "critical", + "timeline_id": "495ad7a7-316e-4544-8a0f-9c098daee76e", + "timeline_title": "Generic Threat Match Timeline", + "license": "Elastic License v2", + "note": "## Triage and Analysis\n\n### Investigating Threat Intel URL Indicator Match\n\nThreat Intel indicator match rules allow matching from a local observation, such as an endpoint event that records a file hash with an entry of a file hash stored within the Threat Intel integrations index. \n\nMatches are based on threat intelligence data that's been ingested during the last 30 days. Some integrations don't place expiration dates on their threat indicators, so we strongly recommend validating ingested threat indicators and reviewing match results. When reviewing match results, check associated activity to determine whether the event requires additional investigation.\n\nThis rule is triggered when a URL indicator from the Threat Intel Filebeat module or a threat intelligence integration matches against an event that contains URL data, like DNS events, network logs, etc.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the URL, which can be found in the `threat.indicator.matched.atomic` field:\n - Identify the type of malicious activity related to the URL (phishing, malware, etc.).\n - Check the reputation of the IP address in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc. \n - Execute a WHOIS lookup to retrieve information about the domain registration and contacts to report abuse.\n - If dealing with a phishing incident:\n - Contact the user to gain more information around the delivery method, information sent, etc.\n - Analyze whether the URL is trying to impersonate a legitimate address. Look for typosquatting, extra or unusual subdomains, or other anomalies that could lure the user.\n - Investigate the phishing page to identify which information may have been sent to the attacker by the user.\n- Identify the process responsible for the connection, and investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Retrieve the involved process executable and examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Using the data collected through the analysis, scope users targeted and other machines infected in the environment.\n\n### False Positive Analysis\n\n- False positives might occur after large and publicly written campaigns if curious employees interact with attacker infrastructure.\n- Some feeds may include internal or known benign addresses by mistake (e.g., 8.8.8.8, google.com, 127.0.0.1, etc.). Make sure you understand how blocking a specific domain or address might impact the organization or normal system functioning.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Consider reporting the address for abuse using the provided contact information.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nThis rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an [Elastic Agent integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#agent-ti-integration), the [Threat Intel module](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#ti-mod-integration), or a [custom integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#custom-ti-integration).\n\nMore information can be found [here](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html).", + "version": 3, + "tags": [ + "OS: Windows", + "Data Source: Elastic Endgame", + "Rule Type: Indicator Match" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "1h", + "from": "now-65m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-threatintel.html", + "https://www.elastic.co/guide/en/security/master/es-threat-intel-integrations.html", + "https://www.elastic.co/security/tip" + ], + "max_signals": 100, + "threat": [], + "id": "cf3244fb-36a4-4644-8827-4b9b1af89f4e", + "rule_id": "f3e22c8b-ea47-45d1-b502-b57b6de950b3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "url.full", + "type": "wildcard", + "ecs": true + } + ], + "setup": "This rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an Elastic Agent integration, the Threat Intel module, or a custom integration.\n\nMore information can be found here.", + "type": "threat_match", + "query": "url.full:*\n", + "threat_query": "@timestamp >= \"now-30d/d\" and event.module:(threatintel or ti_*) and threat.indicator.url.full:* and not labels.is_ioc_transform_source:\"true\"", + "threat_mapping": [ + { + "entries": [ + { + "field": "url.full", + "type": "mapping", + "value": "threat.indicator.url.full" + } + ] + }, + { + "entries": [ + { + "field": "url.original", + "type": "mapping", + "value": "threat.indicator.url.original" + } + ] + } + ], + "threat_index": [ + "filebeat-*", + "logs-ti_*" + ], + "index": [ + "auditbeat-*", + "endgame-*", + "filebeat-*", + "logs-*", + "packetbeat-*", + "winlogbeat-*" + ], + "threat_filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.category", + "negate": false, + "params": { + "query": "threat" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.category": "threat" + } + } + }, + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.kind", + "negate": false, + "params": { + "query": "enrichment" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.kind": "enrichment" + } + } + }, + { + "$state": { + "store": "appState" + }, + "meta": { + "disabled": false, + "key": "event.type", + "negate": false, + "params": { + "query": "indicator" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "event.type": "indicator" + } + } + } + ], + "threat_indicator_path": "threat.indicator", + "threat_language": "kuery", + "language": "kuery" + }, + { + "name": "Suspicious Data Encryption via OpenSSL Utility", + "description": "Identifies when the openssl command-line utility is used to encrypt multiple files on a host within a short time window. Adversaries may encrypt data on a single or multiple systems in order to disrupt the availability of their target's data and may attempt to hold the organization's data to ransom for the purposes of extortion.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Impact", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.welivesecurity.com/2017/06/30/telebots-back-supply-chain-attacks-against-ukraine/", + "https://www.trendmicro.com/en_us/research/21/f/bash-ransomware-darkradiation-targets-red-hat--and-debian-based-linux-distributions.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1486", + "name": "Data Encrypted for Impact", + "reference": "https://attack.mitre.org/techniques/T1486/" + } + ] + } + ], + "id": "a6192027-bf10-4657-8c06-3007a7257a61", + "rule_id": "f530ca17-153b-4a7a-8cd3-98dd4b4ddf73", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, user.name, process.parent.entity_id with maxspan=5s\n [ process where host.os.type == \"linux\" and event.action == \"exec\" and \n process.name == \"openssl\" and process.parent.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"perl*\", \"php*\", \"python*\", \"xargs\") and\n process.args == \"-in\" and process.args == \"-out\" and\n process.args in (\"-k\", \"-K\", \"-kfile\", \"-pass\", \"-iv\", \"-md\") and\n /* excluding base64 encoding options and including encryption password or key params */\n not process.args in (\"-d\", \"-a\", \"-A\", \"-base64\", \"-none\", \"-nosalt\") ] with runs=10\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Masquerading Space After Filename", + "description": "This rules identifies a process created from an executable with a space appended to the end of the filename. This may indicate an attempt to masquerade a malicious file as benign to gain user execution. When a space is added to the end of certain files, the OS will execute the file according to it's true filetype instead of it's extension. Adversaries can hide a program's true filetype by changing the extension of the file. They can then add a space to the end of the name so that the OS automatically executes the file when it's double-clicked.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.picussecurity.com/resource/blog/picus-10-critical-mitre-attck-techniques-t1036-masquerading" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.006", + "name": "Space after Filename", + "reference": "https://attack.mitre.org/techniques/T1036/006/" + } + ] + } + ] + } + ], + "id": "2a02c12b-b641-4f14-a388-8acc1434f9d0", + "rule_id": "f5fb4598-4f10-11ed-bdc3-0242ac120002", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type:(\"linux\",\"macos\") and\n event.type == \"start\" and\n (process.executable regex~ \"\"\"/[a-z0-9\\s_\\-\\\\./]+\\s\"\"\") and not\n process.name in (\"ls\", \"find\", \"grep\", \"xkbcomp\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "SoftwareUpdate Preferences Modification", + "description": "Identifies changes to the SoftwareUpdate preferences using the built-in defaults command. Adversaries may abuse this in an attempt to disable security updates.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Authorized SoftwareUpdate Settings Changes" + ], + "references": [ + "https://blog.checkpoint.com/2017/07/13/osxdok-refuses-go-away-money/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "b4ce13b4-8552-42e2-9282-d2e987667068", + "rule_id": "f683dcdf-a018-4801-b066-193d4ae6c8e5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:defaults and\n process.args:(write and \"-bool\" and (com.apple.SoftwareUpdate or /Library/Preferences/com.apple.SoftwareUpdate.plist) and not (TRUE or true))\n", + "language": "kuery" + }, + { + "name": "Suspicious Child Process of Adobe Acrobat Reader Update Service", + "description": "Detects attempts to exploit privilege escalation vulnerabilities related to the Adobe Acrobat Reader PrivilegedHelperTool responsible for installing updates. For more information, refer to CVE-2020-9615, CVE-2020-9614 and CVE-2020-9613 and verify that the impacted system is patched.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Trusted system or Adobe Acrobat Related processes." + ], + "references": [ + "https://rekken.github.io/2020/05/14/Security-Flaws-in-Adobe-Acrobat-Reader-Allow-Malicious-Program-to-Gain-Root-on-macOS-Silently/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "79d85a4f-bfdf-40e7-b70f-c2d3abe49e52", + "rule_id": "f85ce03f-d8a8-4c83-acdc-5c8cd0592be7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ], + "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.parent.name:com.adobe.ARMDC.SMJobBlessHelper and\n user.name:root and\n not process.executable: (/Library/PrivilegedHelperTools/com.adobe.ARMDC.SMJobBlessHelper or\n /usr/bin/codesign or\n /private/var/folders/zz/*/T/download/ARMDCHammer or\n /usr/sbin/pkgutil or\n /usr/bin/shasum or\n /usr/bin/perl* or\n /usr/sbin/spctl or\n /usr/sbin/installer or\n /usr/bin/csrutil)\n", + "language": "kuery" + }, + { + "name": "Ingress Transfer via Windows BITS", + "description": "Identifies downloads of executable and archive files via the Windows Background Intelligent Transfer Service (BITS). Adversaries could leverage Windows BITS transfer jobs to download remote payloads.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Command and Control", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://attack.mitre.org/techniques/T1197/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1197", + "name": "BITS Jobs", + "reference": "https://attack.mitre.org/techniques/T1197/" + } + ] + } + ], + "id": "662e4623-5e3a-48c1-8dcc-702d10f59083", + "rule_id": "f95972d3-c23b-463b-89a8-796b3f369b49", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.header_bytes", + "type": "unknown", + "ecs": false + }, + { + "name": "file.Ext.original.name", + "type": "unknown", + "ecs": false + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.action == \"rename\" and\n\nprocess.name : \"svchost.exe\" and file.Ext.original.name : \"BIT*.tmp\" and \n (file.extension :(\"exe\", \"zip\", \"rar\", \"bat\", \"dll\", \"ps1\", \"vbs\", \"wsh\", \"js\", \"vbe\", \"pif\", \"scr\", \"cmd\", \"cpl\") or file.Ext.header_bytes : \"4d5a*\") and \n \n /* noisy paths, for hunting purposes you can use the same query without the following exclusions */\n not file.path : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\", \"?:\\\\Windows\\\\*\", \"?:\\\\ProgramData\\\\*\\\\*\") and \n \n /* lot of third party SW use BITS to download executables with a long file name */\n not length(file.name) > 30\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Remote File Copy to a Hidden Share", + "description": "Identifies a remote file copy attempt to a hidden network share. This may indicate lateral movement or data staging activity.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.002", + "name": "SMB/Windows Admin Shares", + "reference": "https://attack.mitre.org/techniques/T1021/002/" + } + ] + } + ] + } + ], + "id": "15dab0f1-055d-4a1b-8c0b-434375d5c251", + "rule_id": "fa01341d-6662-426b-9d0c-6d81e33c8a9d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"cmd.exe\", \"powershell.exe\", \"robocopy.exe\", \"xcopy.exe\") and\n process.args : (\"copy*\", \"move*\", \"cp\", \"mv\") and process.args : \"*$*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Potential Application Shimming via Sdbinst", + "description": "The Application Shim was created to allow for backward compatibility of software as the operating system codebase changes over time. This Windows functionality has been abused by attackers to stealthily gain persistence and arbitrary code execution in legitimate Windows processes.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.011", + "name": "Application Shimming", + "reference": "https://attack.mitre.org/techniques/T1546/011/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.011", + "name": "Application Shimming", + "reference": "https://attack.mitre.org/techniques/T1546/011/" + } + ] + } + ] + } + ], + "id": "ef50349c-7dcb-46c9-a6c1-1fce954ea8a7", + "rule_id": "fd4a992d-6130-4802-9ff8-829b89ae801f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"sdbinst.exe\" and\n not (process.args : \"-m\" and process.args : \"-bg\") and\n not process.args : \"-mm\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-endpoint.events.*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Roshal Archive (RAR) or PowerShell File Downloaded from the Internet", + "description": "Detects a Roshal Archive (RAR) file or PowerShell script downloaded from the internet by an internal host. Gaining initial access to a system and then downloading encoded or encrypted tools to move laterally is a common practice for adversaries as a way to protect their more valuable tools and tactics, techniques, and procedures (TTPs). This may be atypical behavior for a managed network and can be indicative of malware, exfiltration, or command and control.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Threat intel\n\nThis activity has been observed in FIN7 campaigns.", + "version": 103, + "tags": [ + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Domain: Endpoint" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Downloading RAR or PowerShell files from the Internet may be expected for certain systems. This rule should be tailored to either exclude systems as sources or destinations in which this behavior is expected." + ], + "references": [ + "https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html", + "https://www.justice.gov/opa/press-release/file/1084361/download", + "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + } + ], + "id": "289c52ce-f68b-4085-9e13-3281e508b76c", + "rule_id": "ff013cb4-274d-434a-96bb-fe15ddd3ae92", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "network.protocol", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "url.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "url.path", + "type": "wildcard", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "packetbeat-*", + "auditbeat-*", + "filebeat-*", + "logs-network_traffic.*" + ], + "query": "(event.dataset: (network_traffic.http or network_traffic.tls) or\n (event.category: (network or network_traffic) and network.protocol: http)) and\n (url.extension:(ps1 or rar) or url.path:(*.ps1 or *.rar)) and\n not destination.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n ) and\n source.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n )\n", + "language": "kuery" + }, + { + "name": "Potential Sudo Token Manipulation via Process Injection", + "description": "This rule detects potential sudo token manipulation attacks through process injection by monitoring the use of a debugger (gdb) process followed by a successful uid change event during the execution of the sudo process. A sudo token manipulation attack is performed by injecting into a process that has a valid sudo token, which can then be used by attackers to activate their own sudo token. This attack requires ptrace to be enabled in conjunction with the existence of a living process that has a valid sudo token with the same uid as the current user.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/nongiach/sudo_inject" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/", + "subtechnique": [ + { + "id": "T1055.008", + "name": "Ptrace System Calls", + "reference": "https://attack.mitre.org/techniques/T1055/008/" + } + ] + }, + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.003", + "name": "Sudo and Sudo Caching", + "reference": "https://attack.mitre.org/techniques/T1548/003/" + } + ] + } + ] + } + ], + "id": "87849c02-a392-4bed-b7da-70db7969ac01", + "rule_id": "ff9bc8b9-f03b-4283-be58-ee0a16f5a11b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.group.id", + "type": "unknown", + "ecs": false + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.session_leader.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, process.session_leader.entity_id with maxspan=15s\n[ process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name == \"gdb\" and process.user.id != \"0\" and process.group.id != \"0\" ]\n[ process where host.os.type == \"linux\" and event.action == \"uid_change\" and event.type == \"change\" and \n process.name == \"sudo\" and process.user.id == \"0\" and process.group.id == \"0\" ]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Google Workspace Suspended User Account Renewed", + "description": "Detects when a previously suspended user's account is renewed in Google Workspace. An adversary may renew a suspended user account to maintain access to the Google Workspace organization with a valid account.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 2, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Identity and Access Audit", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Google Workspace administrators may renew a suspended user account if the user is expected to continue employment at the organization after temporary leave. Suspended user accounts are typically used by administrators to remove access to the user while actions is taken to transfer important documents and roles to other users, prior to deleting the user account and removing the license." + ], + "references": [ + "https://support.google.com/a/answer/1110339" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.004", + "name": "Cloud Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/004/" + } + ] + } + ] + } + ], + "id": "4f504431-513e-4035-9f32-8252f1351250", + "rule_id": "00678712-b2df-11ed-afe9-f661ea17fbcc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:google_workspace.admin and event.category:iam and event.action:UNSUSPEND_USER\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 User Restricted from Sending Email", + "description": "Identifies when a user has been restricted from sending email due to exceeding sending limits of the service policies per the Security Compliance Center.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "A user sending emails using personal distribution folders may trigger the event." + ], + "references": [ + "https://docs.microsoft.com/en-us/cloud-app-security/anomaly-detection-policy", + "https://docs.microsoft.com/en-us/cloud-app-security/policy-template-reference" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "3e044576-efd1-4410-a782-eb81cedc846d", + "rule_id": "0136b315-b566-482f-866c-1d8e2477ba16", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.category:web and event.action:\"User restricted from sending email\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 Exchange Safe Attachment Rule Disabled", + "description": "Identifies when a safe attachment rule is disabled in Microsoft 365. Safe attachment rules can extend malware protections to include routing all messages and attachments without a known malware signature to a special hypervisor environment. An adversary or insider threat may disable a safe attachment rule to exfiltrate data or evade defenses.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A safe attachment rule may be disabled by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-safeattachmentrule?view=exchange-ps" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "1050a19a-a52d-40a4-a2ca-e02f210800d9", + "rule_id": "03024bd9-d23f-4ec1-8674-3cf1a21e130b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Disable-SafeAttachmentRule\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "SSH Process Launched From Inside A Container", + "description": "This rule detects an SSH or SSHD process executed from inside a container. This includes both the client ssh binary and server ssh daemon process. SSH usage inside a container should be avoided and monitored closely when necessary. With valid credentials an attacker may move laterally to other containers or to the underlying host through container breakout. They may also use valid SSH credentials as a persistence mechanism.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "SSH usage may be legitimate depending on the environment. Access patterns and follow-on activity should be analyzed to distinguish between authorized and potentially malicious behavior." + ], + "references": [ + "https://microsoft.github.io/Threat-Matrix-for-Kubernetes/techniques/SSH%20server%20running%20inside%20container/", + "https://www.blackhillsinfosec.com/sshazam-hide-your-c2-inside-of-ssh/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.004", + "name": "SSH", + "reference": "https://attack.mitre.org/techniques/T1021/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1133", + "name": "External Remote Services", + "reference": "https://attack.mitre.org/techniques/T1133/" + } + ] + } + ], + "id": "7cd74986-14e8-4c4f-a989-ef0b72ca2cfe", + "rule_id": "03a514d9-500e-443e-b6a9-72718c548f6c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where container.id: \"*\" and event.type== \"start\" and\nevent.action in (\"fork\", \"exec\") and event.action != \"end\" and \nprocess.name: (\"sshd\", \"ssh\", \"autossh\")\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "Azure AD Global Administrator Role Assigned", + "description": "In Azure Active Directory (Azure AD), permissions to manage resources are assigned using roles. The Global Administrator is a role that enables users to have access to all administrative features in Azure AD and services that use Azure AD identities like the Microsoft 365 Defender portal, the Microsoft 365 compliance center, Exchange, SharePoint Online, and Skype for Business Online. Attackers can add users as Global Administrators to maintain access and manage all subscriptions and their settings and resources.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/azure/active-directory/roles/permissions-reference#global-administrator" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.003", + "name": "Additional Cloud Roles", + "reference": "https://attack.mitre.org/techniques/T1098/003/" + } + ] + } + ] + } + ], + "id": "34770c87-9612-4104-bdc5-c0960ba4f46f", + "rule_id": "04c5a96f-19c5-44fd-9571-a0b033f9086f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "azure.auditlogs.properties.category", + "type": "keyword", + "ecs": false + }, + { + "name": "azure.auditlogs.properties.target_resources.0.modified_properties.1.new_value", + "type": "unknown", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.auditlogs and azure.auditlogs.properties.category:RoleManagement and\nazure.auditlogs.operation_name:\"Add member to role\" and\nazure.auditlogs.properties.target_resources.0.modified_properties.1.new_value:\"\\\"Global Administrator\\\"\"\n", + "language": "kuery" + }, + { + "name": "First Time Seen Removable Device", + "description": "Identifies newly seen removable devices by device friendly name using registry modification events. While this activity is not inherently malicious, analysts can use those events to aid monitoring for data exfiltration over those devices.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Exfiltration", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://winreg-kb.readthedocs.io/en/latest/sources/system-keys/USB-storage.html", + "https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-device-specific-registry-settings" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1091", + "name": "Replication Through Removable Media", + "reference": "https://attack.mitre.org/techniques/T1091/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1052", + "name": "Exfiltration Over Physical Medium", + "reference": "https://attack.mitre.org/techniques/T1052/", + "subtechnique": [ + { + "id": "T1052.001", + "name": "Exfiltration over USB", + "reference": "https://attack.mitre.org/techniques/T1052/001/" + } + ] + } + ] + } + ], + "id": "7053ccb9-13ff-4e37-84d7-abc0cbf6d357", + "rule_id": "0859355c-0f08-4b43-8ff5-7d2a4789fc08", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.value", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "new_terms", + "query": "event.category:\"registry\" and host.os.type:\"windows\" and registry.value:\"FriendlyName\" and registry.path:*USBSTOR*\n", + "new_terms_fields": [ + "registry.path" + ], + "history_window_start": "now-7d", + "index": [ + "logs-endpoint.events.*", + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ], + "language": "kuery" + }, + { + "name": "File Creation, Execution and Self-Deletion in Suspicious Directory", + "description": "This rule monitors for the creation of a file, followed by its execution and self-deletion in a short timespan within a directory often used for malicious purposes by threat actors. This behavior is often used by malware to execute malicious code and delete itself to hide its tracks.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "78b37780-abf6-4975-8d6b-4198136931be", + "rule_id": "09bc6c90-7501-494d-b015-5d988dc3f233", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, user.id with maxspan=1m\n [file where host.os.type == \"linux\" and event.action == \"creation\" and \n process.name in (\"curl\", \"wget\", \"fetch\", \"ftp\", \"sftp\", \"scp\", \"rsync\", \"ld\") and \n file.path : (\"/dev/shm/*\", \"/run/shm/*\", \"/tmp/*\", \"/var/tmp/*\",\n \"/run/*\", \"/var/run/*\", \"/var/www/*\", \"/proc/*/fd/*\")] by file.name\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")] by process.name\n [file where host.os.type == \"linux\" and event.action == \"deletion\" and not process.name in (\"rm\", \"ld\") and \n file.path : (\"/dev/shm/*\", \"/run/shm/*\", \"/tmp/*\", \"/var/tmp/*\",\n \"/run/*\", \"/var/run/*\", \"/var/www/*\", \"/proc/*/fd/*\")] by file.name\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Azure Frontdoor Web Application Firewall (WAF) Policy Deleted", + "description": "Identifies the deletion of a Frontdoor Web Application Firewall (WAF) Policy in Azure. An adversary may delete a Frontdoor Web Application Firewall (WAF) Policy in an attempt to evade defenses and/or to eliminate barriers to their objective.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Network Security Monitoring", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Azure Front Web Application Firewall (WAF) Policy deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Azure Front Web Application Firewall (WAF) Policy deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#networking" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "74cb8cc1-fd38-494e-9ce6-0104dd64bfa5", + "rule_id": "09d028a5-dcde-409f-8ae0-557cef1b7082", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.NETWORK/FRONTDOORWEBAPPLICATIONFIREWALLPOLICIES/DELETE\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Malware - Detected - Elastic Endgame", + "description": "Elastic Endgame detected Malware. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 99, + "severity": "critical", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [], + "id": "55fa9751-7d04-4a40-a308-06c46b46a2aa", + "rule_id": "0a97b20f-4144-49ea-be32-b540ecc445de", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:file_classification_event or endgame.event_subtype_full:file_classification_event)\n", + "language": "kuery" + }, + { + "name": "O365 Exchange Suspicious Mailbox Right Delegation", + "description": "Identifies the assignment of rights to access content from another mailbox. An adversary may use the compromised account to send messages to other accounts in the network of the target organization while creating inbox rules, so messages can evade spam/phishing detection mechanisms.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Assignment of rights to a service account." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.002", + "name": "Additional Email Delegate Permissions", + "reference": "https://attack.mitre.org/techniques/T1098/002/" + } + ] + } + ] + } + ], + "id": "fd84c97c-fbc5-4100-be15-ca18ea16aa47", + "rule_id": "0ce6487d-8069-4888-9ddd-61b52490cebc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "o365.audit.Parameters.AccessRights", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.action:Add-MailboxPermission and\no365.audit.Parameters.AccessRights:(FullAccess or SendAs or SendOnBehalf) and event.outcome:success and\nnot user.id : \"NT AUTHORITY\\SYSTEM (Microsoft.Exchange.Servicehost)\"\n", + "language": "kuery" + }, + { + "name": "Multiple Alerts Involving a User", + "description": "This rule uses alert data to determine when multiple different alerts involving the same user are triggered. Analysts can use this to prioritize triage and response, as these users are more likely to be compromised.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: Higher-Order Rule" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "1h", + "from": "now-24h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "False positives can occur with Generic built-in accounts, such as Administrator, admin, etc. if they are widespread used in your environment. As a best practice, they shouldn't be used in day-to-day tasks, as it prevents the ability to quickly identify and contact the account owner to find out if an alert is a planned activity, regular business activity, or an upcoming incident." + ], + "references": [], + "max_signals": 100, + "threat": [], + "id": "b83c26c4-4f96-4338-9188-1e7ed800a7f9", + "rule_id": "0d160033-fab7-4e72-85a3-3a9d80c8bff7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "signal.rule.name", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "signal.rule.name:* and user.name:* and not user.id:(\"S-1-5-18\" or \"S-1-5-19\" or \"S-1-5-20\")\n", + "threshold": { + "field": [ + "user.name" + ], + "value": 1, + "cardinality": [ + { + "field": "signal.rule.rule_id", + "value": 5 + } + ] + }, + "index": [ + ".alerts-security.*" + ], + "language": "kuery" + }, + { + "name": "SharePoint Malware File Upload", + "description": "Identifies the occurence of files uploaded to SharePoint being detected as Malware by the file scanning engine. Attackers can use File Sharing and Organization Repositories to spread laterally within the company and amplify their access. Users can inadvertently share these files without knowing their maliciousness, giving adversaries opportunities to gain initial access to other endpoints in the environment.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Benign files can trigger signatures in the built-in virus protection" + ], + "references": [ + "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/virus-detection-in-spo?view=o365-worldwide" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1080", + "name": "Taint Shared Content", + "reference": "https://attack.mitre.org/techniques/T1080/" + } + ] + } + ], + "id": "e97aad9e-0445-4b81-ae6f-f766fa37ca8d", + "rule_id": "0e52157a-8e96-4a95-a6e3-5faae5081a74", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:SharePoint and event.code:SharePointFileOperation and event.action:FileMalwareDetected\n", + "language": "kuery" + }, + { + "name": "GCP Service Account Key Creation", + "description": "Identifies when a new key is created for a service account in Google Cloud Platform (GCP). A service account is a special type of account used by an application or a virtual machine (VM) instance, not a person. Applications use service accounts to make authorized API calls, authorized as either the service account itself, or as G Suite or Cloud Identity users through domain-wide delegation. If private keys are not tracked and managed properly, they can present a security risk. An adversary may create a new key for a service account in order to attempt to abuse the permissions assigned to that account and evade detection.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Identity and Access Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Service account keys may be created by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/iam/docs/service-accounts", + "https://cloud.google.com/iam/docs/creating-managing-service-account-keys" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "f05f8f85-7f61-4b05-b656-ad2fcc0b6244", + "rule_id": "0e5acaae-6a64-4bbc-adb8-27649c03f7e1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.CreateServiceAccountKey and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Kubernetes Suspicious Self-Subject Review", + "description": "This rule detects when a service account or node attempts to enumerate their own permissions via the selfsubjectaccessreview or selfsubjectrulesreview APIs. This is highly unusual behavior for non-human identities like service accounts and nodes. An adversary may have gained access to credentials/tokens and this could be an attempt to determine what privileges they have to facilitate further movement or execution within the cluster.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 202, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Discovery" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "An administrator may submit this request as an \"impersonatedUser\" to determine what privileges a particular service account has been granted. However, an adversary may utilize the same technique as a means to determine the privileges of another token other than that of the compromised account." + ], + "references": [ + "https://www.paloaltonetworks.com/apps/pan/public/downloadResource?pagePath=/content/pan/en_US/resources/whitepapers/kubernetes-privilege-escalation-excessive-permissions-in-popular-platforms", + "https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access", + "https://techcommunity.microsoft.com/t5/microsoft-defender-for-cloud/detecting-identity-attacks-in-kubernetes/ba-p/3232340" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1613", + "name": "Container and Resource Discovery", + "reference": "https://attack.mitre.org/techniques/T1613/" + } + ] + } + ], + "id": "736661f2-a4f9-4836-9e3b-1585c2a2a381", + "rule_id": "12a2f15d-597e-4334-88ff-38a02cb1330b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.impersonatedUser.username", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.resource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.user.username", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.verb", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.verb:\"create\"\n and kubernetes.audit.objectRef.resource:(\"selfsubjectaccessreviews\" or \"selfsubjectrulesreviews\")\n and (kubernetes.audit.user.username:(system\\:serviceaccount\\:* or system\\:node\\:*)\n or kubernetes.audit.impersonatedUser.username:(system\\:serviceaccount\\:* or system\\:node\\:*))\n", + "language": "kuery" + }, + { + "name": "Kubernetes Pod Created With HostNetwork", + "description": "This rules detects an attempt to create or modify a pod attached to the host network. HostNetwork allows a pod to use the node network namespace. Doing so gives the pod access to any service running on localhost of the host. An attacker could use this access to snoop on network activity of other pods on the same node or bypass restrictive network policies applied to its given namespace.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 202, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Execution", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "An administrator or developer may want to use a pod that runs as root and shares the hosts IPC, Network, and PID namespaces for debugging purposes. If something is going wrong in the cluster and there is no easy way to SSH onto the host nodes directly, a privileged pod of this nature can be useful for viewing things like iptable rules and network namespaces from the host's perspective. Add exceptions for trusted container images using the query field \"kubernetes.audit.requestObject.spec.container.image\"" + ], + "references": [ + "https://research.nccgroup.com/2021/11/10/detection-engineering-for-kubernetes-clusters/#part3-kubernetes-detections", + "https://kubernetes.io/docs/concepts/security/pod-security-policy/#host-namespaces", + "https://bishopfox.com/blog/kubernetes-pod-privilege-escalation" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1611", + "name": "Escape to Host", + "reference": "https://attack.mitre.org/techniques/T1611/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1610", + "name": "Deploy Container", + "reference": "https://attack.mitre.org/techniques/T1610/" + } + ] + } + ], + "id": "9ecca2f9-99fa-4eae-8b1e-f0aba7016a43", + "rule_id": "12cbf709-69e8-4055-94f9-24314385c27e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.resource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.containers.image", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.hostNetwork", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.verb", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:\"pods\"\n and kubernetes.audit.verb:(\"create\" or \"update\" or \"patch\")\n and kubernetes.audit.requestObject.spec.hostNetwork:true\n and not kubernetes.audit.requestObject.spec.containers.image: (\"docker.elastic.co/beats/elastic-agent:8.4.0\")\n", + "language": "kuery" + }, + { + "name": "Potential Exploitation of an Unquoted Service Path Vulnerability", + "description": "Adversaries may leverage unquoted service path vulnerabilities to escalate privileges. By placing an executable in a higher-level directory within the path of an unquoted service executable, Windows will natively launch this executable from its defined path variable instead of the benign one in a deeper directory, thus leading to code execution.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.009", + "name": "Path Interception by Unquoted Path", + "reference": "https://attack.mitre.org/techniques/T1574/009/" + } + ] + } + ] + } + ], + "id": "e70bbd6f-8f67-469b-8dd7-8d5d4540defb", + "rule_id": "12de29d4-bbb0-4eef-b687-857e8a163870", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and \n (\n process.executable : \"?:\\\\Program.exe\" or \n process.executable regex \"\"\"(C:\\\\Program Files \\(x86\\)\\\\|C:\\\\Program Files\\\\)\\w+.exe\"\"\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Azure External Guest User Invitation", + "description": "Identifies an invitation to an external user in Azure Active Directory (AD). Azure AD is extended to include collaboration, allowing you to invite people from outside your organization to be guest users in your cloud account. Unless there is a business need to provision guest access, it is best practice avoid creating guest users. Guest users could potentially be overlooked indefinitely leading to a potential vulnerability.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Guest user invitations may be sent out by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Guest user invitations from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/governance/policy/samples/cis-azure-1-1-0" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "e0e81a40-3f5b-4e4e-a970-e2314df0fd1f", + "rule_id": "141e9b3a-ff37-4756-989d-05d7cbf35b0e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "azure.auditlogs.properties.target_resources.*.display_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Invite external user\" and azure.auditlogs.properties.target_resources.*.display_name:guest and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Office Test Registry Persistence", + "description": "Identifies the modification of the Microsoft Office \"Office Test\" Registry key, a registry location that can be used to specify a DLL which will be executed every time an MS Office application is started. Attackers can abuse this to gain persistence on a compromised host.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://unit42.paloaltonetworks.com/unit42-technical-walkthrough-office-test-persistence-method-used-in-recent-sofacy-attacks/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1137", + "name": "Office Application Startup", + "reference": "https://attack.mitre.org/techniques/T1137/", + "subtechnique": [ + { + "id": "T1137.002", + "name": "Office Test", + "reference": "https://attack.mitre.org/techniques/T1137/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "d1816172-4ede-4898-bc3e-d04a1a0901b9", + "rule_id": "14dab405-5dd9-450c-8106-72951af2391f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.action != \"deletion\" and\n registry.path : \"*\\\\Software\\\\Microsoft\\\\Office Test\\\\Special\\\\Perf\\\\*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Kubernetes User Exec into Pod", + "description": "This rule detects a user attempt to establish a shell session into a pod using the 'exec' command. Using the 'exec' command in a pod allows a user to establish a temporary shell session and execute any process/commands in the pod. An adversary may call bash to gain a persistent interactive shell which will allow access to any data the pod has permissions to, including secrets.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 202, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "An administrator may need to exec into a pod for a legitimate reason like debugging purposes. Containers built from Linux and Windows OS images, tend to include debugging utilities. In this case, an admin may choose to run commands inside a specific container with kubectl exec ${POD_NAME} -c ${CONTAINER_NAME} -- ${CMD} ${ARG1} ${ARG2} ... ${ARGN}. For example, the following command can be used to look at logs from a running Cassandra pod: kubectl exec cassandra --cat /var/log/cassandra/system.log . Additionally, the -i and -t arguments might be used to run a shell connected to the terminal: kubectl exec -i -t cassandra -- sh" + ], + "references": [ + "https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/", + "https://kubernetes.io/docs/tasks/debug/debug-application/get-shell-running-container/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1609", + "name": "Container Administration Command", + "reference": "https://attack.mitre.org/techniques/T1609/" + } + ] + } + ], + "id": "e10bcf59-7ce3-452b-aa7b-71e6fb25002f", + "rule_id": "14de811c-d60f-11ec-9fd7-f661ea17fbce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.resource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.subresource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.verb", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.verb:\"create\"\n and kubernetes.audit.objectRef.resource:\"pods\"\n and kubernetes.audit.objectRef.subresource:\"exec\"\n", + "language": "kuery" + }, + { + "name": "Azure Automation Runbook Created or Modified", + "description": "Identifies when an Azure Automation runbook is created or modified. An adversary may create or modify an Azure Automation runbook to execute malicious code and maintain persistence in their target's environment.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Configuration Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://powerzure.readthedocs.io/en/latest/Functions/operational.html#create-backdoor", + "https://github.com/hausec/PowerZure", + "https://posts.specterops.io/attacking-azure-azure-ad-and-introducing-powerzure-ca70b330511a", + "https://azure.microsoft.com/en-in/blog/azure-automation-runbook-management/" + ], + "max_signals": 100, + "threat": [], + "id": "b5224846-701d-4ea9-b8f8-d1424e42ef02", + "rule_id": "16280f1e-57e6-4242-aa21-bb4d16f13b2f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and\n azure.activitylogs.operation_name:\n (\n \"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/RUNBOOKS/DRAFT/WRITE\" or\n \"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/RUNBOOKS/WRITE\" or\n \"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/RUNBOOKS/PUBLISH/ACTION\"\n ) and\n event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "File Creation Time Changed", + "description": "Identifies modification of a file creation time. Adversaries may modify file time attributes to blend malicious content with existing files. Timestomping is a technique that modifies the timestamps of a file often to mimic files that are in trusted directories.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 3, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.006", + "name": "Timestomp", + "reference": "https://attack.mitre.org/techniques/T1070/006/" + } + ] + } + ] + } + ], + "id": "945cde3c-4281-41df-964c-2fb113e7811b", + "rule_id": "166727ab-6768-4e26-b80c-948b228ffc06", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.code : \"2\" and\n\n /* Requires Sysmon EventID 2 - File creation time change */\n event.action : \"File creation time changed*\" and \n \n not process.executable : \n (\"?:\\\\Program Files\\\\*\", \n \"?:\\\\Program Files (x86)\\\\*\", \n \"?:\\\\Windows\\\\system32\\\\msiexec.exe\", \n \"?:\\\\Windows\\\\syswow64\\\\msiexec.exe\", \n \"?:\\\\Windows\\\\system32\\\\svchost.exe\", \n \"?:\\\\WINDOWS\\\\system32\\\\backgroundTaskHost.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\", \n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\slack\\\\app-*\\\\slack.exe\", \n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\GitHubDesktop\\\\app-*\\\\GitHubDesktop.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\Teams\\\\current\\\\Teams.exe\", \n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\OneDrive.exe\") and \n not file.extension : (\"tmp\", \"~tmp\", \"xml\") and not user.name : (\"SYSTEM\", \"Local Service\", \"Network Service\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "GCP Logging Sink Modification", + "description": "Identifies a modification to a Logging sink in Google Cloud Platform (GCP). Logging compares the log entry to the sinks in that resource. Each sink whose filter matches the log entry writes a copy of the log entry to the sink's export destination. An adversary may update a Logging sink to exfiltrate logs to a different export destination.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Log Auditing", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Logging sink modifications may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Sink modifications from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/logging/docs/export#how_sinks_work" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1537", + "name": "Transfer Data to Cloud Account", + "reference": "https://attack.mitre.org/techniques/T1537/" + } + ] + } + ], + "id": "414fae17-3280-482d-9027-4f698263a177", + "rule_id": "184dfe52-2999-42d9-b9d1-d1ca54495a61", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.logging.v*.ConfigServiceV*.UpdateSink and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential Privilege Escalation via Recently Compiled Executable", + "description": "This rule monitors a sequence involving a program compilation event followed by its execution and a subsequent alteration of UID permissions to root privileges. This behavior can potentially indicate the execution of a kernel or software privilege escalation exploit.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "18ee7625-d428-4ce9-91db-5db8d54cc567", + "rule_id": "193549e8-bb9e-466a-a7f9-7e783f5cb5a6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id with maxspan=1m\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name in (\"gcc\", \"g++\", \"cc\") and user.id != \"0\"] by process.args\n [file where host.os.type == \"linux\" and event.action == \"creation\" and event.type == \"creation\" and \n process.name == \"ld\" and user.id != \"0\"] by file.name\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n user.id != \"0\"] by process.name\n [process where host.os.type == \"linux\" and event.action in (\"uid_change\", \"guid_change\") and event.type == \"change\" and \n user.id == \"0\"] by process.name\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Network Tool Launched Inside A Container", + "description": "This rule detects commonly abused network utilities running inside a container. Network utilities like nc, nmap, dig, tcpdump, ngrep, telnet, mitmproxy, zmap can be used for malicious purposes such as network reconnaissance, monitoring, or exploitation, and should be monitored closely within a container.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Tactic: Command and Control", + "Tactic: Reconnaissance" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "There is a potential for false positives if the container is used for legitimate tasks that require the use of network utilities, such as network troubleshooting, testing or system monitoring. It is important to investigate any alerts generated by this rule to determine if they are indicative of malicious activity or part of legitimate container activity." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1046", + "name": "Network Service Discovery", + "reference": "https://attack.mitre.org/techniques/T1046/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0043", + "name": "Reconnaissance", + "reference": "https://attack.mitre.org/tactics/TA0043/" + }, + "technique": [ + { + "id": "T1595", + "name": "Active Scanning", + "reference": "https://attack.mitre.org/techniques/T1595/" + } + ] + } + ], + "id": "2485be4d-d5de-491b-8ab5-fe255769ce21", + "rule_id": "1a289854-5b78-49fe-9440-8a8096b1ab50", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where container.id: \"*\" and event.type== \"start\" and \n(\n(process.name: (\"nc\", \"ncat\", \"nmap\", \"dig\", \"nslookup\", \"tcpdump\", \"tshark\", \"ngrep\", \"telnet\", \"mitmproxy\", \"socat\", \"zmap\", \"masscan\", \"zgrab\")) or \n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/\n(process.args: (\"nc\", \"ncat\", \"nmap\", \"dig\", \"nslookup\", \"tcpdump\", \"tshark\", \"ngrep\", \"telnet\", \"mitmproxy\", \"socat\", \"zmap\", \"masscan\", \"zgrab\"))\n)\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "Azure Application Credential Modification", + "description": "Identifies when a new credential is added to an application in Azure. An application may use a certificate or secret string to prove its identity when requesting a token. Multiple certificates and secrets can be added for an application and an adversary may abuse this by creating an additional authentication method to evade defenses or persist in an environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Application credential additions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Application credential additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1550", + "name": "Use Alternate Authentication Material", + "reference": "https://attack.mitre.org/techniques/T1550/", + "subtechnique": [ + { + "id": "T1550.001", + "name": "Application Access Token", + "reference": "https://attack.mitre.org/techniques/T1550/001/" + } + ] + } + ] + } + ], + "id": "2c5ba2bd-4f1e-4ee2-a724-aba2c85ed7b5", + "rule_id": "1a36cace-11a7-43a8-9a10-b497c5a02cd3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Update application - Certificates and secrets management\" and event.outcome:(success or Success)\n", + "language": "kuery" + }, + { + "name": "Possible Consent Grant Attack via Azure-Registered Application", + "description": "Detects when a user grants permissions to an Azure-registered application or when an administrator grants tenant-wide permissions to an application. An adversary may create an Azure-registered application that requests access to data such as contact information, email, or documents.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Possible Consent Grant Attack via Azure-Registered Application\n\nIn an illicit consent grant attack, the attacker creates an Azure-registered application that requests access to data such as contact information, email, or documents. The attacker then tricks an end user into granting that application consent to access their data either through a phishing attack, or by injecting illicit code into a trusted website. After the illicit application has been granted consent, it has account-level access to data without the need for an organizational account. Normal remediation steps like resetting passwords for breached accounts or requiring multi-factor authentication (MFA) on accounts are not effective against this type of attack, since these are third-party applications and are external to the organization.\n\nOfficial Microsoft guidance for detecting and remediating this attack can be found [here](https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/detect-and-remediate-illicit-consent-grants).\n\n#### Possible investigation steps\n\n- From the Azure AD portal, Review the application that was granted permissions:\n - Click on the `Review permissions` button on the `Permissions` blade of the application.\n - An app should require only permissions related to the app's purpose. If that's not the case, the app might be risky.\n - Apps that require high privileges or admin consent are more likely to be risky.\n- Investigate the app and the publisher. The following characteristics can indicate suspicious apps:\n - A low number of downloads.\n - Low rating or score or bad comments.\n - Apps with a suspicious publisher or website.\n - Apps whose last update is not recent. This might indicate an app that is no longer supported.\n- Export and examine the [Oauth app auditing](https://docs.microsoft.com/en-us/defender-cloud-apps/manage-app-permissions#oauth-app-auditing) to identify users affected.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Malicious applications abuse the same workflow used by legitimate apps. Thus, analysts must review each app consent to ensure that only desired apps are granted access.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Disable the malicious application to stop user access and the application access to your data.\n- Revoke the application Oauth consent grant. The `Remove-AzureADOAuth2PermissionGrant` cmdlet can be used to complete this task.\n- Remove the service principal application role assignment. The `Remove-AzureADServiceAppRoleAssignment` cmdlet can be used to complete this task.\n- Revoke the refresh token for all users assigned to the application. Azure provides a [playbook](https://github.com/Azure/Azure-Sentinel/tree/master/Playbooks/Revoke-AADSignInSessions) for this task.\n- [Report](https://docs.microsoft.com/en-us/defender-cloud-apps/manage-app-permissions#send-feedback) the application as malicious to Microsoft.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Investigate the potential for data compromise from the user's email and file sharing services. Activate your Data Loss incident response playbook.\n- Disable the permission for a user to set consent permission on their behalf.\n - Enable the [Admin consent request](https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/configure-admin-consent-workflow) feature.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Data Source: Microsoft 365", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/detect-and-remediate-illicit-consent-grants?view=o365-worldwide", + "https://www.cloud-architekt.net/detection-and-mitigation-consent-grant-attacks-azuread/", + "https://docs.microsoft.com/en-us/defender-cloud-apps/investigate-risky-oauth#how-to-detect-risky-oauth-apps" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1528", + "name": "Steal Application Access Token", + "reference": "https://attack.mitre.org/techniques/T1528/" + } + ] + } + ], + "id": "befcd507-503d-4d3c-99a0-e20d5f370f21", + "rule_id": "1c6a8c7a-5cb6-4a82-ba27-d5a5b8a40a38", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + }, + { + "package": "azure", + "version": "^1.0.0" + }, + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "o365.audit.Operation", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*", + "logs-o365*" + ], + "query": "event.dataset:(azure.activitylogs or azure.auditlogs or o365.audit) and\n (\n azure.activitylogs.operation_name:\"Consent to application\" or\n azure.auditlogs.operation_name:\"Consent to application\" or\n o365.audit.Operation:\"Consent to application.\"\n ) and\n event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Azure Kubernetes Rolebindings Created", + "description": "Identifies the creation of role binding or cluster role bindings. You can assign these roles to Kubernetes subjects (users, groups, or service accounts) with role bindings and cluster role bindings. An adversary who has permissions to create bindings and cluster-bindings in the cluster can create a binding to the cluster-admin ClusterRole or to other high privileges roles.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-20m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftkubernetes", + "https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [] + } + ], + "id": "114f5122-5f01-4d51-94b4-d7f1c81b955e", + "rule_id": "1c966416-60c1-436b-bfd0-e002fddbfd89", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\n\t(\"MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/ROLEBINDINGS/WRITE\" or\n\t \"MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/CLUSTERROLEBINDINGS/WRITE\") and\nevent.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Azure Storage Account Key Regenerated", + "description": "Identifies a rotation to storage account access keys in Azure. Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. Adversaries may regenerate a key as a means of acquiring credentials to access systems and resources.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "It's recommended that you rotate your access keys periodically to help keep your storage account secure. Normal key rotation can be exempted from the rule. An abnormal time frame and/or a key rotation from unfamiliar users, hosts, or locations should be investigated." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1528", + "name": "Steal Application Access Token", + "reference": "https://attack.mitre.org/techniques/T1528/" + } + ] + } + ], + "id": "f5602777-acf3-48be-b394-2548f8722c22", + "rule_id": "1e0b832e-957e-43ae-b319-db82d228c908", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.STORAGE/STORAGEACCOUNTS/REGENERATEKEY/ACTION\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Exploit - Detected - Elastic Endgame", + "description": "Elastic Endgame detected an Exploit. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "6c4c9c5c-56b5-4a79-bd00-68cc644e0e88", + "rule_id": "2003cdc8-8d83-4aa5-b132-1f9a8eb48514", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:exploit_event or endgame.event_subtype_full:exploit_event)\n", + "language": "kuery" + }, + { + "name": "First Time Seen Google Workspace OAuth Login from Third-Party Application", + "description": "Detects the first time a third-party application logs in and authenticated with OAuth. OAuth is used to grant permissions to specific resources and services in Google Workspace. Compromised credentials or service accounts could allow an adversary to authenticate to Google Workspace as a valid user and inherit their privileges.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Setup\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 2, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Tactic: Defense Evasion", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Developers may leverage third-party applications for legitimate purposes in Google Workspace such as for administrative tasks." + ], + "references": [ + "https://www.elastic.co/security-labs/google-workspace-attack-surface-part-one", + "https://developers.google.com/apps-script/guides/bound", + "https://developers.google.com/identity/protocols/oauth2" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1550", + "name": "Use Alternate Authentication Material", + "reference": "https://attack.mitre.org/techniques/T1550/", + "subtechnique": [ + { + "id": "T1550.001", + "name": "Application Access Token", + "reference": "https://attack.mitre.org/techniques/T1550/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.004", + "name": "Cloud Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/004/" + } + ] + } + ] + } + ], + "id": "3e31de2b-3449-4ff7-9ecc-ce0d18a237e4", + "rule_id": "21bafdf0-cf17-11ed-bd57-f661ea17fbcc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.token.client.id", + "type": "unknown", + "ecs": false + }, + { + "name": "google_workspace.token.scope.data.scope_name", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "new_terms", + "query": "event.dataset: \"google_workspace.token\" and event.action: \"authorize\" and\ngoogle_workspace.token.scope.data.scope_name: *Login and google_workspace.token.client.id: *apps.googleusercontent.com\n", + "new_terms_fields": [ + "google_workspace.token.client.id" + ], + "history_window_start": "now-15d", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "language": "kuery" + }, + { + "name": "GCP Storage Bucket Permissions Modification", + "description": "Identifies when the Identity and Access Management (IAM) permissions are modified for a Google Cloud Platform (GCP) storage bucket. An adversary may modify the permissions on a storage bucket to weaken their target's security controls or an administrator may inadvertently modify the permissions, which could lead to data exposure or loss.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Identity and Access Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Storage bucket permissions may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/storage/docs/access-control/iam-permissions" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1222", + "name": "File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/" + } + ] + } + ], + "id": "07e4a58e-7c38-4bc2-b2c0-86804c2e241a", + "rule_id": "2326d1b2-9acf-4dee-bd21-867ea7378b4d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:\"storage.setIamPermissions\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential Reverse Shell via Background Process", + "description": "Monitors for the execution of background processes with process arguments capable of opening a socket in the /dev/tcp channel. This may indicate the creation of a backdoor reverse connection, and should be investigated further.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + } + ], + "id": "08e24a1c-2783-4190-bf5a-817a96f4ff37", + "rule_id": "259be2d8-3b1a-4c2c-a0eb-0c8e77f35e39", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name in (\"setsid\", \"nohup\") and process.args : \"*/dev/tcp/*0>&1*\" and \nprocess.parent.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Azure Blob Container Access Level Modification", + "description": "Identifies changes to container access levels in Azure. Anonymous public read access to containers and blobs in Azure is a way to share data broadly, but can present a security risk if access to sensitive data is not managed judiciously.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Asset Visibility", + "Tactic: Discovery" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Access level modifications may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Access level modifications from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-prevent" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1526", + "name": "Cloud Service Discovery", + "reference": "https://attack.mitre.org/techniques/T1526/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + } + ], + "id": "26827afb-7330-47c6-afef-d6c3af65723c", + "rule_id": "2636aa6c-88b5-4337-9c31-8d0192a8ef45", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.STORAGE/STORAGEACCOUNTS/BLOBSERVICES/CONTAINERS/WRITE\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Azure Active Directory High Risk User Sign-in Heuristic", + "description": "Identifies high risk Azure Active Directory (AD) sign-ins by leveraging Microsoft Identity Protection machine learning and heuristics.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Azure Active Directory High Risk User Sign-in Heuristic\n\nMicrosoft Identity Protection is an Azure AD security tool that detects various types of identity risks and attacks.\n\nThis rule identifies events produced by the Microsoft Identity Protection with a risk state equal to `confirmedCompromised` or `atRisk`.\n\n#### Possible investigation steps\n\n- Identify the Risk Detection that triggered the event. A list with descriptions can be found [here](https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/concept-identity-protection-risks#risk-types-and-detection).\n- Identify the user account involved and validate whether the suspicious activity is normal for that user.\n - Consider the source IP address and geolocation for the involved user account. Do they look normal?\n - Consider the device used to sign in. Is it registered and compliant?\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\nIf this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and device conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 105, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-azure-monitor-sign-ins-log-schema", + "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/overview-identity-protection", + "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk", + "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk#investigation-framework" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "85250707-2efd-4f55-9298-39e0637b6b4e", + "rule_id": "26edba02-6979-4bce-920a-70b080a7be81", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.signinlogs.properties.risk_state", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.signinlogs and\n azure.signinlogs.properties.risk_state:(\"confirmedCompromised\" or \"atRisk\") and event.outcome:(success or Success)\n", + "language": "kuery" + }, + { + "name": "Attempts to Brute Force a Microsoft 365 User Account", + "description": "Identifies attempts to brute force a Microsoft 365 user account. An adversary may attempt a brute force attack to obtain unauthorized access to user accounts.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Identity and Access Audit", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Willem D'Haese", + "Austin Songer" + ], + "false_positives": [ + "Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false positives." + ], + "references": [ + "https://blueteamblog.com/7-ways-to-monitor-your-office-365-logs-using-siem" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "c5af4fc8-6c10-4e0b-8b85-6a92fdf4b68b", + "rule_id": "26f68dba-ce29-497b-8e13-b4fde1db5a2d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "o365.audit.LogonError", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "threshold", + "query": "event.dataset:o365.audit and event.provider:(AzureActiveDirectory or Exchange) and\n event.category:authentication and event.action:(UserLoginFailed or PasswordLogonInitialAuthUsingPassword) and\n not o365.audit.LogonError:(UserAccountNotFound or EntitlementGrantsNotFound or UserStrongAuthEnrollmentRequired or\n UserStrongAuthClientAuthNRequired or InvalidReplyTo)\n", + "threshold": { + "field": [ + "user.id" + ], + "value": 10 + }, + "index": [ + "filebeat-*", + "logs-o365*" + ], + "language": "kuery" + }, + { + "name": "Microsoft 365 Exchange Transport Rule Modification", + "description": "Identifies when a transport rule has been disabled or deleted in Microsoft 365. Mail flow rules (also known as transport rules) are used to identify and take action on messages that flow through your organization. An adversary or insider threat may modify a transport rule to exfiltrate data or evade defenses.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A transport rule may be modified by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-transportrule?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-transportrule?view=exchange-ps", + "https://docs.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1537", + "name": "Transfer Data to Cloud Account", + "reference": "https://attack.mitre.org/techniques/T1537/" + } + ] + } + ], + "id": "3f3e07e0-a982-4083-a5c9-95493e0ef55e", + "rule_id": "272a6484-2663-46db-a532-ef734bf9a796", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:(\"Remove-TransportRule\" or \"Disable-TransportRule\") and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "GCP Firewall Rule Modification", + "description": "Identifies when a firewall rule is modified in Google Cloud Platform (GCP) for Virtual Private Cloud (VPC) or App Engine. These firewall rules can be modified to allow or deny connections to or from virtual machine (VM) instances or specific applications. An adversary may modify an existing firewall rule in order to weaken their target's security controls and allow more permissive ingress or egress traffic flows for their benefit.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Firewall rules may be modified by system administrators. Verify that the firewall configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/vpc/docs/firewalls", + "https://cloud.google.com/appengine/docs/standard/python/understanding-firewalls" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "509e356e-fdb7-490f-8489-256581d6212c", + "rule_id": "2783d84f-5091-4d7d-9319-9fceda8fa71b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:(*.compute.firewalls.patch or google.appengine.*.Firewall.Update*Rule)\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 Teams External Access Enabled", + "description": "Identifies when external access is enabled in Microsoft Teams. External access lets Teams and Skype for Business users communicate with other users that are outside their organization. An adversary may enable external access or add an allowed domain to exfiltrate data or maintain persistence in an environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Teams external access may be enabled by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/microsoftteams/manage-external-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "eda836a2-b803-4c5c-816b-8aa3fa1427db", + "rule_id": "27f7c15a-91f8-4c3d-8b9e-1f99cc030a51", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "o365.audit.Parameters.AllowFederatedUsers", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:(SkypeForBusiness or MicrosoftTeams) and\nevent.category:web and event.action:\"Set-CsTenantFederationConfiguration\" and\no365.audit.Parameters.AllowFederatedUsers:True and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Exploit - Prevented - Elastic Endgame", + "description": "Elastic Endgame prevented an Exploit. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "a7126fad-8e0a-415b-88ea-a831de38555a", + "rule_id": "2863ffeb-bf77-44dd-b7a5-93ef94b72036", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:exploit_event or endgame.event_subtype_full:exploit_event)\n", + "language": "kuery" + }, + { + "name": "Kubernetes Pod created with a Sensitive hostPath Volume", + "description": "This rule detects when a pod is created with a sensitive volume of type hostPath. A hostPath volume type mounts a sensitive file or folder from the node to the container. If the container gets compromised, the attacker can use this mount for gaining access to the node. There are many ways a container with unrestricted access to the host filesystem can escalate privileges, including reading data from other containers, and accessing tokens of more privileged pods.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 202, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Execution", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "An administrator may need to attach a hostPath volume for a legitimate reason. This alert should be investigated for legitimacy by determining if the kuberenetes.audit.requestObject.spec.volumes.hostPath.path triggered is one needed by its target container/pod. For example, when the fleet managed elastic agent is deployed as a daemonset it creates several hostPath volume mounts, some of which are sensitive host directories like /proc, /etc/kubernetes, and /var/log. Add exceptions for trusted container images using the query field \"kubernetes.audit.requestObject.spec.container.image\"" + ], + "references": [ + "https://blog.appsecco.com/kubernetes-namespace-breakout-using-insecure-host-path-volume-part-1-b382f2a6e216", + "https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1611", + "name": "Escape to Host", + "reference": "https://attack.mitre.org/techniques/T1611/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1610", + "name": "Deploy Container", + "reference": "https://attack.mitre.org/techniques/T1610/" + } + ] + } + ], + "id": "5156964c-f7a9-4666-be22-339ed7c27c17", + "rule_id": "2abda169-416b-4bb3-9a6b-f8d239fd78ba", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.resource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.containers.image", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.volumes.hostPath.path", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.verb", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:\"pods\"\n and kubernetes.audit.verb:(\"create\" or \"update\" or \"patch\")\n and kubernetes.audit.requestObject.spec.volumes.hostPath.path:\n (\"/\" or\n \"/proc\" or\n \"/root\" or\n \"/var\" or\n \"/var/run\" or\n \"/var/run/docker.sock\" or\n \"/var/run/crio/crio.sock\" or\n \"/var/run/cri-dockerd.sock\" or\n \"/var/lib/kubelet\" or\n \"/var/lib/kubelet/pki\" or\n \"/var/lib/docker/overlay2\" or\n \"/etc\" or\n \"/etc/kubernetes\" or\n \"/etc/kubernetes/manifests\" or\n \"/etc/kubernetes/pki\" or\n \"/home/admin\")\n and not kubernetes.audit.requestObject.spec.containers.image: (\"docker.elastic.co/beats/elastic-agent:8.4.0\")\n", + "language": "kuery" + }, + { + "name": "O365 Excessive Single Sign-On Logon Errors", + "description": "Identifies accounts with a high number of single sign-on (SSO) logon errors. Excessive logon errors may indicate an attempt to brute force a password or SSO token.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Identity and Access Audit", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-20m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false positives." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "700d843e-8d92-40ce-8ce8-4572275207d6", + "rule_id": "2de10e77-c144-4e69-afb7-344e7127abd0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "o365.audit.LogonError", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "threshold", + "query": "event.dataset:o365.audit and event.provider:AzureActiveDirectory and event.category:authentication and o365.audit.LogonError:\"SsoArtifactInvalidOrExpired\"\n", + "threshold": { + "field": [ + "user.id" + ], + "value": 5 + }, + "index": [ + "filebeat-*", + "logs-o365*" + ], + "language": "kuery" + }, + { + "name": "GCP Firewall Rule Creation", + "description": "Identifies when a firewall rule is created in Google Cloud Platform (GCP) for Virtual Private Cloud (VPC) or App Engine. These firewall rules can be configured to allow or deny connections to or from virtual machine (VM) instances or specific applications. An adversary may create a new firewall rule in order to weaken their target's security controls and allow more permissive ingress or egress traffic flows for their benefit.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Firewall rules may be created by system administrators. Verify that the firewall configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/vpc/docs/firewalls", + "https://cloud.google.com/appengine/docs/standard/python/understanding-firewalls" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "1afb0f10-87b9-43ea-a4bc-9eb12c2650f9", + "rule_id": "30562697-9859-4ae0-a8c5-dab45d664170", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:(*.compute.firewalls.insert or google.appengine.*.Firewall.Create*Rule)\n", + "language": "kuery" + }, + { + "name": "Agent Spoofing - Mismatched Agent ID", + "description": "Detects events that have a mismatch on the expected event agent ID. The status \"agent_id_mismatch\" occurs when the expected agent ID associated with the API key does not match the actual agent ID in an event. This could indicate attempts to spoof events in order to masquerade actual activity to evade detection.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Use Case: Threat Detection", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "This is meant to run only on datasources using Elastic Agent 7.14+ since versions prior to that will be missing the necessary field, resulting in false positives." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + } + ], + "id": "3716ecea-b8fd-4da1-98bc-5212fb591661", + "rule_id": "3115bd2c-0baa-4df0-80ea-45e474b5ef93", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.agent_id_status", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "logs-*", + "metrics-*", + "traces-*" + ], + "query": "event.agent_id_status:agent_id_mismatch\n", + "language": "kuery" + }, + { + "name": "GCP Pub/Sub Topic Deletion", + "description": "Identifies the deletion of a topic in Google Cloud Platform (GCP). In GCP, the publisher-subscriber relationship (Pub/Sub) is an asynchronous messaging service that decouples event-producing and event-processing services. A publisher application creates and sends messages to a topic. Deleting a topic can interrupt message flow in the Pub/Sub pipeline.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Log Auditing", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Topic deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Topic deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/pubsub/docs/overview" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "964e0891-3d5e-4b51-a79d-8e718ebaa9e4", + "rule_id": "3202e172-01b1-4738-a932-d024c514ba72", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.pubsub.v*.Publisher.DeleteTopic and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Azure Network Watcher Deletion", + "description": "Identifies the deletion of a Network Watcher in Azure. Network Watchers are used to monitor, diagnose, view metrics, and enable or disable logs for resources in an Azure virtual network. An adversary may delete a Network Watcher in an attempt to evade defenses.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Network Security Monitoring", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Network Watcher deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Network Watcher deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "1e22450f-5788-4e7c-87ef-2448a8aed032", + "rule_id": "323cb487-279d-4218-bcbd-a568efe930c6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.NETWORK/NETWORKWATCHERS/DELETE\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Azure Active Directory High Risk Sign-in", + "description": "Identifies high risk Azure Active Directory (AD) sign-ins by leveraging Microsoft's Identity Protection machine learning and heuristics. Identity Protection categorizes risk into three tiers: low, medium, and high. While Microsoft does not provide specific details about how risk is calculated, each level brings higher confidence that the user or sign-in is compromised.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Azure Active Directory High Risk Sign-in\n\nMicrosoft Identity Protection is an Azure AD security tool that detects various types of identity risks and attacks.\n\nThis rule identifies events produced by Microsoft Identity Protection with high risk levels or high aggregated risk level.\n\n#### Possible investigation steps\n\n- Identify the Risk Detection that triggered the event. A list with descriptions can be found [here](https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/concept-identity-protection-risks#risk-types-and-detection).\n- Identify the user account involved and validate whether the suspicious activity is normal for that user.\n - Consider the source IP address and geolocation for the involved user account. Do they look normal?\n - Consider the device used to sign in. Is it registered and compliant?\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\nIf this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and device conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 105, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Willem D'Haese" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/howto-conditional-access-policy-risk", + "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/overview-identity-protection", + "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "b850b748-6f91-4127-ab86-5c062f571694", + "rule_id": "37994bca-0611-4500-ab67-5588afe73b77", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.signinlogs.properties.risk_level_aggregated", + "type": "keyword", + "ecs": false + }, + { + "name": "azure.signinlogs.properties.risk_level_during_signin", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\nNote that details for `azure.signinlogs.properties.risk_level_during_signin` and `azure.signinlogs.properties.risk_level_aggregated`\nare only available for Azure AD Premium P2 customers. All other customers will be returned `hidden`.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.signinlogs and\n (azure.signinlogs.properties.risk_level_during_signin:high or azure.signinlogs.properties.risk_level_aggregated:high) and\n event.outcome:(success or Success)\n", + "language": "kuery" + }, + { + "name": "User Added as Owner for Azure Service Principal", + "description": "Identifies when a user is added as an owner for an Azure service principal. The service principal object defines what the application can do in the specific tenant, who can access the application, and what resources the app can access. A service principal object is created when an application is given permission to access resources in a tenant. An adversary may add a user account as an owner for a service principal and use that account in order to define what an application can do in the Azure AD tenant.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Configuration Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "3ce7b766-e857-485a-b649-ee6a810d3b03", + "rule_id": "38e5acdd-5f20-4d99-8fe4-f0a1a592077f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Add owner to service principal\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "External User Added to Google Workspace Group", + "description": "Detects an external Google Workspace user account being added to an existing group. Adversaries may add external user accounts as a means to intercept shared files or emails with that specific group.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating External User Added to Google Workspace Group\n\nGoogle Workspace groups allow organizations to assign specific users to a group that can share resources. Application specific roles can be manually set for each group, but if not inherit permissions from the top-level organizational unit.\n\nThreat actors may use phishing techniques and container-bound scripts to add external Google accounts to an organization's groups with editorial privileges. As a result, the user account is unable to manually access the organization's resources, settings and files, but will receive anything shared to the group. As a result, confidential information could be leaked or perhaps documents shared with editorial privileges be weaponized for further intrusion.\n\nThis rule identifies when an external user account is added to an organization's groups where the domain name of the target does not match the Google Workspace domain.\n\n#### Possible investigation steps\n- Identify user account(s) associated by reviewing `user.name` or `user.email` in the alert\n - The `user.target.email` field contains the user added to the groups\n - The `group.name` field contains the group the target user was added to\n- Identify specific application settings given to the group which may indicate motive for the external user joining a particular group\n- With the user identified, verify administrative privileges are scoped properly to add external users to the group\n - Unauthorized actions may indicate the `user.email` account has been compromised or leveraged to add an external user\n- To identify other users in this group, search for `event.action: \"ADD_GROUP_MEMBER\"`\n - It is important to understand if external users with `@gmail.com` are expected to be added to this group based on historical references\n- Review Gmail logs where emails were sent to and from the `group.name` value\n - This may indicate potential internal spearphishing\n\n### False positive analysis\n- With the user account whom added the new user, verify this action was intentional\n- Verify that the target whom was added to the group is expected to have access to the organization's resources and data\n- If other members have been added to groups that are external, this may indicate historically that this action is expected\n\n### Response and remediation\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate multi-factor authentication for the user.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security defaults [provided by Google](https://cloud.google.com/security-command-center/docs/how-to-investigate-threats).\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 2, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Identity and Access Audit", + "Tactic: Initial Access", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Administrators may add external users to groups to share files and communication with them via the intended recipient be the group they are added to. It is unlikely an external user account would be added to an organization's group where administrators should create a new user account." + ], + "references": [ + "https://support.google.com/a/answer/33329" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.004", + "name": "Cloud Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/004/" + } + ] + } + ] + } + ], + "id": "f7861f39-fa23-4c61-b58a-8aced15ba357", + "rule_id": "38f384e0-aef8-11ed-9a38-f661ea17fbcc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "user.target.email", + "type": "keyword", + "ecs": true + }, + { + "name": "user.target.group.domain", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "eql", + "query": "iam where event.dataset == \"google_workspace.admin\" and event.action == \"ADD_GROUP_MEMBER\" and\n not endsWith(user.target.email, user.target.group.domain)\n", + "language": "eql", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ] + }, + { + "name": "Malware - Prevented - Elastic Endgame", + "description": "Elastic Endgame prevented Malware. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [], + "id": "3b2a308d-b964-4208-b948-c6a78ca2a388", + "rule_id": "3b382770-efbb-44f4-beed-f5e0a051b895", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:file_classification_event or endgame.event_subtype_full:file_classification_event)\n", + "language": "kuery" + }, + { + "name": "PowerShell Script with Log Clear Capabilities", + "description": "Identifies the use of Cmdlets and methods related to Windows event log deletion activities. This is often done by attackers in an attempt to evade detection or destroy forensic evidence on a system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: PowerShell Logs", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.eventlog.clear", + "https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.eventing.reader.eventlogsession.clearlog" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.001", + "name": "Clear Windows Event Logs", + "reference": "https://attack.mitre.org/techniques/T1070/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "5f6edd6e-e787-4cf5-a360-75f9925226da", + "rule_id": "3d3aa8f9-12af-441f-9344-9f31053e316d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"Clear-EventLog\" or\n \"Remove-EventLog\" or\n (\"Eventing.Reader.EventLogSession\" and \".ClearLog\") or\n (\"Diagnostics.EventLog\" and \".Clear\")\n ) and\n not file.path : (\n ?\\:\\\\\\\\*\\\\\\\\system32\\\\\\\\WindowsPowerShell\\\\\\\\v1.0\\\\\\\\Modules\\\\\\\\Microsoft.PowerShell.Management\\\\\\\\*.psd1\n )\n", + "language": "kuery" + }, + { + "name": "Potential Password Spraying of Microsoft 365 User Accounts", + "description": "Identifies a high number (25) of failed Microsoft 365 user authentication attempts from a single IP address within 30 minutes, which could be indicative of a password spraying attack. An adversary may attempt a password spraying attack to obtain unauthorized access to user accounts.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Identity and Access Audit", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false positives." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1110", + "name": "Brute Force", + "reference": "https://attack.mitre.org/techniques/T1110/" + } + ] + } + ], + "id": "7c0f1590-923f-42d8-9086-7cc30c1b24cc", + "rule_id": "3efee4f0-182a-40a8-a835-102c68a4175d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "threshold", + "query": "event.dataset:o365.audit and event.provider:(Exchange or AzureActiveDirectory) and event.category:authentication and\nevent.action:(\"UserLoginFailed\" or \"PasswordLogonInitialAuthUsingPassword\")\n", + "threshold": { + "field": [ + "source.ip" + ], + "value": 25 + }, + "index": [ + "filebeat-*", + "logs-o365*" + ], + "language": "kuery" + }, + { + "name": "CyberArk Privileged Access Security Error", + "description": "Identifies the occurrence of a CyberArk Privileged Access Security (PAS) error level audit event. The event.code correlates to the CyberArk Vault Audit Action Code.", + "risk_score": 73, + "severity": "high", + "rule_name_override": "event.action", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\nThis is a promotion rule for CyberArk error events, which are alertable events per the vendor.\nConsult vendor documentation on interpreting specific events.", + "version": 102, + "tags": [ + "Data Source: CyberArk PAS", + "Use Case: Log Auditing", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "To tune this rule, add exceptions to exclude any event.code which should not trigger this rule." + ], + "references": [ + "https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PASREF/Vault%20Audit%20Action%20Codes.htm?tocpath=Administration%7CReferences%7C_____3" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [] + } + ], + "id": "5c53e07f-0d83-4934-b22a-d0bdcfc30010", + "rule_id": "3f0e5410-a4bf-4e8c-bcfc-79d67a285c54", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cyberarkpas", + "version": "^2.2.0" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "The CyberArk Privileged Access Security (PAS) Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-cyberarkpas.audit*" + ], + "query": "event.dataset:cyberarkpas.audit and event.type:error\n", + "language": "kuery" + }, + { + "name": "Potential Protocol Tunneling via Chisel Client", + "description": "This rule monitors for common command line flags leveraged by the Chisel client utility followed by a connection attempt. Chisel is a command-line utility used for creating and managing TCP and UDP tunnels, enabling port forwarding and secure communication between machines. Attackers can abuse the Chisel utility to establish covert communication channels, bypass network restrictions, and carry out malicious activities by creating tunnels that allow unauthorized access to internal systems.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform", + "https://book.hacktricks.xyz/generic-methodologies-and-resources/tunneling-and-port-forwarding" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + } + ], + "id": "55ab19d3-2590-4762-b800-1ebbdb7e1e27", + "rule_id": "3f12325a-4cc6-410b-8d4c-9fbbeb744cfd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.args == \"client\" and process.args : (\"R*\", \"*:*\", \"*socks*\", \"*.*\") and process.args_count >= 4 and \n process.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")]\n [network where host.os.type == \"linux\" and event.action == \"connection_attempted\" and event.type == \"start\" and \n destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\" and \n not process.name : (\n \"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\", \"java\", \"telnet\",\n \"ftp\", \"socat\", \"curl\", \"wget\", \"dpkg\", \"docker\", \"dockerd\", \"yum\", \"apt\", \"rpm\", \"dnf\", \"ssh\", \"sshd\")]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Process Discovery via Built-In Applications", + "description": "Identifies the use of built-in tools attackers can use to discover running processes on an endpoint.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1057", + "name": "Process Discovery", + "reference": "https://attack.mitre.org/techniques/T1057/" + }, + { + "id": "T1518", + "name": "Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/", + "subtechnique": [ + { + "id": "T1518.001", + "name": "Security Software Discovery", + "reference": "https://attack.mitre.org/techniques/T1518/001/" + } + ] + } + ] + } + ], + "id": "75597a93-9cf3-4710-8016-ce15277200c3", + "rule_id": "3f4d7734-2151-4481-b394-09d7c6c91f75", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and event.action == \"exec\" and\n process.name :(\"ps\", \"pstree\", \"htop\", \"pgrep\") and\n not (event.action == \"exec\" and process.parent.name in (\"amazon-ssm-agent\", \"snap\"))\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Interactive Exec Command Launched Against A Running Container", + "description": "This rule detects interactive 'exec' events launched against a container using the 'exec' command. Using the 'exec' command in a pod allows a user to establish a temporary shell session and execute any process/command inside the container. This rule specifically targets higher-risk interactive commands that allow real-time interaction with a container's shell. A malicious actor could use this level of access to further compromise the container environment or attempt a container breakout.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "An administrator may need to exec into a pod for a legitimate reason like debugging purposes. Containers built from Linux and Windows OS images, tend to include debugging utilities. In this case, an admin may choose to run commands inside a specific container with kubectl exec ${POD_NAME} -c ${CONTAINER_NAME} -- ${CMD} ${ARG1} ${ARG2} ... ${ARGN}. For example, the following command can be used to look at logs from a running Cassandra pod: kubectl exec cassandra --cat /var/log/cassandra/system.log . Additionally, the -i and -t arguments might be used to run a shell connected to the terminal: kubectl exec -i -t cassandra -- sh" + ], + "references": [ + "https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/", + "https://kubernetes.io/docs/tasks/debug/debug-application/get-shell-running-container/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + }, + { + "id": "T1609", + "name": "Container Administration Command", + "reference": "https://attack.mitre.org/techniques/T1609/" + } + ] + } + ], + "id": "f0bd64ef-cf3f-421c-bff5-b7b6c609361a", + "rule_id": "420e5bb4-93bf-40a3-8f4a-4cc1af90eca1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entry_leader.entry_meta.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entry_leader.same_as_process", + "type": "boolean", + "ecs": true + }, + { + "name": "process.interactive", + "type": "boolean", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where container.id : \"*\" and event.type== \"start\" and \n\n/* use of kubectl exec to enter a container */\nprocess.entry_leader.entry_meta.type : \"container\" and \n\n/* process is the inital process run in a container */\nprocess.entry_leader.same_as_process== true and\n\n/* interactive process */\nprocess.interactive == true\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "Potential Masquerading as VLC DLL", + "description": "Identifies instances of VLC-related DLLs which are not signed by the original developer. Attackers may name their payload as legitimate applications to blend into the environment, or embedding its malicious code within legitimate applications to deceive machine learning algorithms by incorporating authentic and benign code.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "Data Source: Elastic Defend", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Persistence", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + }, + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1554", + "name": "Compromise Client Software Binary", + "reference": "https://attack.mitre.org/techniques/T1554/" + } + ] + } + ], + "id": "2122ba75-d834-45b3-9722-66365df22d66", + "rule_id": "4494c14f-5ff8-4ed2-8e99-bf816a1642fc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "library where host.os.type == \"windows\" and event.action == \"load\" and\n dll.name : (\"libvlc.dll\", \"libvlccore.dll\", \"axvlc.dll\") and\n not (\n dll.code_signature.subject_name : (\"VideoLAN\", \"716F2E5E-A03A-486B-BC67-9B18474B9D51\")\n and dll.code_signature.trusted == true\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Permission Theft - Prevented - Elastic Endgame", + "description": "Elastic Endgame prevented Permission Theft. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/" + } + ] + } + ], + "id": "ba886660-0cf2-4c5c-9867-f61fb4aeb983", + "rule_id": "453f659e-0429-40b1-bfdb-b6957286e04b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:token_protection_event or endgame.event_subtype_full:token_protection_event)\n", + "language": "kuery" + }, + { + "name": "Sensitive Files Compression Inside A Container", + "description": "Identifies the use of a compression utility to collect known files containing sensitive information, such as credentials and system configurations inside a container.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Collection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.001", + "name": "Credentials In Files", + "reference": "https://attack.mitre.org/techniques/T1552/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1560", + "name": "Archive Collected Data", + "reference": "https://attack.mitre.org/techniques/T1560/", + "subtechnique": [ + { + "id": "T1560.001", + "name": "Archive via Utility", + "reference": "https://attack.mitre.org/techniques/T1560/001/" + } + ] + } + ] + } + ], + "id": "ba5a68d5-8e83-4efa-9c46-52718bcb84b8", + "rule_id": "475b42f0-61fb-4ef0-8a85-597458bfb0a1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where container.id: \"*\" and event.type== \"start\" and \n\n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/ \n(process.name: (\"zip\", \"tar\", \"gzip\", \"hdiutil\", \"7z\") or process.args: (\"zip\", \"tar\", \"gzip\", \"hdiutil\", \"7z\"))\nand process.args: ( \n\"/root/.ssh/id_rsa\", \n\"/root/.ssh/id_rsa.pub\", \n\"/root/.ssh/id_ed25519\", \n\"/root/.ssh/id_ed25519.pub\", \n\"/root/.ssh/authorized_keys\", \n\"/root/.ssh/authorized_keys2\", \n\"/root/.ssh/known_hosts\", \n\"/root/.bash_history\", \n\"/etc/hosts\", \n\"/home/*/.ssh/id_rsa\", \n\"/home/*/.ssh/id_rsa.pub\", \n\"/home/*/.ssh/id_ed25519\",\n\"/home/*/.ssh/id_ed25519.pub\",\n\"/home/*/.ssh/authorized_keys\",\n\"/home/*/.ssh/authorized_keys2\",\n\"/home/*/.ssh/known_hosts\",\n\"/home/*/.bash_history\",\n\"/root/.aws/credentials\",\n\"/root/.aws/config\",\n\"/home/*/.aws/credentials\",\n\"/home/*/.aws/config\",\n\"/root/.docker/config.json\",\n\"/home/*/.docker/config.json\",\n\"/etc/group\",\n\"/etc/passwd\",\n\"/etc/shadow\",\n\"/etc/gshadow\")\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "Agent Spoofing - Multiple Hosts Using Same Agent", + "description": "Detects when multiple hosts are using the same agent ID. This could occur in the event of an agent being taken over and used to inject illegitimate documents into an instance as an attempt to spoof events in order to masquerade actual activity to evade detection.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Use Case: Threat Detection", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "This is meant to run only on datasources using Elastic Agent 7.14+ since versions prior to that will be missing the necessary field, resulting in false positives." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + } + ], + "id": "1212f68c-7ad4-4dfa-ab92-c58bc8d62c1b", + "rule_id": "493834ca-f861-414c-8602-150d5505b777", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.agent_id_status", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "event.agent_id_status:*\n", + "threshold": { + "field": [ + "agent.id" + ], + "value": 2, + "cardinality": [ + { + "field": "host.id", + "value": 2 + } + ] + }, + "index": [ + "logs-*", + "metrics-*", + "traces-*" + ], + "language": "kuery" + }, + { + "name": "Microsoft 365 Exchange DKIM Signing Configuration Disabled", + "description": "Identifies when a DomainKeys Identified Mail (DKIM) signing configuration is disabled in Microsoft 365. With DKIM in Microsoft 365, messages that are sent from Exchange Online will be cryptographically signed. This will allow the receiving email system to validate that the messages were generated by a server that the organization authorized and were not spoofed.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Disabling a DKIM configuration may be done by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/set-dkimsigningconfig?view=exchange-ps" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1556", + "name": "Modify Authentication Process", + "reference": "https://attack.mitre.org/techniques/T1556/" + } + ] + } + ], + "id": "35509883-1e44-4107-a24a-1316a8387982", + "rule_id": "514121ce-c7b6-474a-8237-68ff71672379", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "o365.audit.Parameters.Enabled", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Set-DkimSigningConfig\" and o365.audit.Parameters.Enabled:False and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "GCP Logging Sink Deletion", + "description": "Identifies a Logging sink deletion in Google Cloud Platform (GCP). Every time a log entry arrives, Logging compares the log entry to the sinks in that resource. Each sink whose filter matches the log entry writes a copy of the log entry to the sink's export destination. An adversary may delete a Logging sink to evade detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Log Auditing", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Logging sink deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Logging sink deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/logging/docs/export" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "8279dea2-889b-4cf6-b7d9-d1f88065ccc8", + "rule_id": "51859fa0-d86b-4214-bf48-ebb30ed91305", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.logging.v*.ConfigServiceV*.DeleteSink and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Azure Diagnostic Settings Deletion", + "description": "Identifies the deletion of diagnostic settings in Azure, which send platform logs and metrics to different destinations. An adversary may delete diagnostic settings in an attempt to evade defenses.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Deletion of diagnostic settings may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Diagnostic settings deletion from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/azure-monitor/platform/diagnostic-settings" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "8c6d6197-caf2-42c5-b265-c142340c7db7", + "rule_id": "5370d4cd-2bb3-4d71-abf5-1e1d0ff5a2de", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.INSIGHTS/DIAGNOSTICSETTINGS/DELETE\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Binary Content Copy via Cmd.exe", + "description": "Attackers may abuse cmd.exe commands to reassemble binary fragments into a malicious payload.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1140", + "name": "Deobfuscate/Decode Files or Information", + "reference": "https://attack.mitre.org/techniques/T1140/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.003", + "name": "Windows Command Shell", + "reference": "https://attack.mitre.org/techniques/T1059/003/" + } + ] + } + ] + } + ], + "id": "f8fe2888-33f8-42f9-8abe-08cf50ceacc3", + "rule_id": "53dedd83-1be7-430f-8026-363256395c8b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"cmd.exe\" and (\n (process.args : \"type\" and process.args : (\">\", \">>\")) or\n (process.args : \"copy\" and process.args : \"/b\"))\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Windows CryptoAPI Spoofing Vulnerability (CVE-2020-0601 - CurveBall)", + "description": "A spoofing vulnerability exists in the way Windows CryptoAPI (Crypt32.dll) validates Elliptic Curve Cryptography (ECC) certificates. An attacker could exploit the vulnerability by using a spoofed code-signing certificate to sign a malicious executable, making it appear the file was from a trusted, legitimate source.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 103, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Use Case: Vulnerability" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1553", + "name": "Subvert Trust Controls", + "reference": "https://attack.mitre.org/techniques/T1553/", + "subtechnique": [ + { + "id": "T1553.002", + "name": "Code Signing", + "reference": "https://attack.mitre.org/techniques/T1553/002/" + } + ] + } + ] + } + ], + "id": "faafb7c8-6a4a-4766-b8a4-4f9365172f2a", + "rule_id": "56557cde-d923-4b88-adee-c61b3f3b5dc3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "message", + "type": "match_only_text", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.provider:\"Microsoft-Windows-Audit-CVE\" and message:\"[CVE-2020-0601]\" and host.os.type:windows\n", + "language": "kuery" + }, + { + "name": "GCP Logging Bucket Deletion", + "description": "Identifies a Logging bucket deletion in Google Cloud Platform (GCP). Log buckets are containers that store and organize log data. A deleted bucket stays in a pending state for 7 days, and Logging continues to route logs to the bucket during that time. To stop routing logs to a deleted bucket, you can delete the log sinks that have the bucket as their destination, or modify the filter for the sinks to stop it from routing logs to the deleted bucket. An adversary may delete a log bucket to evade detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Log Auditing", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Logging bucket deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Logging bucket deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/logging/docs/buckets", + "https://cloud.google.com/logging/docs/storage" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "6ae110d9-19eb-4476-a611-f2b56bc38172", + "rule_id": "5663b693-0dea-4f2e-8275-f1ae5ff2de8e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.logging.v*.ConfigServiceV*.DeleteBucket and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Credential Dumping - Detected - Elastic Endgame", + "description": "Elastic Endgame detected Credential Dumping. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame", + "Use Case: Threat Detection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "3038525f-ce07-4626-93eb-5e0c31cb72ba", + "rule_id": "571afc56-5ed9-465d-a2a9-045f099f6e7e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:cred_theft_event or endgame.event_subtype_full:cred_theft_event)\n", + "language": "kuery" + }, + { + "name": "Azure Virtual Network Device Modified or Deleted", + "description": "Identifies when a virtual network device is modified or deleted. This can be a network virtual appliance, virtual hub, or virtual router.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Network Security Monitoring", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Virtual Network Device modification or deletion may be performed by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Virtual Network Device modification or deletion by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [] + } + ], + "id": "ad5b25f7-008e-4cd3-9887-57e179064f52", + "rule_id": "573f6e7a-7acf-4bcd-ad42-c4969124d3c0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:(\"MICROSOFT.NETWORK/NETWORKINTERFACES/TAPCONFIGURATIONS/WRITE\" or\n\"MICROSOFT.NETWORK/NETWORKINTERFACES/TAPCONFIGURATIONS/DELETE\" or \"MICROSOFT.NETWORK/NETWORKINTERFACES/WRITE\" or\n\"MICROSOFT.NETWORK/NETWORKINTERFACES/JOIN/ACTION\" or \"MICROSOFT.NETWORK/NETWORKINTERFACES/DELETE\" or\n\"MICROSOFT.NETWORK/NETWORKVIRTUALAPPLIANCES/DELETE\" or \"MICROSOFT.NETWORK/NETWORKVIRTUALAPPLIANCES/WRITE\" or\n\"MICROSOFT.NETWORK/VIRTUALHUBS/DELETE\" or \"MICROSOFT.NETWORK/VIRTUALHUBS/WRITE\" or\n\"MICROSOFT.NETWORK/VIRTUALROUTERS/WRITE\" or \"MICROSOFT.NETWORK/VIRTUALROUTERS/DELETE\") and\nevent.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "PowerShell MiniDump Script", + "description": "This rule detects PowerShell scripts capable of dumping process memory using WindowsErrorReporting or Dbghelp.dll MiniDumpWriteDump. Attackers can use this tooling to dump LSASS and get access to credentials.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell MiniDump Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can abuse Process Memory Dump capabilities to extract credentials from LSASS or to obtain other privileged information stored in the process memory.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Check if the imported function was executed and which process it targeted.\n\n### False positive analysis\n\n- Regular users do not have a business justification for using scripting utilities to dump process memory, making false positives unlikely.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "PowerShell scripts that use this capability for troubleshooting." + ], + "references": [ + "https://github.com/PowerShellMafia/PowerSploit/blob/master/Exfiltration/Out-Minidump.ps1", + "https://github.com/FuzzySecurity/PowerShell-Suite/blob/master/Get-ProcessMiniDump.ps1", + "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "804ebe7d-1d39-4c20-a088-ef030ec1b743", + "rule_id": "577ec21e-56fe-4065-91d8-45eb8224fe77", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and powershell.file.script_block_text:(MiniDumpWriteDump or MiniDumpWithFullMemory or pmuDetirWpmuDiniM) and not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "File Staged in Root Folder of Recycle Bin", + "description": "Identifies files written to the root of the Recycle Bin folder instead of subdirectories. Adversaries may place files in the root of the Recycle Bin in preparation for exfiltration or to evade defenses.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1074", + "name": "Data Staged", + "reference": "https://attack.mitre.org/techniques/T1074/", + "subtechnique": [ + { + "id": "T1074.001", + "name": "Local Data Staging", + "reference": "https://attack.mitre.org/techniques/T1074/001/" + } + ] + } + ] + } + ], + "id": "1c78018f-2792-499b-913d-7fda52479b57", + "rule_id": "57bccf1d-daf5-4e1a-9049-ff79b5254704", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n file.path : \"?:\\\\$RECYCLE.BIN\\\\*\" and\n not file.path : \"?:\\\\$RECYCLE.BIN\\\\*\\\\*\" and\n not file.name : \"desktop.ini\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Zoom Meeting with no Passcode", + "description": "This rule identifies Zoom meetings that are created without a passcode. Meetings without a passcode are susceptible to Zoombombing. Zoombombing is carried out by taking advantage of Zoom sessions that are not protected with a passcode. Zoombombing refers to the unwanted, disruptive intrusion, generally by Internet trolls and hackers, into a video conference call. In a typical Zoombombing incident, a teleconferencing session is hijacked by the insertion of material that is lewd, obscene, racist, or antisemitic in nature, typically resulting of the shutdown of the session.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 101, + "tags": [ + "Data Source: Zoom", + "Use Case: Configuration Audit", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.zoom.us/a-message-to-our-users/", + "https://www.fbi.gov/contact-us/field-offices/boston/news/press-releases/fbi-warns-of-teleconferencing-and-online-classroom-hijacking-during-covid-19-pandemic" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + } + ], + "id": "5e763848-6a22-42ae-ae22-4d4ff5bf470f", + "rule_id": "58ac2aa5-6718-427c-a845-5f3ac5af00ba", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "zoom.meeting.password", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Zoom Filebeat module or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*" + ], + "query": "event.type:creation and event.module:zoom and event.dataset:zoom.webhook and\n event.action:meeting.created and not zoom.meeting.password:*\n", + "language": "kuery" + }, + { + "name": "File or Directory Deletion Command", + "description": "This rule identifies the execution of commands that can be used to delete files and directories. Adversaries may delete files and directories on a host system, such as logs, browser history, or malware.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1070", + "name": "Indicator Removal", + "reference": "https://attack.mitre.org/techniques/T1070/", + "subtechnique": [ + { + "id": "T1070.004", + "name": "File Deletion", + "reference": "https://attack.mitre.org/techniques/T1070/004/" + } + ] + } + ] + } + ], + "id": "bc2f2824-eb79-47b9-b90e-7629d73cfce5", + "rule_id": "5919988c-29e1-4908-83aa-1f087a838f63", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and \n(\n (process.name: \"rundll32.exe\" and process.args: \"*InetCpl.cpl,Clear*\") or \n (process.name: \"reg.exe\" and process.args:\"delete\") or \n (\n process.name: \"cmd.exe\" and process.args: (\"*rmdir*\", \"*rm *\", \"rm\") and\n not process.args : (\n \"*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\*\",\n \"*\\\\AppData\\\\Local\\\\Temp\\\\DockerDesktop\\\\*\",\n \"*\\\\AppData\\\\Local\\\\Temp\\\\Report.*\",\n \"*\\\\AppData\\\\Local\\\\Temp\\\\*.PackageExtraction\"\n )\n ) or\n (process.name: \"powershell.exe\" and process.args: (\"*rmdir\", \"rm\", \"rd\", \"*Remove-Item*\", \"del\", \"*]::Delete(*\"))\n) and not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "O365 Email Reported by User as Malware or Phish", + "description": "Detects the occurrence of emails reported as Phishing or Malware by Users. Security Awareness training is essential to stay ahead of scammers and threat actors, as security products can be bypassed, and the user can still receive a malicious message. Educating users to report suspicious messages can help identify gaps in security controls and prevent malware infections and Business Email Compromise attacks.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate files reported by the users" + ], + "references": [ + "https://support.microsoft.com/en-us/office/use-the-report-message-add-in-b5caa9f1-cdf3-4443-af8c-ff724ea719d2?ui=en-us&rs=en-us&ad=us" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + }, + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + } + ], + "id": "4f009eb0-9f8b-4ce6-a643-4b5e4f72e259", + "rule_id": "5930658c-2107-4afc-91af-e0e55b7f7184", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "rule.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.action:AlertTriggered and rule.name:\"Email reported by user as malware or phish\"\n", + "language": "kuery" + }, + { + "name": "Suspicious which Enumeration", + "description": "This rule monitors for the usage of the which command with an unusual amount of process arguments. Attackers may leverage the which command to enumerate the system for useful installed utilities that may be used after compromising a system to escalate privileges or move latteraly across the network.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "f76daff3-eb4e-40e7-8730-398ae85510a0", + "rule_id": "5b18eef4-842c-4b47-970f-f08d24004bde", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"which\" and process.args_count >= 10\n\n/* potential tuning if rule would turn out to be noisy\nand process.args in (\"nmap\", \"nc\", \"ncat\", \"netcat\", nc.traditional\", \"gcc\", \"g++\", \"socat\") and \nprocess.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n*/ \n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Masquerading as Browser Process", + "description": "Identifies suspicious instances of browser processes, such as unsigned or signed with unusual certificates, that can indicate an attempt to conceal malicious activity, bypass security features such as allowlists, or trick users into executing malware.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Persistence", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + }, + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1554", + "name": "Compromise Client Software Binary", + "reference": "https://attack.mitre.org/techniques/T1554/" + } + ] + } + ], + "id": "d2e3384f-ec1c-46b9-a3ef-577b2fdefccb", + "rule_id": "5b9eb30f-87d6-45f4-9289-2bf2024f0376", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n /* Chrome Related Processes */\n (process.name : (\n \"chrome.exe\", \"GoogleUpdate.exe\", \"GoogleCrashHandler64.exe\", \"GoogleCrashHandler.exe\",\n \"GoogleUpdateComRegisterShell64.exe\", \"GoogleUpdateSetup.exe\", \"GoogleUpdateOnDemand.exe\",\n \"chrome_proxy.exe\", \"remote_assistance_host.exe\", \"remoting_native_messaging_host.exe\",\n \"GoogleUpdateBroker.exe\"\n ) and not\n (process.code_signature.subject_name : (\"Google LLC\", \"Google Inc\") and process.code_signature.trusted == true)\n and not\n (\n process.executable : (\n \"?:\\\\Program Files\\\\HP\\\\Sure Click\\\\servers\\\\chrome.exe\",\n \"?:\\\\Program Files\\\\HP\\\\Sure Click\\\\*\\\\servers\\\\chrome.exe\"\n ) and\n process.code_signature.subject_name : (\"Bromium, Inc.\") and process.code_signature.trusted == true\n ) and\n not (\n process.executable : (\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\ms-playwright\\\\chromium-*\\\\chrome-win\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Programs\\\\synthetics-recorder\\\\resources\\\\local-browsers\\\\chromium-*\\\\chrome-win\\\\chrome.exe\",\n \"*\\\\node_modules\\\\puppeteer\\\\.local-chromium\\\\win64-*\\\\chrome-win\\\\chrome.exe\",\n \"?:\\\\Program Files (x86)\\\\Invicti Professional Edition\\\\chromium\\\\chrome.exe\",\n \"?:\\\\Program Files\\\\End2End, Inc\\\\ARMS Html Engine\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\*BurpSuitePro\\\\burpbrowser\\\\*\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\*BurpSuite\\\\burpbrowser\\\\*\\\\chrome.exe\"\n ) and process.args: (\n \"--enable-features=NetworkService,NetworkServiceInProcess\",\n \"--type=crashpad-handler\", \"--enable-automation\", \"--disable-xss-auditor\"\n )\n )\n ) or\n\n /* MS Edge Related Processes */\n (process.name : (\n \"msedge.exe\", \"MicrosoftEdgeUpdate.exe\", \"identity_helper.exe\", \"msedgewebview2.exe\",\n \"MicrosoftEdgeWebview2Setup.exe\", \"MicrosoftEdge_X*.exe\", \"msedge_proxy.exe\",\n \"MicrosoftEdgeUpdateCore.exe\", \"MicrosoftEdgeUpdateBroker.exe\", \"MicrosoftEdgeUpdateSetup_X*.exe\",\n \"MicrosoftEdgeUpdateComRegisterShell64.exe\", \"msedgerecovery.exe\", \"MicrosoftEdgeUpdateSetup.exe\"\n ) and not\n (process.code_signature.subject_name : \"Microsoft Corporation\" and process.code_signature.trusted == true)\n and not\n (\n process.name : \"msedgewebview2.exe\" and\n process.code_signature.subject_name : (\"Bromium, Inc.\") and process.code_signature.trusted == true\n )\n ) or\n\n /* Brave Related Processes */\n (process.name : (\n \"brave.exe\", \"BraveUpdate.exe\", \"BraveCrashHandler64.exe\", \"BraveCrashHandler.exe\",\n \"BraveUpdateOnDemand.exe\", \"brave_vpn_helper.exe\", \"BraveUpdateSetup*.exe\",\n \"BraveUpdateComRegisterShell64.exe\"\n ) and not\n (process.code_signature.subject_name : \"Brave Software, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Firefox Related Processes */\n (process.name : (\n \"firefox.exe\", \"pingsender.exe\", \"default-browser-agent.exe\", \"maintenanceservice.exe\",\n \"plugin-container.exe\", \"maintenanceservice_tmp.exe\", \"maintenanceservice_installer.exe\",\n \"minidump-analyzer.exe\"\n ) and not\n (process.code_signature.subject_name : \"Mozilla Corporation\" and process.code_signature.trusted == true)\n and not\n (\n process.name : \"default-browser-agent.exe\" and\n process.code_signature.subject_name : (\"WATERFOX LIMITED\") and process.code_signature.trusted == true\n )\n ) or\n\n /* Island Related Processes */\n (process.name : (\n \"Island.exe\", \"IslandUpdate.exe\", \"IslandCrashHandler.exe\", \"IslandCrashHandler64.exe\",\n \"IslandUpdateBroker.exe\", \"IslandUpdateOnDemand.exe\", \"IslandUpdateComRegisterShell64.exe\",\n \"IslandUpdateSetup.exe\"\n ) and not\n (process.code_signature.subject_name : \"Island Technology Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Opera Related Processes */\n (process.name : (\n \"opera.exe\", \"opera_*.exe\", \"browser_assistant.exe\"\n ) and not\n (process.code_signature.subject_name : \"Opera Norway AS\" and process.code_signature.trusted == true)\n ) or\n\n /* Whale Related Processes */\n (process.name : (\n \"whale.exe\", \"whale_update.exe\", \"wusvc.exe\"\n ) and not\n (process.code_signature.subject_name : \"NAVER Corp.\" and process.code_signature.trusted == true)\n ) or\n\n /* Chromium-based Browsers processes */\n (process.name : (\n \"chrmstp.exe\", \"notification_helper.exe\", \"elevation_service.exe\"\n ) and not\n (process.code_signature.subject_name : (\n \"Island Technology Inc.\",\n \"Citrix Systems, Inc.\",\n \"Brave Software, Inc.\",\n \"Google LLC\",\n \"Google Inc\",\n \"Microsoft Corporation\",\n \"NAVER Corp.\",\n \"AVG Technologies USA, LLC\",\n \"Avast Software s.r.o.\"\n ) and process.code_signature.trusted == true\n )\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Meterpreter Reverse Shell", + "description": "This detection rule identifies a sample of suspicious Linux system file reads used for system fingerprinting, leveraged by the Metasploit Meterpreter shell to gather information about the target that it is executing its shell on. Detecting this pattern is indicative of a successful meterpreter shell connection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + } + ], + "id": "88b37b6e-d1e7-498a-99ab-bc0332af4309", + "rule_id": "5c895b4f-9133-4e68-9e23-59902175355c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0", + "integration": "auditd" + } + ], + "required_fields": [ + { + "name": "auditd.data.a2", + "type": "unknown", + "ecs": false + }, + { + "name": "auditd.data.syscall", + "type": "unknown", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Auditbeat integration, or Auditd Manager integration.\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n### Auditd Manager Integration Setup\nThe Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.\nAuditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.\n\n#### The following steps should be executed in order to add the Elastic Agent System integration \"auditd_manager\" on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Auditd Manager and select the integration to see more details about it.\n- Click Add Auditd Manager.\n- Configure the integration name and optionally add a description.\n- Review optional and advanced settings accordingly.\n- Add the newly installed `auditd manager` to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.\n- Click Save and Continue.\n- For more details on the integeration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).\n\n#### Rule Specific Setup Note\nAuditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.\nHowever, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n- For this detection rule the following additional audit rules are required to be added to the integration:\n -w /proc/net/ -p r -k audit_proc\n -w /etc/machine-id -p wa -k machineid\n -w /etc/passwd -p wa -k passwd\n\n", + "type": "eql", + "query": "sample by host.id, process.pid, user.id\n[file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and auditd.data.syscall == \"open\" and \n auditd.data.a2 == \"1b6\" and file.path == \"/etc/machine-id\"]\n[file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and auditd.data.syscall == \"open\" and\n auditd.data.a2 == \"1b6\" and file.path == \"/etc/passwd\"]\n[file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and auditd.data.syscall == \"open\" and \n auditd.data.a2 == \"1b6\" and file.path == \"/proc/net/route\"]\n[file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and auditd.data.syscall == \"open\" and\n auditd.data.a2 == \"1b6\" and file.path == \"/proc/net/ipv6_route\"]\n[file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and auditd.data.syscall == \"open\" and\n auditd.data.a2 == \"1b6\" and file.path == \"/proc/net/if_inet6\"]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-auditd_manager.auditd-*" + ] + }, + { + "name": "Microsoft 365 Teams Guest Access Enabled", + "description": "Identifies when guest access is enabled in Microsoft Teams. Guest access in Teams allows people outside the organization to access teams and channels. An adversary may enable guest access to maintain persistence in an environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Teams guest access may be enabled by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/skype/get-csteamsclientconfiguration?view=skype-ps" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "18538ff3-0397-4121-bbf7-f434c89aedef", + "rule_id": "5e552599-ddec-4e14-bad1-28aa42404388", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "o365.audit.Parameters.AllowGuestUser", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:(SkypeForBusiness or MicrosoftTeams) and\nevent.category:web and event.action:\"Set-CsTeamsClientConfiguration\" and\no365.audit.Parameters.AllowGuestUser:True and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Azure Command Execution on Virtual Machine", + "description": "Identifies command execution on a virtual machine (VM) in Azure. A Virtual Machine Contributor role lets you manage virtual machines, but not access them, nor access the virtual network or storage account they’re connected to. However, commands can be run via PowerShell on the VM, which execute as System. Other roles, such as certain Administrator roles may be able to execute commands on a VM as well.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Log Auditing", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Command execution on a virtual machine may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Command execution from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://adsecurity.org/?p=4277", + "https://posts.specterops.io/attacking-azure-azure-ad-and-introducing-powerzure-ca70b330511a", + "https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#virtual-machine-contributor" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + } + ], + "id": "30dadd02-2889-45ee-a3d6-17ade53d5ee3", + "rule_id": "60884af6-f553-4a6c-af13-300047455491", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.COMPUTE/VIRTUALMACHINES/RUNCOMMAND/ACTION\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Azure Service Principal Addition", + "description": "Identifies when a new service principal is added in Azure. An application, hosted service, or automated tool that accesses or modifies resources needs an identity created. This identity is known as a service principal. For security reasons, it's always recommended to use service principals with automated tools rather than allowing them to log in with a user identity.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Azure Service Principal Addition\n\nService Principals are identities used by applications, services, and automation tools to access specific resources. They grant specific access based on the assigned API permissions. Most organizations that work a lot with Azure AD make use of service principals. Whenever an application is registered, it automatically creates an application object and a service principal in an Azure AD tenant.\n\nThis rule looks for the addition of service principals. This behavior may enable attackers to impersonate legitimate service principals to camouflage their activities among noisy automations/apps.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Consider the source IP address and geolocation for the user who issued the command. Do they look normal for the user?\n- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Examine the account's commands, API calls, and data management actions in the last 24 hours.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\nIf this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and device conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 105, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A service principal may be created by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Service principal additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/", + "https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1550", + "name": "Use Alternate Authentication Material", + "reference": "https://attack.mitre.org/techniques/T1550/", + "subtechnique": [ + { + "id": "T1550.001", + "name": "Application Access Token", + "reference": "https://attack.mitre.org/techniques/T1550/001/" + } + ] + } + ] + } + ], + "id": "39983b93-5596-4895-b2ad-d466908219db", + "rule_id": "60b6b72f-0fbc-47e7-9895-9ba7627a8b50", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Add service principal\" and event.outcome:(success or Success)\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 Exchange DLP Policy Removed", + "description": "Identifies when a Data Loss Prevention (DLP) policy is removed in Microsoft 365. An adversary may remove a DLP policy to evade existing DLP monitoring.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A DLP policy may be removed by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-dlppolicy?view=exchange-ps", + "https://docs.microsoft.com/en-us/microsoft-365/compliance/data-loss-prevention-policies?view=o365-worldwide" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "fbede1b1-298e-446b-8d1e-676c4b274491", + "rule_id": "60f3adec-1df9-4104-9c75-b97d9f078b25", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Remove-DlpPolicy\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential Non-Standard Port HTTP/HTTPS connection", + "description": "Identifies potentially malicious processes communicating via a port paring typically not associated with HTTP/HTTPS. For example, HTTP over port 8443 or port 440 as opposed to the traditional port 80 , 443. Adversaries may make changes to the standard port a protocol uses to bypass filtering or muddle analysis/parsing of network data.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1571", + "name": "Non-Standard Port", + "reference": "https://attack.mitre.org/techniques/T1571/" + }, + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/", + "subtechnique": [ + { + "id": "T1071.001", + "name": "Web Protocols", + "reference": "https://attack.mitre.org/techniques/T1071/001/" + } + ] + }, + { + "id": "T1573", + "name": "Encrypted Channel", + "reference": "https://attack.mitre.org/techniques/T1573/", + "subtechnique": [ + { + "id": "T1573.001", + "name": "Symmetric Cryptography", + "reference": "https://attack.mitre.org/techniques/T1573/001/" + }, + { + "id": "T1573.002", + "name": "Asymmetric Cryptography", + "reference": "https://attack.mitre.org/techniques/T1573/002/" + } + ] + } + ] + } + ], + "id": "09a22460-2ee7-4796-b806-29280427e27d", + "rule_id": "62b68eb2-1e47-4da7-85b6-8f478db5b272", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "network where process.name : (\"http\", \"https\")\n and destination.port not in (80, 443)\n and event.action in (\"connection_attempted\", \"connection_accepted\")\n and destination.ip != \"127.0.0.1\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Kubernetes Suspicious Assignment of Controller Service Account", + "description": "This rule detects a request to attach a controller service account to an existing or new pod running in the kube-system namespace. By default, controllers running as part of the API Server utilize admin-equivalent service accounts hosted in the kube-system namespace. Controller service accounts aren't normally assigned to running pods and could indicate adversary behavior within the cluster. An attacker that can create or modify pods or pod controllers in the kube-system namespace, can assign one of these admin-equivalent service accounts to a pod and abuse their powerful token to escalate privileges and gain complete cluster control.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 5, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Execution", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Controller service accounts aren't normally assigned to running pods, this is abnormal behavior with very few legitimate use-cases and should result in very few false positives." + ], + "references": [ + "https://www.paloaltonetworks.com/apps/pan/public/downloadResource?pagePath=/content/pan/en_US/resources/whitepapers/kubernetes-privilege-escalation-excessive-permissions-in-popular-platforms" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.001", + "name": "Default Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/001/" + } + ] + } + ] + } + ], + "id": "05d9b22a-71c1-4fcd-8603-fa4767be4367", + "rule_id": "63c05204-339a-11ed-a261-0242ac120002", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.namespace", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.resource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.serviceAccountName", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.verb", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.verb : \"create\"\n and kubernetes.audit.objectRef.resource : \"pods\"\n and kubernetes.audit.objectRef.namespace : \"kube-system\"\n and kubernetes.audit.requestObject.spec.serviceAccountName:*controller\n", + "language": "kuery" + }, + { + "name": "Kubernetes Denied Service Account Request", + "description": "This rule detects when a service account makes an unauthorized request for resources from the API server. Service accounts follow a very predictable pattern of behavior. A service account should never send an unauthorized request to the API server. This behavior is likely an indicator of compromise or of a problem within the cluster. An adversary may have gained access to credentials/tokens and this could be an attempt to access or create resources to facilitate further movement or execution within the cluster.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 4, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Discovery" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Unauthorized requests from service accounts are highly abnormal and more indicative of human behavior or a serious problem within the cluster. This behavior should be investigated further." + ], + "references": [ + "https://research.nccgroup.com/2021/11/10/detection-engineering-for-kubernetes-clusters/#part3-kubernetes-detections", + "https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1613", + "name": "Container and Resource Discovery", + "reference": "https://attack.mitre.org/techniques/T1613/" + } + ] + } + ], + "id": "05ef5ef4-1520-4395-8dc0-22019a9a496e", + "rule_id": "63c056a0-339a-11ed-a261-0242ac120002", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.user.username", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset: \"kubernetes.audit_logs\"\n and kubernetes.audit.user.username: system\\:serviceaccount\\:*\n and kubernetes.audit.annotations.authorization_k8s_io/decision: \"forbid\"\n", + "language": "kuery" + }, + { + "name": "Network Connection via Recently Compiled Executable", + "description": "This rule monitors a sequence involving a program compilation event followed by its execution and a subsequent network connection event. This behavior can indicate the set up of a reverse tcp connection to a command-and-control server. Attackers may spawn reverse shells to establish persistence onto a target system.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + } + ], + "id": "bbe6dbec-ab32-430f-8dbd-3e03de812c9f", + "rule_id": "64cfca9e-0f6f-4048-8251-9ec56a055e9e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id with maxspan=1m\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name in (\"gcc\", \"g++\", \"cc\")] by process.args\n [file where host.os.type == \"linux\" and event.action == \"creation\" and process.name == \"ld\"] by file.name\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\"] by process.name\n [network where host.os.type == \"linux\" and event.action == \"connection_attempted\"] by process.name\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Kubernetes Exposed Service Created With Type NodePort", + "description": "This rule detects an attempt to create or modify a service as type NodePort. The NodePort service allows a user to externally expose a set of labeled pods to the internet. This creates an open port on every worker node in the cluster that has a pod for that service. When external traffic is received on that open port, it directs it to the specific pod through the service representing it. A malicious user can configure a service as type Nodeport in order to intercept traffic from other pods or nodes, bypassing firewalls and other network security measures configured for load balancers within a cluster. This creates a direct method of communication between the cluster and the outside world, which could be used for more malicious behavior and certainly widens the attack surface of your cluster.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 202, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Execution", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Developers may have a legitimate use for NodePorts. For frontend parts of an application you may want to expose a Service onto an external IP address without using cloud specific Loadbalancers. NodePort can be used to expose the Service on each Node's IP at a static port (the NodePort). You'll be able to contact the NodePort Service from outside the cluster, by requesting :. NodePort unlike Loadbalancers, allow the freedom to set up your own load balancing solution, configure environments that aren't fully supported by Kubernetes, or even to expose one or more node's IPs directly." + ], + "references": [ + "https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", + "https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", + "https://www.tigera.io/blog/new-vulnerability-exposes-kubernetes-to-man-in-the-middle-attacks-heres-how-to-mitigate/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1133", + "name": "External Remote Services", + "reference": "https://attack.mitre.org/techniques/T1133/" + } + ] + } + ], + "id": "ed3bc33b-506d-4613-8ff5-38adf6533635", + "rule_id": "65f9bccd-510b-40df-8263-334f03174fed", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.resource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.type", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.verb", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:\"services\"\n and kubernetes.audit.verb:(\"create\" or \"update\" or \"patch\")\n and kubernetes.audit.requestObject.spec.type:\"NodePort\"\n", + "language": "kuery" + }, + { + "name": "O365 Mailbox Audit Logging Bypass", + "description": "Detects the occurrence of mailbox audit bypass associations. The mailbox audit is responsible for logging specified mailbox events (like accessing a folder or a message or permanently deleting a message). However, actions taken by some authorized accounts, such as accounts used by third-party tools or accounts used for lawful monitoring, can create a large number of mailbox audit log entries and may not be of interest to your organization. Because of this, administrators can create bypass associations, allowing certain accounts to perform their tasks without being logged. Attackers can abuse this allowlist mechanism to conceal actions taken, as the mailbox audit will log no activity done by the account.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Tactic: Initial Access", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate allowlisting of noisy accounts" + ], + "references": [ + "https://twitter.com/misconfig/status/1476144066807140355" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "a60b0fce-bec4-4f60-9329-42dc267a91e4", + "rule_id": "675239ea-c1bc-4467-a6d3-b9e2cc7f676d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.action:Set-MailboxAuditBypassAssociation and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "New or Modified Federation Domain", + "description": "Identifies a new or modified federation domain, which can be used to create a trust between O365 and an external identity provider.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Identity and Access Audit", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-accepteddomain?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-federateddomain?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/new-accepteddomain?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/add-federateddomain?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/set-accepteddomain?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/msonline/set-msoldomainfederationsettings?view=azureadps-1.0" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1484", + "name": "Domain Policy Modification", + "reference": "https://attack.mitre.org/techniques/T1484/", + "subtechnique": [ + { + "id": "T1484.002", + "name": "Domain Trust Modification", + "reference": "https://attack.mitre.org/techniques/T1484/002/" + } + ] + } + ] + } + ], + "id": "988119a3-634e-4332-9359-7093f76e65c5", + "rule_id": "684554fc-0777-47ce-8c9b-3d01f198d7f8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:(\"Set-AcceptedDomain\" or\n\"Set-MsolDomainFederationSettings\" or \"Add-FederatedDomain\" or \"New-AcceptedDomain\" or \"Remove-AcceptedDomain\" or \"Remove-FederatedDomain\") and\nevent.outcome:success\n", + "language": "kuery" + }, + { + "name": "Suspicious Utility Launched via ProxyChains", + "description": "This rule monitors for the execution of suspicious linux tools through ProxyChains. ProxyChains is a command-line tool that enables the routing of network connections through intermediary proxies, enhancing anonymity and enabling access to restricted resources. Attackers can exploit the ProxyChains utility to hide their true source IP address, evade detection, and perform malicious activities through a chain of proxy servers, potentially masking their identity and intentions.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + } + ], + "id": "18f5e6ce-eef1-473f-acaa-3ffaea9d86d1", + "rule_id": "6ace94ba-f02c-4d55-9f53-87d99b6f9af4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"proxychains\" and process.args : (\n \"ssh\", \"sshd\", \"sshuttle\", \"socat\", \"iodine\", \"iodined\", \"dnscat\", \"hans\", \"hans-ubuntu\", \"ptunnel-ng\",\n \"ssf\", \"3proxy\", \"ngrok\", \"gost\", \"pivotnacci\", \"chisel*\", \"nmap\", \"ping\", \"python*\", \"php*\", \"perl\", \"ruby\",\n \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\", \"java\", \"telnet\", \"ftp\", \"curl\", \"wget\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Container Management Utility Run Inside A Container", + "description": "This rule detects when a container management binary is run from inside a container. These binaries are critical components of many containerized environments, and their presence and execution in unauthorized containers could indicate compromise or a misconfiguration.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic Licence v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "There is a potential for false positives if the container is used for legitimate administrative tasks that require the use of container management utilities, such as deploying, scaling, or updating containerized applications. It is important to investigate any alerts generated by this rule to determine if they are indicative of malicious activity or part of legitimate container activity." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1609", + "name": "Container Administration Command", + "reference": "https://attack.mitre.org/techniques/T1609/" + } + ] + } + ], + "id": "8ddf1b45-b10f-4cca-ac9c-650bfe59b457", + "rule_id": "6c6bb7ea-0636-44ca-b541-201478ef6b50", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where container.id: \"*\" and event.type== \"start\" \n and process.name: (\"dockerd\", \"docker\", \"kubelet\", \"kube-proxy\", \"kubectl\", \"containerd\", \"runc\", \"systemd\", \"crictl\")\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "Potential Privilege Escalation via CVE-2023-4911", + "description": "This rule detects potential privilege escalation attempts through Looney Tunables (CVE-2023-4911). Looney Tunables is a buffer overflow vulnerability in GNU C Library's dynamic loader's processing of the GLIBC_TUNABLES environment variable.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Use Case: Vulnerability", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.qualys.com/vulnerabilities-threat-research/2023/10/03/cve-2023-4911-looney-tunables-local-privilege-escalation-in-the-glibcs-ld-so" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "10ae2076-2e87-432b-8772-8dab43af88d9", + "rule_id": "6d8685a1-94fa-4ef7-83de-59302e7c4ca8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.env_vars", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\nElastic Defend integration does not collect environment variable logging by default.\nIn order to capture this behavior, this rule requires a specific configuration option set within the advanced settings of the Elastic Defend integration.\n #### To set up environment variable capture for an Elastic Agent policy:\n- Go to Security → Manage → Policies.\n- Select an Elastic Agent policy.\n- Click Show advanced settings.\n- Scroll down or search for linux.advanced.capture_env_vars.\n- Enter the names of env vars you want to capture, separated by commas.\n- For this rule the linux.advanced.capture_env_vars variable should be set to \"GLIBC_TUNABLES\".\n- Click Save.\nAfter saving the integration change, the Elastic Agents running this policy will be updated and\nthe rule will function properly.\nFor more information on capturing environment variables refer the [helper guide](https://www.elastic.co/guide/en/security/current/environment-variable-capture.html).\n\n", + "type": "eql", + "query": "sequence by host.id, process.parent.entity_id, process.executable with maxspan=5s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.env_vars : \"*GLIBC_TUNABLES=glibc.*=glibc.*=*\"] with runs=5\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Linux Tunneling and/or Port Forwarding", + "description": "This rule monitors for a set of Linux utilities that can be used for tunneling and port forwarding. Attackers can leverage tunneling and port forwarding techniques to bypass network defenses, establish hidden communication channels, and gain unauthorized access to internal resources, facilitating data exfiltration, lateral movement, and remote control.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform", + "https://book.hacktricks.xyz/generic-methodologies-and-resources/tunneling-and-port-forwarding" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + } + ], + "id": "7f252889-6f57-4149-98a2-d3476aef4355", + "rule_id": "6ee947e9-de7e-4281-a55d-09289bdf947e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and ((\n // gost & pivotnacci - spawned without process.parent.name\n (process.name == \"gost\" and process.args : (\"-L*\", \"-C*\", \"-R*\")) or (process.name == \"pivotnacci\")) or (\n // ssh\n (process.name in (\"ssh\", \"sshd\") and (process.args in (\"-R\", \"-L\", \"D\", \"-w\") and process.args_count >= 4 and \n not process.args : \"chmod\")) or\n // sshuttle\n (process.name == \"sshuttle\" and process.args in (\"-r\", \"--remote\", \"-l\", \"--listen\") and process.args_count >= 4) or\n // socat\n (process.name == \"socat\" and process.args : (\"TCP4-LISTEN:*\", \"SOCKS*\") and process.args_count >= 3) or\n // chisel\n (process.name : \"chisel*\" and process.args in (\"client\", \"server\")) or\n // iodine(d), dnscat, hans, ptunnel-ng, ssf, 3proxy & ngrok \n (process.name in (\"iodine\", \"iodined\", \"dnscat\", \"hans\", \"hans-ubuntu\", \"ptunnel-ng\", \"ssf\", \"3proxy\", \"ngrok\"))\n ) and process.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Kubernetes Container Created with Excessive Linux Capabilities", + "description": "This rule detects a container deployed with one or more dangerously permissive Linux capabilities. An attacker with the ability to deploy a container with added capabilities could use this for further execution, lateral movement, or privilege escalation within a cluster. The capabilities detected in this rule have been used in container escapes to the host machine.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Kubernetes Container Created with Excessive Linux Capabilities\n\nLinux capabilities were designed to divide root privileges into smaller units. Each capability grants a thread just enough power to perform specific privileged tasks. In Kubernetes, containers are given a set of default capabilities that can be dropped or added to at the time of creation. Added capabilities entitle containers in a pod with additional privileges that can be used to change\ncore processes, change network settings of a cluster, or directly access the underlying host. The following have been used in container escape techniques:\n\nBPF - Allow creating BPF maps, loading BPF Type Format (BTF) data, retrieve JITed code of BPF programs, and more.\nDAC_READ_SEARCH - Bypass file read permission checks and directory read and execute permission checks.\nNET_ADMIN - Perform various network-related operations.\nSYS_ADMIN - Perform a range of system administration operations.\nSYS_BOOT - Use reboot(2) and kexec_load(2), reboot and load a new kernel for later execution.\nSYS_MODULE - Load and unload kernel modules.\nSYS_PTRACE - Trace arbitrary processes using ptrace(2).\nSYS_RAWIO - Perform I/O port operations (iopl(2) and ioperm(2)).\nSYSLOG - Perform privileged syslog(2) operations.\n\n### False positive analysis\n\n- While these capabilities are not included by default in containers, some legitimate images may need to add them. This rule leaves space for the exception of trusted container images. To add an exception, add the trusted container image name to the query field, kubernetes.audit.requestObject.spec.containers.image.", + "version": 3, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Execution", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Some container images require the addition of privileged capabilities. This rule leaves space for the exception of trusted container images. To add an exception, add the trusted container image name to the query field, kubernetes.audit.requestObject.spec.containers.image." + ], + "references": [ + "https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container", + "https://0xn3va.gitbook.io/cheat-sheets/container/escaping/excessive-capabilities", + "https://man7.org/linux/man-pages/man7/capabilities.7.html", + "https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1611", + "name": "Escape to Host", + "reference": "https://attack.mitre.org/techniques/T1611/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1610", + "name": "Deploy Container", + "reference": "https://attack.mitre.org/techniques/T1610/" + } + ] + } + ], + "id": "3db02ac5-0a63-4214-94c2-5c500859a9c8", + "rule_id": "7164081a-3930-11ed-a261-0242ac120002", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.resource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.containers.image", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.containers.securityContext.capabilities.add", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.verb", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset: kubernetes.audit_logs\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.verb: create\n and kubernetes.audit.objectRef.resource: pods\n and kubernetes.audit.requestObject.spec.containers.securityContext.capabilities.add: (\"BPF\" or \"DAC_READ_SEARCH\" or \"NET_ADMIN\" or \"SYS_ADMIN\" or \"SYS_BOOT\" or \"SYS_MODULE\" or \"SYS_PTRACE\" or \"SYS_RAWIO\" or \"SYSLOG\")\n and not kubernetes.audit.requestObject.spec.containers.image : (\"docker.elastic.co/beats/elastic-agent:8.4.0\" or \"rancher/klipper-lb:v0.3.5\" or \"\")\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 Potential ransomware activity", + "description": "Identifies when Microsoft Cloud App Security reports that a user has uploaded files to the cloud that might be infected with ransomware.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "If Cloud App Security identifies, for example, a high rate of file uploads or file deletion activities it may represent an adverse encryption process." + ], + "references": [ + "https://docs.microsoft.com/en-us/cloud-app-security/anomaly-detection-policy", + "https://docs.microsoft.com/en-us/cloud-app-security/policy-template-reference" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1486", + "name": "Data Encrypted for Impact", + "reference": "https://attack.mitre.org/techniques/T1486/" + } + ] + } + ], + "id": "088e4351-b81e-495c-a8c9-796bb58335ef", + "rule_id": "721999d0-7ab2-44bf-b328-6e63367b9b29", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.category:web and event.action:\"Potential ransomware activity\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Web Application Suspicious Activity: Unauthorized Method", + "description": "A request to a web application returned a 405 response, which indicates the web application declined to process the request because the HTTP method is not allowed for the resource.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 102, + "tags": [ + "Data Source: APM" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Security scans and tests may result in these errors. Misconfigured or buggy applications may produce large numbers of these errors. If the source is unexpected, the user unauthorized, or the request unusual, these may indicate suspicious or malicious activity." + ], + "references": [ + "https://en.wikipedia.org/wiki/HTTP_405" + ], + "max_signals": 100, + "threat": [], + "id": "3bf00785-9b07-496e-ab12-4a5b84384156", + "rule_id": "75ee75d8-c180-481c-ba88-ee50129a6aef", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "apm", + "version": "^8.0.0" + } + ], + "required_fields": [ + { + "name": "http.response.status_code", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "apm-*-transaction*", + "traces-apm*" + ], + "query": "http.response.status_code:405\n", + "language": "kuery" + }, + { + "name": "Kubernetes Pod Created With HostIPC", + "description": "This rule detects an attempt to create or modify a pod using the host IPC namespace. This gives access to data used by any pod that also use the hosts IPC namespace. If any process on the host or any processes in a pod uses the hosts inter-process communication mechanisms (shared memory, semaphore arrays, message queues, etc.), an attacker can read/write to those same mechanisms. They may look for files in /dev/shm or use ipcs to check for any IPC facilities being used.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 202, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Execution", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "An administrator or developer may want to use a pod that runs as root and shares the host's IPC, Network, and PID namespaces for debugging purposes. If something is going wrong in the cluster and there is no easy way to SSH onto the host nodes directly, a privileged pod of this nature can be useful for viewing things like iptable rules and network namespaces from the host's perspective. Add exceptions for trusted container images using the query field \"kubernetes.audit.requestObject.spec.container.image\"" + ], + "references": [ + "https://research.nccgroup.com/2021/11/10/detection-engineering-for-kubernetes-clusters/#part3-kubernetes-detections", + "https://kubernetes.io/docs/concepts/security/pod-security-policy/#host-namespaces", + "https://bishopfox.com/blog/kubernetes-pod-privilege-escalation" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1611", + "name": "Escape to Host", + "reference": "https://attack.mitre.org/techniques/T1611/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1610", + "name": "Deploy Container", + "reference": "https://attack.mitre.org/techniques/T1610/" + } + ] + } + ], + "id": "39ccf44b-a9dc-4d92-a902-f07996d5a905", + "rule_id": "764c8437-a581-4537-8060-1fdb0e92c92d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.resource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.containers.image", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.hostIPC", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.verb", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:\"pods\"\n and kubernetes.audit.verb:(\"create\" or \"update\" or \"patch\")\n and kubernetes.audit.requestObject.spec.hostIPC:true\n and not kubernetes.audit.requestObject.spec.containers.image: (\"docker.elastic.co/beats/elastic-agent:8.4.0\")\n", + "language": "kuery" + }, + { + "name": "Privilege Escalation via Rogue Named Pipe Impersonation", + "description": "Identifies a privilege escalation attempt via rogue named pipe impersonation. An adversary may abuse this technique by masquerading as a known named pipe and manipulating a privileged process to connect to it.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "Named Pipe Creation Events need to be enabled within the Sysmon configuration by including the following settings:\n`condition equal \"contains\" and keyword equal \"pipe\"`\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://itm4n.github.io/printspoofer-abusing-impersonate-privileges/", + "https://github.com/zcgonvh/EfsPotato", + "https://twitter.com/SBousseaden/status/1429530155291193354" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/" + } + ] + } + ], + "id": "0732ee42-dfec-437a-8159-47b3b58cf025", + "rule_id": "76ddb638-abf7-42d5-be22-4a70b0bf7241", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "Named Pipe Creation Events need to be enabled within the Sysmon configuration by including the following settings:\n`condition equal "contains" and keyword equal "pipe"`\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.action : \"Pipe Created*\" and\n /* normal sysmon named pipe creation events truncate the pipe keyword */\n file.name : \"\\\\*\\\\Pipe\\\\*\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "User Added as Owner for Azure Application", + "description": "Identifies when a user is added as an owner for an Azure application. An adversary may add a user account as an owner for an Azure application in order to grant additional permissions and modify the application's configuration using another account.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Configuration Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "98eee84a-4d8a-462e-ae01-cf1f77a1648d", + "rule_id": "774f5e28-7b75-4a58-b94e-41bf060fdd86", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Add owner to application\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Adversary Behavior - Detected - Elastic Endgame", + "description": "Elastic Endgame detected an Adversary Behavior. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 102, + "tags": [ + "Data Source: Elastic Endgame" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [], + "id": "889922ee-5118-4894-8ad8-13aeb01b5c4e", + "rule_id": "77a3c3df-8ec4-4da4-b758-878f551dee69", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and (event.action:behavior_protection_event or endgame.event_subtype_full:behavior_protection_event)\n", + "language": "kuery" + }, + { + "name": "Azure Privilege Identity Management Role Modified", + "description": "Azure Active Directory (AD) Privileged Identity Management (PIM) is a service that enables you to manage, control, and monitor access to important resources in an organization. PIM can be used to manage the built-in Azure resource roles such as Global Administrator and Application Administrator. An adversary may add a user to a PIM role in order to maintain persistence in their target's environment or modify a PIM role to weaken their target's security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Azure Privilege Identity Management Role Modified\n\nAzure Active Directory (AD) Privileged Identity Management (PIM) is a service that enables you to manage, control, and monitor access to important resources in an organization. PIM can be used to manage the built-in Azure resource roles such as Global Administrator and Application Administrator.\n\nThis rule identifies the update of PIM role settings, which can indicate that an attacker has already gained enough access to modify role assignment settings.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Consider the source IP address and geolocation for the user who issued the command. Do they look normal for the user?\n- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Examine the account's commands, API calls, and data management actions in the last 24 hours.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this activity didn't follow your organization's change management policies, it should be reviewed by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Restore the PIM roles to the desired state.\n- Consider enabling multi-factor authentication for users.\n- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 105, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/pim-resource-roles-assign-roles", + "https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/pim-configure" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "49fb6dc0-6637-4d1f-99d8-0ed9fd718bce", + "rule_id": "7882cebf-6cf1-4de3-9662-213aa13e8b80", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Update role setting in PIM\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Azure Key Vault Modified", + "description": "Identifies modifications to a Key Vault in Azure. The Key Vault is a service that safeguards encryption keys and secrets like certificates, connection strings, and passwords. Because this data is sensitive and business critical, access to key vaults should be secured to allow only authorized applications and users.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 103, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Key vault modifications may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Key vault modifications from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/key-vault/general/basic-concepts", + "https://docs.microsoft.com/en-us/azure/key-vault/general/secure-your-key-vault", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.001", + "name": "Credentials In Files", + "reference": "https://attack.mitre.org/techniques/T1552/001/" + } + ] + } + ] + } + ], + "id": "1186df76-5709-43c1-b487-9bccc3dd626f", + "rule_id": "792dd7a6-7e00-4a0a-8a9a-a7c24720b5ec", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.KEYVAULT/VAULTS/WRITE\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Potential Masquerading as System32 Executable", + "description": "Identifies suspicious instances of default system32 executables, either unsigned or signed with non-MS certificates. This could indicate the attempt to masquerade as system executables or backdoored and resigned legitimate executables.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "Data Source: Elastic Defend", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Persistence", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + }, + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1554", + "name": "Compromise Client Software Binary", + "reference": "https://attack.mitre.org/techniques/T1554/" + } + ] + } + ], + "id": "2714c730-9e22-4b9a-b67f-5d83d216857a", + "rule_id": "79ce2c96-72f7-44f9-88ef-60fa1ac2ce47", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and process.code_signature.status : \"*\" and\n process.name: (\n \"agentactivationruntimestarter.exe\", \"agentservice.exe\", \"aitstatic.exe\", \"alg.exe\", \"apphostregistrationverifier.exe\", \"appidcertstorecheck.exe\", \"appidpolicyconverter.exe\", \"appidtel.exe\", \"applicationframehost.exe\", \"applysettingstemplatecatalog.exe\", \"applytrustoffline.exe\", \"approvechildrequest.exe\", \"appvclient.exe\", \"appvdllsurrogate.exe\", \"appvnice.exe\", \"appvshnotify.exe\", \"arp.exe\", \"assignedaccessguard.exe\", \"at.exe\", \"atbroker.exe\", \"attrib.exe\", \"audiodg.exe\", \"auditpol.exe\", \"authhost.exe\", \"autochk.exe\", \"autoconv.exe\", \"autofmt.exe\", \"axinstui.exe\", \"baaupdate.exe\", \"backgroundtaskhost.exe\", \"backgroundtransferhost.exe\", \"bcdboot.exe\", \"bcdedit.exe\", \"bdechangepin.exe\", \"bdehdcfg.exe\", \"bdeuisrv.exe\", \"bdeunlock.exe\", \"bioiso.exe\", \"bitlockerdeviceencryption.exe\", \"bitlockerwizard.exe\", \"bitlockerwizardelev.exe\", \"bitsadmin.exe\", \"bootcfg.exe\", \"bootim.exe\", \"bootsect.exe\", \"bridgeunattend.exe\", \"browserexport.exe\", \"browser_broker.exe\", \"bthudtask.exe\", \"bytecodegenerator.exe\", \"cacls.exe\", \"calc.exe\", \"camerasettingsuihost.exe\", \"castsrv.exe\", \"certenrollctrl.exe\", \"certreq.exe\", \"certutil.exe\", \"change.exe\", \"changepk.exe\", \"charmap.exe\", \"checknetisolation.exe\", \"chglogon.exe\", \"chgport.exe\", \"chgusr.exe\", \"chkdsk.exe\", \"chkntfs.exe\", \"choice.exe\", \"cidiag.exe\", \"cipher.exe\", \"cleanmgr.exe\", \"cliconfg.exe\", \"clip.exe\", \"clipup.exe\", \"cloudexperiencehostbroker.exe\", \"cloudnotifications.exe\", \"cmd.exe\", \"cmdkey.exe\", \"cmdl32.exe\", \"cmmon32.exe\", \"cmstp.exe\", \"cofire.exe\", \"colorcpl.exe\", \"comp.exe\", \"compact.exe\", \"compattelrunner.exe\", \"compmgmtlauncher.exe\", \"comppkgsrv.exe\", \"computerdefaults.exe\", \"conhost.exe\", \"consent.exe\", \"control.exe\", \"convert.exe\", \"convertvhd.exe\", \"coredpussvr.exe\", \"credentialenrollmentmanager.exe\", \"credentialuibroker.exe\", \"credwiz.exe\", \"cscript.exe\", \"csrss.exe\", \"ctfmon.exe\", \"cttune.exe\", \"cttunesvr.exe\", \"custominstallexec.exe\", \"customshellhost.exe\", \"dashost.exe\", \"dataexchangehost.exe\", \"datastorecachedumptool.exe\", \"dccw.exe\", \"dcomcnfg.exe\", \"ddodiag.exe\", \"defrag.exe\", \"deploymentcsphelper.exe\", \"desktopimgdownldr.exe\", \"devicecensus.exe\", \"devicecredentialdeployment.exe\", \"deviceeject.exe\", \"deviceenroller.exe\", \"devicepairingwizard.exe\", \"deviceproperties.exe\", \"dfdwiz.exe\", \"dfrgui.exe\", \"dialer.exe\", \"directxdatabaseupdater.exe\", \"diskpart.exe\", \"diskperf.exe\", \"diskraid.exe\", \"disksnapshot.exe\", \"dism.exe\", \"dispdiag.exe\", \"displayswitch.exe\", \"djoin.exe\", \"dllhost.exe\", \"dllhst3g.exe\", \"dmcertinst.exe\", \"dmcfghost.exe\", \"dmclient.exe\", \"dmnotificationbroker.exe\", \"dmomacpmo.exe\", \"dnscacheugc.exe\", \"doskey.exe\", \"dpapimig.exe\", \"dpiscaling.exe\", \"dpnsvr.exe\", \"driverquery.exe\", \"drvinst.exe\", \"dsmusertask.exe\", \"dsregcmd.exe\", \"dstokenclean.exe\", \"dusmtask.exe\", \"dvdplay.exe\", \"dwm.exe\", \"dwwin.exe\", \"dxdiag.exe\", \"dxgiadaptercache.exe\", \"dxpserver.exe\", \"eap3host.exe\", \"easeofaccessdialog.exe\", \"easinvoker.exe\", \"easpolicymanagerbrokerhost.exe\", \"edpcleanup.exe\", \"edpnotify.exe\", \"eduprintprov.exe\", \"efsui.exe\", \"ehstorauthn.exe\", \"eoaexperiences.exe\", \"esentutl.exe\", \"eudcedit.exe\", \"eventcreate.exe\", \"eventvwr.exe\", \"expand.exe\", \"extrac32.exe\", \"fc.exe\", \"fclip.exe\", \"fhmanagew.exe\", \"filehistory.exe\", \"find.exe\", \"findstr.exe\", \"finger.exe\", \"fixmapi.exe\", \"fltmc.exe\", \"fodhelper.exe\", \"fondue.exe\", \"fontdrvhost.exe\", \"fontview.exe\", \"forfiles.exe\", \"fsavailux.exe\", \"fsiso.exe\", \"fsquirt.exe\", \"fsutil.exe\", \"ftp.exe\", \"fvenotify.exe\", \"fveprompt.exe\", \"gamebarpresencewriter.exe\", \"gamepanel.exe\", \"genvalobj.exe\", \"getmac.exe\", \"gpresult.exe\", \"gpscript.exe\", \"gpupdate.exe\", \"grpconv.exe\", \"hdwwiz.exe\", \"help.exe\", \"hostname.exe\", \"hvax64.exe\", \"hvix64.exe\", \"hvsievaluator.exe\", \"icacls.exe\", \"icsentitlementhost.exe\", \"icsunattend.exe\", \"ie4uinit.exe\", \"ie4ushowie.exe\", \"iesettingsync.exe\", \"ieunatt.exe\", \"iexpress.exe\", \"immersivetpmvscmgrsvr.exe\", \"infdefaultinstall.exe\", \"inputswitchtoasthandler.exe\", \"iotstartup.exe\", \"ipconfig.exe\", \"iscsicli.exe\", \"iscsicpl.exe\", \"isoburn.exe\", \"klist.exe\", \"ksetup.exe\", \"ktmutil.exe\", \"label.exe\", \"languagecomponentsinstallercomhandler.exe\", \"launchtm.exe\", \"launchwinapp.exe\", \"legacynetuxhost.exe\", \"licensemanagershellext.exe\", \"licensingdiag.exe\", \"licensingui.exe\", \"locationnotificationwindows.exe\", \"locator.exe\", \"lockapphost.exe\", \"lockscreencontentserver.exe\", \"lodctr.exe\", \"logagent.exe\", \"logman.exe\", \"logoff.exe\", \"logonui.exe\", \"lpkinstall.exe\", \"lpksetup.exe\", \"lpremove.exe\", \"lsaiso.exe\", \"lsass.exe\", \"magnify.exe\", \"makecab.exe\", \"manage-bde.exe\", \"mavinject.exe\", \"mbaeparsertask.exe\", \"mblctr.exe\", \"mbr2gpt.exe\", \"mcbuilder.exe\", \"mdeserver.exe\", \"mdmagent.exe\", \"mdmappinstaller.exe\", \"mdmdiagnosticstool.exe\", \"mdres.exe\", \"mdsched.exe\", \"mfpmp.exe\", \"microsoft.uev.cscunpintool.exe\", \"microsoft.uev.synccontroller.exe\", \"microsoftedgebchost.exe\", \"microsoftedgecp.exe\", \"microsoftedgedevtools.exe\", \"microsoftedgesh.exe\", \"mmc.exe\", \"mmgaserver.exe\", \"mobsync.exe\", \"mountvol.exe\", \"mousocoreworker.exe\", \"mpnotify.exe\", \"mpsigstub.exe\", \"mrinfo.exe\", \"mschedexe.exe\", \"msconfig.exe\", \"msdt.exe\", \"msdtc.exe\", \"msfeedssync.exe\", \"msg.exe\", \"mshta.exe\", \"msiexec.exe\", \"msinfo32.exe\", \"mspaint.exe\", \"msra.exe\", \"msspellcheckinghost.exe\", \"mstsc.exe\", \"mtstocom.exe\", \"muiunattend.exe\", \"multidigimon.exe\", \"musnotification.exe\", \"musnotificationux.exe\", \"musnotifyicon.exe\", \"narrator.exe\", \"nbtstat.exe\", \"ndadmin.exe\", \"ndkping.exe\", \"net.exe\", \"net1.exe\", \"netbtugc.exe\", \"netcfg.exe\", \"netcfgnotifyobjecthost.exe\", \"netevtfwdr.exe\", \"nethost.exe\", \"netiougc.exe\", \"netplwiz.exe\", \"netsh.exe\", \"netstat.exe\", \"newdev.exe\", \"ngciso.exe\", \"nltest.exe\", \"notepad.exe\", \"nslookup.exe\", \"ntoskrnl.exe\", \"ntprint.exe\", \"odbcad32.exe\", \"odbcconf.exe\", \"ofdeploy.exe\", \"omadmclient.exe\", \"omadmprc.exe\", \"openfiles.exe\", \"openwith.exe\", \"optionalfeatures.exe\", \"osk.exe\", \"pacjsworker.exe\", \"packagedcwalauncher.exe\", \"packageinspector.exe\", \"passwordonwakesettingflyout.exe\", \"pathping.exe\", \"pcalua.exe\", \"pcaui.exe\", \"pcwrun.exe\", \"perfmon.exe\", \"phoneactivate.exe\", \"pickerhost.exe\", \"pinenrollmentbroker.exe\", \"ping.exe\", \"pkgmgr.exe\", \"pktmon.exe\", \"plasrv.exe\", \"pnpunattend.exe\", \"pnputil.exe\", \"poqexec.exe\", \"pospaymentsworker.exe\", \"powercfg.exe\", \"presentationhost.exe\", \"presentationsettings.exe\", \"prevhost.exe\", \"printbrmui.exe\", \"printfilterpipelinesvc.exe\", \"printisolationhost.exe\", \"printui.exe\", \"proquota.exe\", \"provlaunch.exe\", \"provtool.exe\", \"proximityuxhost.exe\", \"prproc.exe\", \"psr.exe\", \"pwlauncher.exe\", \"qappsrv.exe\", \"qprocess.exe\", \"query.exe\", \"quser.exe\", \"qwinsta.exe\", \"rasautou.exe\", \"rasdial.exe\", \"raserver.exe\", \"rasphone.exe\", \"rdpclip.exe\", \"rdpinit.exe\", \"rdpinput.exe\", \"rdpsa.exe\", \"rdpsaproxy.exe\", \"rdpsauachelper.exe\", \"rdpshell.exe\", \"rdpsign.exe\", \"rdrleakdiag.exe\", \"reagentc.exe\", \"recdisc.exe\", \"recover.exe\", \"recoverydrive.exe\", \"refsutil.exe\", \"reg.exe\", \"regedt32.exe\", \"regini.exe\", \"register-cimprovider.exe\", \"regsvr32.exe\", \"rekeywiz.exe\", \"relog.exe\", \"relpost.exe\", \"remoteapplifetimemanager.exe\", \"remoteposworker.exe\", \"repair-bde.exe\", \"replace.exe\", \"reset.exe\", \"resetengine.exe\", \"resmon.exe\", \"rmactivate.exe\", \"rmactivate_isv.exe\", \"rmactivate_ssp.exe\", \"rmactivate_ssp_isv.exe\", \"rmclient.exe\", \"rmttpmvscmgrsvr.exe\", \"robocopy.exe\", \"route.exe\", \"rpcping.exe\", \"rrinstaller.exe\", \"rstrui.exe\", \"runas.exe\", \"rundll32.exe\", \"runexehelper.exe\", \"runlegacycplelevated.exe\", \"runonce.exe\", \"runtimebroker.exe\", \"rwinsta.exe\", \"sc.exe\", \"schtasks.exe\", \"scriptrunner.exe\", \"sdbinst.exe\", \"sdchange.exe\", \"sdclt.exe\", \"sdiagnhost.exe\", \"searchfilterhost.exe\", \"searchindexer.exe\", \"searchprotocolhost.exe\", \"secedit.exe\", \"secinit.exe\", \"securekernel.exe\", \"securityhealthhost.exe\", \"securityhealthservice.exe\", \"securityhealthsystray.exe\", \"sensordataservice.exe\", \"services.exe\", \"sessionmsg.exe\", \"sethc.exe\", \"setspn.exe\", \"settingsynchost.exe\", \"setupcl.exe\", \"setupugc.exe\", \"setx.exe\", \"sfc.exe\", \"sgrmbroker.exe\", \"sgrmlpac.exe\", \"shellappruntime.exe\", \"shrpubw.exe\", \"shutdown.exe\", \"sigverif.exe\", \"sihclient.exe\", \"sihost.exe\", \"slidetoshutdown.exe\", \"slui.exe\", \"smartscreen.exe\", \"smss.exe\", \"sndvol.exe\", \"snippingtool.exe\", \"snmptrap.exe\", \"sort.exe\", \"spaceagent.exe\", \"spaceman.exe\", \"spatialaudiolicensesrv.exe\", \"spectrum.exe\", \"spoolsv.exe\", \"sppextcomobj.exe\", \"sppsvc.exe\", \"srdelayed.exe\", \"srtasks.exe\", \"stordiag.exe\", \"subst.exe\", \"svchost.exe\", \"sxstrace.exe\", \"syncappvpublishingserver.exe\", \"synchost.exe\", \"sysreseterr.exe\", \"systeminfo.exe\", \"systempropertiesadvanced.exe\", \"systempropertiescomputername.exe\", \"systempropertiesdataexecutionprevention.exe\", \"systempropertieshardware.exe\", \"systempropertiesperformance.exe\", \"systempropertiesprotection.exe\", \"systempropertiesremote.exe\", \"systemreset.exe\", \"systemsettingsadminflows.exe\", \"systemsettingsbroker.exe\", \"systemsettingsremovedevice.exe\", \"systemuwplauncher.exe\", \"systray.exe\", \"tabcal.exe\", \"takeown.exe\", \"tapiunattend.exe\", \"tar.exe\", \"taskhostw.exe\", \"taskkill.exe\", \"tasklist.exe\", \"taskmgr.exe\", \"tcblaunch.exe\", \"tcmsetup.exe\", \"tcpsvcs.exe\", \"thumbnailextractionhost.exe\", \"tieringengineservice.exe\", \"timeout.exe\", \"tokenbrokercookies.exe\", \"tpminit.exe\", \"tpmtool.exe\", \"tpmvscmgr.exe\", \"tpmvscmgrsvr.exe\", \"tracerpt.exe\", \"tracert.exe\", \"tscon.exe\", \"tsdiscon.exe\", \"tskill.exe\", \"tstheme.exe\", \"tswbprxy.exe\", \"ttdinject.exe\", \"tttracer.exe\", \"typeperf.exe\", \"tzsync.exe\", \"tzutil.exe\", \"ucsvc.exe\", \"uevagentpolicygenerator.exe\", \"uevappmonitor.exe\", \"uevtemplatebaselinegenerator.exe\", \"uevtemplateconfigitemgenerator.exe\", \"uimgrbroker.exe\", \"unlodctr.exe\", \"unregmp2.exe\", \"upfc.exe\", \"upgraderesultsui.exe\", \"upnpcont.exe\", \"upprinterinstaller.exe\", \"useraccountbroker.exe\", \"useraccountcontrolsettings.exe\", \"userinit.exe\", \"usoclient.exe\", \"utcdecoderhost.exe\", \"utilman.exe\", \"vaultcmd.exe\", \"vds.exe\", \"vdsldr.exe\", \"verclsid.exe\", \"verifier.exe\", \"verifiergui.exe\", \"vssadmin.exe\", \"vssvc.exe\", \"w32tm.exe\", \"waasmedicagent.exe\", \"waitfor.exe\", \"wallpaperhost.exe\", \"wbadmin.exe\", \"wbengine.exe\", \"wecutil.exe\", \"werfault.exe\", \"werfaultsecure.exe\", \"wermgr.exe\", \"wevtutil.exe\", \"wextract.exe\", \"where.exe\", \"whoami.exe\", \"wiaacmgr.exe\", \"wiawow64.exe\", \"wifitask.exe\", \"wimserv.exe\", \"winbiodatamodeloobe.exe\", \"windows.media.backgroundplayback.exe\", \"windows.warp.jitservice.exe\", \"windowsactiondialog.exe\", \"windowsupdateelevatedinstaller.exe\", \"wininit.exe\", \"winload.exe\", \"winlogon.exe\", \"winresume.exe\", \"winrs.exe\", \"winrshost.exe\", \"winrtnetmuahostserver.exe\", \"winsat.exe\", \"winver.exe\", \"wkspbroker.exe\", \"wksprt.exe\", \"wlanext.exe\", \"wlrmdr.exe\", \"wmpdmc.exe\", \"workfolders.exe\", \"wowreg32.exe\", \"wpcmon.exe\", \"wpctok.exe\", \"wpdshextautoplay.exe\", \"wpnpinst.exe\", \"wpr.exe\", \"write.exe\", \"wscadminui.exe\", \"wscollect.exe\", \"wscript.exe\", \"wsl.exe\", \"wsmanhttpconfig.exe\", \"wsmprovhost.exe\", \"wsqmcons.exe\", \"wsreset.exe\", \"wuapihost.exe\", \"wuauclt.exe\", \"wudfcompanionhost.exe\", \"wudfhost.exe\", \"wusa.exe\", \"wwahost.exe\", \"xblgamesavetask.exe\", \"xcopy.exe\", \"xwizard.exe\", \"aggregatorhost.exe\", \"diskusage.exe\", \"dtdump.exe\", \"ism.exe\", \"ndkperfcmd.exe\", \"ntkrla57.exe\", \"securekernella57.exe\", \"spaceutil.exe\", \"configure-smremoting.exe\", \"dcgpofix.exe\", \"dcpromo.exe\", \"dimc.exe\", \"diskshadow.exe\", \"drvcfg.exe\", \"escunattend.exe\", \"iashost.exe\", \"ktpass.exe\", \"lbfoadmin.exe\", \"netdom.exe\", \"rdspnf.exe\", \"rsopprov.exe\", \"sacsess.exe\", \"servermanager.exe\", \"servermanagerlauncher.exe\", \"setres.exe\", \"tsecimp.exe\", \"vssuirun.exe\", \"webcache.exe\", \"win32calc.exe\", \"certoc.exe\", \"sdndiagnosticstask.exe\", \"xpsrchvw.exe\"\n ) and\n not (\n process.code_signature.subject_name in (\n \"Microsoft Windows\",\n \"Microsoft Corporation\",\n \"Microsoft Windows Publisher\"\n ) and process.code_signature.trusted == true\n ) and not process.code_signature.status: (\"errorCode_endpoint*\", \"errorUntrustedRoot\", \"errorChaining\") and\n not\n (\n process.executable: (\n \"?:\\\\Program Files\\\\Git\\\\usr\\\\bin\\\\hostname.exe\",\n \"?:\\\\Windows\\\\Temp\\\\{*}\\\\taskkill.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\{*}\\\\taskkill.exe\",\n \"?:\\\\$WINDOWS.~BT\\\\NewOS\\\\Windows\\\\System32\\\\ie4ushowIE.exe\",\n \"?:\\\\Program Files\\\\Git\\\\usr\\\\bin\\\\find.exe\"\n )\n ) and\n not\n (\n (process.name: \"ucsvc.exe\" and process.code_signature.subject_name == \"Wellbia.com Co., Ltd.\" and process.code_signature.status: \"trusted\") or\n (process.name: \"pnputil.exe\" and process.code_signature.subject_name: \"Lenovo\" and process.code_signature.status: \"trusted\")\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "GCP Service Account Creation", + "description": "Identifies when a new service account is created in Google Cloud Platform (GCP). A service account is a special type of account used by an application or a virtual machine (VM) instance, not a person. Applications use service accounts to make authorized API calls, authorized as either the service account itself, or as G Suite or Cloud Identity users through domain-wide delegation. If service accounts are not tracked and managed properly, they can present a security risk. An adversary may create a new service account to use during their operations in order to avoid using a standard user account and attempt to evade detection.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Identity and Access Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Service accounts can be created by system administrators. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/iam/docs/service-accounts" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/" + } + ] + } + ], + "id": "dc39f493-5289-4028-9299-df4b76eef296", + "rule_id": "7ceb2216-47dd-4e64-9433-cddc99727623", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.CreateServiceAccount and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Discovery of Internet Capabilities via Built-in Tools", + "description": "Identifies the use of built-in tools attackers can use to check for Internet connectivity on compromised systems. These results may be used to determine communication capabilities with C2 servers, or to identify routes, redirectors, and proxy servers.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 101, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1016", + "name": "System Network Configuration Discovery", + "reference": "https://attack.mitre.org/techniques/T1016/", + "subtechnique": [ + { + "id": "T1016.001", + "name": "Internet Connection Discovery", + "reference": "https://attack.mitre.org/techniques/T1016/001/" + } + ] + } + ] + } + ], + "id": "af81c7fa-9a93-4bfb-9b08-451494743918", + "rule_id": "7f89afef-9fc5-4e7b-bf16-75ffdf27f8db", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name.caseless", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type:windows and event.category:process and event.type:start and \nprocess.name.caseless:(\"ping.exe\" or \"tracert.exe\" or \"pathping.exe\") and\nnot process.args:(\"127.0.0.1\" or \"0.0.0.0\" or \"localhost\" or \"1.1.1.1\" or \"1.2.3.4\" or \"::1\")\n", + "new_terms_fields": [ + "host.id", + "user.id", + "process.command_line" + ], + "history_window_start": "now-14d", + "index": [ + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "Unusual Process Extension", + "description": "Identifies processes running with unusual extensions that are not typically valid for Windows executables.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.008", + "name": "Masquerade File Type", + "reference": "https://attack.mitre.org/techniques/T1036/008/" + } + ] + } + ] + } + ], + "id": "d1fd97db-e1c8-42c6-b5ba-a1cb7d604d5b", + "rule_id": "800e01be-a7a4-46d0-8de9-69f3c9582b44", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.executable : \"?*\" and \n not process.name : (\"*.exe\", \"*.com\", \"*.scr\", \"*.tmp\", \"*.dat\") and\n not process.executable : \n (\n \"MemCompression\",\n \"Registry\",\n \"vmmem\",\n \"vmmemWSL\",\n \"?:\\\\Program Files\\\\Dell\\\\SupportAssistAgent\\\\*.p5x\",\n \"?:\\\\Program Files\\\\Docker\\\\Docker\\\\com.docker.service\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Intel\\\\AGS\\\\Libs\\\\AGSRunner.bin\"\n ) and\n not (\n (process.name : \"C9632CF058AE4321B6B0B5EA39B710FE\" and process.code_signature.subject_name == \"Dell Inc\") or\n (process.name : \"*.upd\" and process.code_signature.subject_name == \"Bloomberg LP\") or\n (process.name: \"FD552E21-686E-413C-931D-3B82A9D29F3B\" and process.code_signature.subject_name: \"Adobe Inc.\") or\n (process.name: \"3B91051C-AE82-43C9-BCEF-0309CD2DD9EB\" and process.code_signature.subject_name: \"McAfee, LLC\")\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Process Injection - Detected - Elastic Endgame", + "description": "Elastic Endgame detected Process Injection. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + } + ], + "id": "200bc9ad-5c8a-4a3f-81d0-c4bfd0179cea", + "rule_id": "80c52164-c82a-402c-9964-852533d58be1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:kernel_shellcode_event or endgame.event_subtype_full:kernel_shellcode_event)\n", + "language": "kuery" + }, + { + "name": "Azure Kubernetes Pods Deleted", + "description": "Identifies the deletion of Azure Kubernetes Pods. Adversaries may delete a Kubernetes pod to disrupt the normal behavior of the environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Asset Visibility", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Pods may be deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Pods deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftkubernetes" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [] + } + ], + "id": "7d939e11-493e-4b8e-bc0c-d6c05584faac", + "rule_id": "83a1931d-8136-46fc-b7b9-2db4f639e014", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/PODS/DELETE\" and\nevent.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Potential Suspicious Clipboard Activity Detected", + "description": "This rule monitors for the usage of the most common clipboard utilities on unix systems by an uncommon process group leader. Adversaries may collect data stored in the clipboard from users copying information within or between applications.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Collection", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1115", + "name": "Clipboard Data", + "reference": "https://attack.mitre.org/techniques/T1115/" + } + ] + } + ], + "id": "e92a91c8-f9b6-4e98-823b-0c18628badbb", + "rule_id": "884e87cc-c67b-4c90-a4ed-e1e24a940c82", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "new_terms", + "query": "event.category:process and host.os.type:\"linux\" and event.action:\"exec\" and event.type:\"start\" and \nprocess.name:(\"xclip\" or \"xsel\" or \"wl-clipboard\" or \"clipman\" or \"copyq\")\n", + "new_terms_fields": [ + "host.id", + "process.group_leader.executable" + ], + "history_window_start": "now-7d", + "index": [ + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "Microsoft 365 Global Administrator Role Assigned", + "description": "In Azure Active Directory (Azure AD), permissions to manage resources are assigned using roles. The Global Administrator is a role that enables users to have access to all administrative features in Azure AD and services that use Azure AD identities like the Microsoft 365 Defender portal, the Microsoft 365 compliance center, Exchange, SharePoint Online, and Skype for Business Online. Attackers can add users as Global Administrators to maintain access and manage all subscriptions and their settings and resources.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Identity and Access Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/azure/active-directory/roles/permissions-reference#global-administrator" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.003", + "name": "Additional Cloud Roles", + "reference": "https://attack.mitre.org/techniques/T1098/003/" + } + ] + } + ] + } + ], + "id": "13150220-70a9-4edd-8e4f-96c544d7fdfc", + "rule_id": "88671231-6626-4e1b-abb7-6e361a171fbb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "o365.audit.ModifiedProperties.Role_DisplayName.NewValue", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.code:\"AzureActiveDirectory\" and event.action:\"Add member to role.\" and\no365.audit.ModifiedProperties.Role_DisplayName.NewValue:\"Global Administrator\"\n", + "language": "kuery" + }, + { + "name": "Potential Sudo Privilege Escalation via CVE-2019-14287", + "description": "This rule monitors for the execution of a suspicious sudo command that is leveraged in CVE-2019-14287 to escalate privileges to root. Sudo does not verify the presence of the designated user ID and proceeds to execute using a user ID that can be chosen arbitrarily. By using the sudo privileges, the command \"sudo -u#-1\" translates to an ID of 0, representing the root user. This exploit may work for sudo versions prior to v1.28.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend", + "Use Case: Vulnerability" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.exploit-db.com/exploits/47502" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + } + ] + } + ], + "id": "cbf5a1c4-1b8d-444f-bb30-981ae656d00b", + "rule_id": "8af5b42f-8d74-48c8-a8d0-6d14b4197288", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"sudo\" and process.args == \"-u#-1\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Azure Kubernetes Events Deleted", + "description": "Identifies when events are deleted in Azure Kubernetes. Kubernetes events are objects that log any state changes. Example events are a container creation, an image pull, or a pod scheduling on a node. An adversary may delete events in Azure Kubernetes in an attempt to evade detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Log Auditing", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Events deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Events deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftkubernetes" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "f0a7c2ae-2e70-4717-8afc-305f215ce1c2", + "rule_id": "8b64d36a-1307-4b2e-a77b-a0027e4d27c8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/EVENTS.K8S.IO/EVENTS/DELETE\" and\nevent.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Ransomware - Detected - Elastic Endgame", + "description": "Elastic Endgame detected ransomware. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 99, + "severity": "critical", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [], + "id": "78800a96-e519-45e0-be0e-d097e6f535fe", + "rule_id": "8cb4f625-7743-4dfb-ae1b-ad92be9df7bd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:ransomware_event or endgame.event_subtype_full:ransomware_event)\n", + "language": "kuery" + }, + { + "name": "Suspicious Interactive Shell Spawned From Inside A Container", + "description": "This rule detects when an interactive shell is spawned inside a running container. This could indicate a potential container breakout attempt or an attacker's attempt to gain unauthorized access to the underlying host.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Legitimate users and processes, such as system administration tools, may utilize shell utilities inside a container resulting in false positives." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "c95b3300-6630-4914-9069-0423d7a8f986", + "rule_id": "8d3d0794-c776-476b-8674-ee2e685f6470", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entry_leader.same_as_process", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where container.id: \"*\" and\nevent.type== \"start\" and \n\n/*D4C consolidates closely spawned event.actions, this excludes end actions to only capture ongoing processes*/\nevent.action in (\"fork\", \"exec\") and event.action != \"end\"\n and process.entry_leader.same_as_process== false and\n(\n(process.executable: \"*/*sh\" and process.args: (\"-i\", \"-it\")) or\nprocess.args: \"*/*sh\"\n)\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "Azure Automation Runbook Deleted", + "description": "Identifies when an Azure Automation runbook is deleted. An adversary may delete an Azure Automation runbook in order to disrupt their target's automated business operations or to remove a malicious runbook for defense evasion.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://powerzure.readthedocs.io/en/latest/Functions/operational.html#create-backdoor", + "https://github.com/hausec/PowerZure", + "https://posts.specterops.io/attacking-azure-azure-ad-and-introducing-powerzure-ca70b330511a", + "https://azure.microsoft.com/en-in/blog/azure-automation-runbook-management/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [] + } + ], + "id": "f468d87b-f376-43a0-aca4-e2a9fc3b901e", + "rule_id": "8ddab73b-3d15-4e5d-9413-47f05553c1d7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and\n azure.activitylogs.operation_name:\"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/RUNBOOKS/DELETE\" and\n event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "GCP Service Account Deletion", + "description": "Identifies when a service account is deleted in Google Cloud Platform (GCP). A service account is a special type of account used by an application or a virtual machine (VM) instance, not a person. Applications use service accounts to make authorized API calls, authorized as either the service account itself, or as G Suite or Cloud Identity users through domain-wide delegation. An adversary may delete a service account in order to disrupt their target's business operations.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Identity and Access Audit", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Service accounts may be deleted by system administrators. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/iam/docs/service-accounts" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1531", + "name": "Account Access Removal", + "reference": "https://attack.mitre.org/techniques/T1531/" + } + ] + } + ], + "id": "3140d4ea-32cd-43bf-871f-b63a5fa99f44", + "rule_id": "8fb75dda-c47a-4e34-8ecd-34facf7aad13", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.DeleteServiceAccount and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "GCP Virtual Private Cloud Route Creation", + "description": "Identifies when a virtual private cloud (VPC) route is created in Google Cloud Platform (GCP). Google Cloud routes define the paths that network traffic takes from a virtual machine (VM) instance to other destinations. These destinations can be inside a Google VPC network or outside it. An adversary may create a route in order to impact the flow of network traffic in their target's cloud environment.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Virtual Private Cloud routes may be created by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/vpc/docs/routes", + "https://cloud.google.com/vpc/docs/using-routes" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "e4e74612-2584-4206-99ba-f74650ce89ad", + "rule_id": "9180ffdf-f3d0-4db3-bf66-7a14bcff71b8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:(v*.compute.routes.insert or \"beta.compute.routes.insert\")\n", + "language": "kuery" + }, + { + "name": "PowerShell Suspicious Script with Screenshot Capabilities", + "description": "Detects PowerShell scripts that can take screenshots, which is a common feature in post-exploitation kits and remote access tools (RATs).", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating PowerShell Suspicious Script with Screenshot Capabilities\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks, which makes it available for use in various environments and creates an attractive way for attackers to execute code.\n\nAttackers can abuse PowerShell capabilities and take screen captures of desktops to gather information over the course of an operation.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Determine whether the script stores the captured data locally.\n- Investigate whether the script contains exfiltration capabilities and identify the exfiltration server.\n- Assess network data to determine if the host communicated with the exfiltration server.\n\n### False positive analysis\n\n- Regular users do not have a business justification for using scripting utilities to take screenshots, which makes false positives unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Related rules\n\n- PowerShell Keylogging Script - bd2c86a0-8b61-4457-ab38-96943984e889\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/dotnet/api/system.drawing.graphics.copyfromscreen" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1113", + "name": "Screen Capture", + "reference": "https://attack.mitre.org/techniques/T1113/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "82ee57d4-867c-4ac8-aaed-1695f228a122", + "rule_id": "959a7353-1129-4aa7-9084-30746b256a70", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n CopyFromScreen and\n (\"System.Drawing.Bitmap\" or \"Drawing.Bitmap\")\n ) and not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "Sensitive Keys Or Passwords Searched For Inside A Container", + "description": "This rule detects the use of system search utilities like grep and find to search for private SSH keys or passwords inside a container. Unauthorized access to these sensitive files could lead to further compromise of the container environment or facilitate a container breakout to the underlying host machine.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://sysdig.com/blog/cve-2021-25741-kubelet-falco/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.001", + "name": "Credentials In Files", + "reference": "https://attack.mitre.org/techniques/T1552/001/" + } + ] + } + ] + } + ], + "id": "bd327baa-3465-4d3d-88ee-c55853b0a49a", + "rule_id": "9661ed8b-001c-40dc-a777-0983b7b0c91a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where container.id: \"*\" and event.type== \"start\" and\n((\n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/ \n (process.name in (\"grep\", \"egrep\", \"fgrep\") or process.args in (\"grep\", \"egrep\", \"fgrep\")) \n and process.args : (\"*BEGIN PRIVATE*\", \"*BEGIN OPENSSH PRIVATE*\", \"*BEGIN RSA PRIVATE*\", \n\"*BEGIN DSA PRIVATE*\", \"*BEGIN EC PRIVATE*\", \"*pass*\", \"*ssh*\", \"*user*\")\n) \nor \n(\n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/\n (process.name in (\"find\", \"locate\", \"mlocate\") or process.args in (\"find\", \"locate\", \"mlocate\")) \n and process.args : (\"*id_rsa*\", \"*id_dsa*\")\n))\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "SeDebugPrivilege Enabled by a Suspicious Process", + "description": "Identifies the creation of a process running as SYSTEM and impersonating a Windows core binary privileges. Adversaries may create a new process with a different token to escalate privileges and bypass access controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 4, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4703", + "https://blog.palantir.com/windows-privilege-abuse-auditing-detection-and-defense-3078a403d74e" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/" + } + ] + } + ], + "id": "75129c0b-6af8-4d9e-a2ff-9921f557b6cb", + "rule_id": "97020e61-e591-4191-8a3b-2861a2b887cd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.EnabledPrivilegeList", + "type": "unknown", + "ecs": false + }, + { + "name": "winlog.event_data.ProcessName", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.event_data.SubjectUserSid", + "type": "keyword", + "ecs": false + } + ], + "setup": "Windows Event 4703 logs Token Privileges changes and need to be configured (Enable).\n\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDetailed Tracking >\nToken Right Adjusted Events (Success)\n```", + "type": "eql", + "query": "any where host.os.type == \"windows\" and event.provider: \"Microsoft-Windows-Security-Auditing\" and\n event.action : \"Token Right Adjusted Events\" and\n\n winlog.event_data.EnabledPrivilegeList : \"SeDebugPrivilege\" and\n\n /* exclude processes with System Integrity */\n not winlog.event_data.SubjectUserSid : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\") and\n\n not winlog.event_data.ProcessName :\n (\"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\lsass.exe\",\n \"?:\\\\Windows\\\\WinSxS\\\\*\",\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\MRT.exe\",\n \"?:\\\\Windows\\\\System32\\\\cleanmgr.exe\",\n \"?:\\\\Windows\\\\System32\\\\taskhostw.exe\",\n \"?:\\\\Windows\\\\System32\\\\mmc.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\*-*\\\\DismHost.exe\",\n \"?:\\\\Windows\\\\System32\\\\auditpol.exe\",\n \"?:\\\\Windows\\\\System32\\\\wbem\\\\WmiPrvSe.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\wbem\\\\WmiPrvSe.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ] + }, + { + "name": "Microsoft 365 Exchange Anti-Phish Rule Modification", + "description": "Identifies the modification of an anti-phishing rule in Microsoft 365. By default, Microsoft 365 includes built-in features that help protect users from phishing attacks. Anti-phishing rules increase this protection by refining settings to better detect and prevent attacks.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "An anti-phishing rule may be deleted by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-antiphishrule?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-antiphishrule?view=exchange-ps" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/" + } + ] + } + ], + "id": "d08f0060-1880-4aa7-9507-03f02042ee43", + "rule_id": "97314185-2568-4561-ae81-f3e480e5e695", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:(\"Remove-AntiPhishRule\" or \"Disable-AntiPhishRule\") and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "GCP Storage Bucket Configuration Modification", + "description": "Identifies when the configuration is modified for a storage bucket in Google Cloud Platform (GCP). An adversary may modify the configuration of a storage bucket in order to weaken the security controls of their target's environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Identity and Access Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Storage bucket configuration may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/storage/docs/key-terms#buckets" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1578", + "name": "Modify Cloud Compute Infrastructure", + "reference": "https://attack.mitre.org/techniques/T1578/" + } + ] + } + ], + "id": "465673f3-023d-4696-b7ca-14860e09a688", + "rule_id": "97359fd8-757d-4b1d-9af1-ef29e4a8680e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:\"storage.buckets.update\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Google Workspace Drive Encryption Key(s) Accessed from Anonymous User", + "description": "Detects when an external (anonymous) user has viewed, copied or downloaded an encryption key file from a Google Workspace drive. Adversaries may gain access to encryption keys stored in private drives from rogue access links that do not have an expiration. Access to encryption keys may allow adversaries to access sensitive data or authenticate on behalf of users.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 2, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Configuration Audit", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A user may generate a shared access link to encryption key files to share with others. It is unlikely that the intended recipient is an external or anonymous user." + ], + "references": [ + "https://support.google.com/drive/answer/2494822" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.004", + "name": "Private Keys", + "reference": "https://attack.mitre.org/techniques/T1552/004/" + } + ] + } + ] + } + ], + "id": "7a65df21-dede-4079-a871-227d2c4d9d3d", + "rule_id": "980b70a0-c820-11ed-8799-f661ea17fbcc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.drive.visibility", + "type": "unknown", + "ecs": false + }, + { + "name": "source.user.email", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "eql", + "query": "file where event.dataset == \"google_workspace.drive\" and event.action : (\"copy\", \"view\", \"download\") and\n google_workspace.drive.visibility: \"people_with_link\" and source.user.email == \"\" and\n file.extension: (\n \"token\",\"assig\", \"pssc\", \"keystore\", \"pub\", \"pgp.asc\", \"ps1xml\", \"pem\", \"gpg.sig\", \"der\", \"key\",\n \"p7r\", \"p12\", \"asc\", \"jks\", \"p7b\", \"signature\", \"gpg\", \"pgp.sig\", \"sst\", \"pgp\", \"gpgz\", \"pfx\", \"crt\",\n \"p8\", \"sig\", \"pkcs7\", \"jceks\", \"pkcs8\", \"psc1\", \"p7c\", \"csr\", \"cer\", \"spc\", \"ps2xml\")\n", + "language": "eql", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ] + }, + { + "name": "GCP IAM Service Account Key Deletion", + "description": "Identifies the deletion of an Identity and Access Management (IAM) service account key in Google Cloud Platform (GCP). Each service account is associated with two sets of public/private RSA key pairs that are used to authenticate. If a key is deleted, the application will no longer be able to access Google Cloud resources using that key. A security best practice is to rotate your service account keys regularly.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Identity and Access Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Service account key deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Key deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/iam/docs/service-accounts", + "https://cloud.google.com/iam/docs/creating-managing-service-account-keys" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "686712c9-90f1-4725-a95f-bfe49a577b07", + "rule_id": "9890ee61-d061-403d-9bf6-64934c51f638", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.DeleteServiceAccountKey and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 Exchange Management Group Role Assignment", + "description": "Identifies when a new role is assigned to a management group in Microsoft 365. An adversary may attempt to add a role in order to maintain persistence in an environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Identity and Access Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A new role may be assigned to a management group by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/new-managementroleassignment?view=exchange-ps", + "https://docs.microsoft.com/en-us/microsoft-365/admin/add-users/about-admin-roles?view=o365-worldwide" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "1e60527c-2b21-47f7-8d08-1239d8a62182", + "rule_id": "98995807-5b09-4e37-8a54-5cae5dc932d7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"New-ManagementRoleAssignment\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Process Injection - Prevented - Elastic Endgame", + "description": "Elastic Endgame prevented Process Injection. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + } + ], + "id": "ec1e055a-550b-45bc-8e18-a1926a06f534", + "rule_id": "990838aa-a953-4f3e-b3cb-6ddf7584de9e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:kernel_shellcode_event or endgame.event_subtype_full:kernel_shellcode_event)\n", + "language": "kuery" + }, + { + "name": "GCP Pub/Sub Topic Creation", + "description": "Identifies the creation of a topic in Google Cloud Platform (GCP). In GCP, the publisher-subscriber relationship (Pub/Sub) is an asynchronous messaging service that decouples event-producing and event-processing services. A topic is used to forward messages from publishers to subscribers.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Log Auditing", + "Tactic: Collection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Topic creations may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Topic creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/pubsub/docs/admin" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1530", + "name": "Data from Cloud Storage", + "reference": "https://attack.mitre.org/techniques/T1530/" + } + ] + } + ], + "id": "2a92984e-0fd1-436b-bea4-1c60a07534a6", + "rule_id": "a10d3d9d-0f65-48f1-8b25-af175e2594f5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.pubsub.v*.Publisher.CreateTopic and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential LSASS Clone Creation via PssCaptureSnapShot", + "description": "Identifies the creation of an LSASS process clone via PssCaptureSnapShot where the parent process is the initial LSASS process instance. This may indicate an attempt to evade detection and dump LSASS memory for credential access.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Sysmon Only" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.matteomalvica.com/blog/2019/12/02/win-defender-atp-cred-bypass/", + "https://medium.com/@Achilles8284/the-birth-of-a-process-part-2-97c6fb9c42a2" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "f2b196e2-538d-48d9-bdda-156bbf4715f1", + "rule_id": "a16612dd-b30e-4d41-86a0-ebe70974ec00", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "This is meant to run only on datasources using Windows security event 4688 that captures the process clone creation.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.code:\"4688\" and\n process.executable : \"?:\\\\Windows\\\\System32\\\\lsass.exe\" and\n process.parent.executable : \"?:\\\\Windows\\\\System32\\\\lsass.exe\"\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ] + }, + { + "name": "GCP Virtual Private Cloud Route Deletion", + "description": "Identifies when a Virtual Private Cloud (VPC) route is deleted in Google Cloud Platform (GCP). Google Cloud routes define the paths that network traffic takes from a virtual machine (VM) instance to other destinations. These destinations can be inside a Google VPC network or outside it. An adversary may delete a route in order to impact the flow of network traffic in their target's cloud environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Virtual Private Cloud routes may be deleted by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/vpc/docs/routes", + "https://cloud.google.com/vpc/docs/using-routes" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "0f6d5f97-a775-4436-a989-9ff739a0fc8f", + "rule_id": "a17bcc91-297b-459b-b5ce-bc7460d8f82a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:v*.compute.routes.delete and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "My First Rule", + "description": "This rule helps you test and practice using alerts with Elastic Security as you get set up. It’s not a sign of threat activity.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "This is a test alert.\n\nThis alert does not show threat activity. Elastic created this alert to help you understand how alerts work.\n\nFor normal rules, the Investigation Guide will help analysts investigate alerts.\n\nThis alert will show once every 24 hours for each host. It is safe to disable this rule.\n", + "version": 2, + "tags": [ + "Use Case: Guided Onboarding", + "Data Source: APM", + "OS: Windows", + "Data Source: Elastic Endgame" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "24h", + "from": "now-24h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "This rule is not looking for threat activity. Disable the rule if you're already familiar with alerts." + ], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-rules.html" + ], + "max_signals": 1, + "threat": [], + "id": "c51bd824-e819-4e36-a215-4c21bf03e05e", + "rule_id": "a198fbbd-9413-45ec-a269-47ae4ccf59ce", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.kind", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "event.kind:event\n", + "threshold": { + "field": [ + "host.name" + ], + "value": 1 + }, + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "logs-*", + "packetbeat-*", + "traces-apm*", + "winlogbeat-*", + "-*elastic-cloud-logs-*" + ], + "language": "kuery" + }, + { + "name": "Linux Group Creation", + "description": "Identifies attempts to create a new group. Attackers may create new groups to establish persistence on a system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Linux Group Creation\n\nThe `groupadd` and `addgroup` commands are used to create new user groups in Linux-based operating systems.\n\nAttackers may create new groups to maintain access to victim systems or escalate privileges by assigning a compromised account to a privileged group.\n\nThis rule identifies the usages of `groupadd` and `addgroup` to create new groups.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible investigation steps\n\n- Investigate whether the group was created succesfully.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific Group\",\"query\":\"SELECT * FROM groups WHERE groupname = {{group.name}}\"}}\n- Identify if a user account was added to this group after creation.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific User\",\"query\":\"SELECT * FROM users WHERE username = {{user.name}}\"}}\n- Investigate whether the user is currently logged in and active.\n - !{osquery{\"label\":\"Osquery - Investigate the Account Authentication Status\",\"query\":\"SELECT * FROM logged_in_users WHERE user = {{user.name}}\"}}\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Group creation is a common administrative task, so there is a high chance of the activity being legitimate. Before investigating further, verify that this activity is not benign.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Delete the created group and, in case an account was added to this group, delete the account.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1136/001/" + } + ] + } + ] + } + ], + "id": "554f4c13-1519-438f-b8ef-6cfe8b5ab152", + "rule_id": "a1c2589e-0c8c-4ca8-9eb6-f83c4bbdbe8f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "group.name", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "iam where host.os.type == \"linux\" and (event.type == \"group\" and event.type == \"creation\") and\nprocess.name in (\"groupadd\", \"addgroup\") and group.name != null\n", + "language": "eql", + "index": [ + "logs-system.auth-*" + ] + }, + { + "name": "Netcat Listener Established Inside A Container", + "description": "This rule detects an established netcat listener running inside a container. Netcat is a utility used for reading and writing data across network connections, and it can be used for malicious purposes such as establishing a backdoor for persistence or exfiltrating data.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "There is a potential for false positives if the container is used for legitimate tasks that require the use of netcat, such as network troubleshooting, testing or system monitoring. It is important to investigate any alerts generated by this rule to determine if they are indicative of malicious activity or part of legitimate container activity." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "7f9f3031-6312-4f6d-ae6a-4c3d9ad1574a", + "rule_id": "a52a9439-d52c-401c-be37-2785235c6547", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where container.id: \"*\" and event.type== \"start\" \nand event.action in (\"fork\", \"exec\") and \n(\nprocess.name:(\"nc\",\"ncat\",\"netcat\",\"netcat.openbsd\",\"netcat.traditional\") or\n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/\nprocess.args: (\"nc\",\"ncat\",\"netcat\",\"netcat.openbsd\",\"netcat.traditional\")\n) and (\n /* bind shell to echo for command execution */\n (process.args:(\"-*l*\", \"--listen\", \"-*p*\", \"--source-port\") and process.args:(\"-c\", \"--sh-exec\", \"-e\", \"--exec\", \"echo\",\"$*\"))\n /* bind shell to specific port */\n or process.args:(\"-*l*\", \"--listen\", \"-*p*\", \"--source-port\")\n )\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "Potential Reverse Shell via UDP", + "description": "This detection rule identifies suspicious network traffic patterns associated with UDP reverse shell activity. This activity consists of a sample of an execve, socket and connect syscall executed by the same process, where the auditd.data.a0-1 indicate a UDP connection, ending with an egress connection event. An attacker may establish a Linux UDP reverse shell to bypass traditional firewall restrictions and gain remote access to a target system covertly.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1071", + "name": "Application Layer Protocol", + "reference": "https://attack.mitre.org/techniques/T1071/" + } + ] + } + ], + "id": "35f09ff7-bb72-4ca3-a083-4a044c20b31a", + "rule_id": "a5eb21b7-13cc-4b94-9fe2-29bb2914e037", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "auditd_manager", + "version": "^1.0.0", + "integration": "auditd" + } + ], + "required_fields": [ + { + "name": "auditd.data.a0", + "type": "unknown", + "ecs": false + }, + { + "name": "auditd.data.a1", + "type": "unknown", + "ecs": false + }, + { + "name": "auditd.data.syscall", + "type": "unknown", + "ecs": false + }, + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "network.direction", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.pid", + "type": "long", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in either from Auditbeat integration, or Auditd Manager integration.\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n### Auditd Manager Integration Setup\nThe Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.\nAuditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.\n\n#### The following steps should be executed in order to add the Elastic Agent System integration \"auditd_manager\" on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Auditd Manager and select the integration to see more details about it.\n- Click Add Auditd Manager.\n- Configure the integration name and optionally add a description.\n- Review optional and advanced settings accordingly.\n- Add the newly installed `auditd manager` to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.\n- Click Save and Continue.\n- For more details on the integeration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).\n\n#### Rule Specific Setup Note\nAuditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.\nHowever, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n- For this detection rule no additional audit rules are required to be added to the integration.\n\n", + "type": "eql", + "query": "sample by host.id, process.pid, process.parent.pid\n[process where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n auditd.data.syscall == \"execve\" and process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\",\n \"csh\", \"zsh\", \"ksh\", \"fish\", \"perl\", \"python*\", \"nc\", \"ncat\", \"netcat\", \"php*\", \"ruby\",\n \"openssl\", \"awk\", \"telnet\", \"lua*\", \"socat\")]\n[process where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n auditd.data.syscall == \"socket\" and process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\",\n \"zsh\", \"ksh\", \"fish\", \"perl\", \"python*\", \"nc\", \"ncat\", \"netcat\", \"php*\", \"ruby\", \"openssl\",\n \"awk\", \"telnet\", \"lua*\", \"socat\") and auditd.data.a0 == \"2\" and auditd.data.a1 : (\"2\", \"802\")]\n[network where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n auditd.data.syscall == \"connect\" and process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\",\n \"zsh\", \"ksh\", \"fish\", \"perl\", \"python*\", \"nc\", \"ncat\", \"netcat\", \"php*\", \"ruby\", \"openssl\",\n \"awk\", \"telnet\", \"lua*\", \"socat\") and network.direction == \"egress\" and destination.ip != null and \n destination.ip != \"127.0.0.1\" and destination.ip != \"127.0.0.53\" and destination.ip != \"::1\"]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-auditd_manager.auditd-*" + ] + }, + { + "name": "Azure Active Directory PowerShell Sign-in", + "description": "Identifies a sign-in using the Azure Active Directory PowerShell module. PowerShell for Azure Active Directory allows for managing settings from the command line, which is intended for users who are members of an admin role.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Azure Active Directory PowerShell Sign-in\n\nAzure Active Directory PowerShell for Graph (Azure AD PowerShell) is a module IT professionals commonly use to manage their Azure Active Directory. The cmdlets in the Azure AD PowerShell module enable you to retrieve data from the directory, create new objects in the directory, update existing objects, remove objects, as well as configure the directory and its features.\n\nThis rule identifies sign-ins that use the Azure Active Directory PowerShell module, which can indicate unauthorized access if done outside of IT or engineering.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Evaluate whether the user needs to access Azure AD using PowerShell to complete its tasks.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Consider the source IP address and geolocation for the involved user account. Do they look normal?\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate suspicious actions taken by the user using the module, for example, modifications in security settings that weakens the security policy, persistence-related tasks, and data access.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding IT, Engineering, and other authorized users as exceptions — preferably with a combination of user and device conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 105, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Sign-ins using PowerShell may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be signing into your environment. Sign-ins from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/", + "https://docs.microsoft.com/en-us/microsoft-365/enterprise/connect-to-microsoft-365-powershell?view=o365-worldwide" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/", + "subtechnique": [ + { + "id": "T1078.004", + "name": "Cloud Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/004/" + } + ] + } + ] + } + ], + "id": "03d18f6a-7810-44b8-a769-7d6e5780d874", + "rule_id": "a605c51a-73ad-406d-bf3a-f24cc41d5c97", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.signinlogs.properties.app_display_name", + "type": "keyword", + "ecs": false + }, + { + "name": "azure.signinlogs.properties.token_issuer_type", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.signinlogs and\n azure.signinlogs.properties.app_display_name:\"Azure Active Directory PowerShell\" and\n azure.signinlogs.properties.token_issuer_type:AzureAD and event.outcome:(success or Success)\n", + "language": "kuery" + }, + { + "name": "Web Application Suspicious Activity: POST Request Declined", + "description": "A POST request to a web application returned a 403 response, which indicates the web application declined to process the request because the action requested was not allowed.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 102, + "tags": [ + "Data Source: APM" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Security scans and tests may result in these errors. Misconfigured or buggy applications may produce large numbers of these errors. If the source is unexpected, the user unauthorized, or the request unusual, these may indicate suspicious or malicious activity." + ], + "references": [ + "https://en.wikipedia.org/wiki/HTTP_403" + ], + "max_signals": 100, + "threat": [], + "id": "16068873-c11f-438a-b538-793914a25813", + "rule_id": "a87a4e42-1d82-44bd-b0bf-d9b7f91fb89e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "apm", + "version": "^8.0.0" + } + ], + "required_fields": [ + { + "name": "http.request.method", + "type": "keyword", + "ecs": true + }, + { + "name": "http.response.status_code", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "apm-*-transaction*", + "traces-apm*" + ], + "query": "http.response.status_code:403 and http.request.method:post\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 Exchange Safe Link Policy Disabled", + "description": "Identifies when a Safe Link policy is disabled in Microsoft 365. Safe Link policies for Office applications extend phishing protection to documents that contain hyperlinks, even after they have been delivered to a user.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Identity and Access Audit", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Disabling safe links may be done by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-safelinksrule?view=exchange-ps", + "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/atp-safe-links?view=o365-worldwide" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/" + } + ] + } + ], + "id": "4d4935ae-9bc9-4e92-9cff-e513e1d1b641", + "rule_id": "a989fa1b-9a11-4dd8-a3e9-f0de9c6eb5f2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Disable-SafeLinksRule\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "GCP IAM Custom Role Creation", + "description": "Identifies an Identity and Access Management (IAM) custom role creation in Google Cloud Platform (GCP). Custom roles are user-defined, and allow for the bundling of one or more supported permissions to meet specific needs. Custom roles will not be updated automatically and could lead to privilege creep if not carefully scrutinized.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Identity and Access Audit", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Custom role creations may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Role creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/iam/docs/understanding-custom-roles" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "ea6db099-48ac-4075-a015-69115249c758", + "rule_id": "aa8007f0-d1df-49ef-8520-407857594827", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.CreateRole and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential Protocol Tunneling via Chisel Server", + "description": "This rule monitors for common command line flags leveraged by the Chisel server utility followed by a received connection within a timespan of 1 minute. Chisel is a command-line utility used for creating and managing TCP and UDP tunnels, enabling port forwarding and secure communication between machines. Attackers can abuse the Chisel utility to establish covert communication channels, bypass network restrictions, and carry out malicious activities by creating tunnels that allow unauthorized access to internal systems.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform", + "https://book.hacktricks.xyz/generic-methodologies-and-resources/tunneling-and-port-forwarding" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + } + ], + "id": "cedf2d41-b0cc-4c50-8cd6-9ffe47a9434f", + "rule_id": "ac8805f6-1e08-406c-962e-3937057fa86f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=1m\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.args == \"server\" and process.args in (\"--port\", \"-p\", \"--reverse\", \"--backend\", \"--socks5\") and \n process.args_count >= 3 and process.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")]\n [network where host.os.type == \"linux\" and event.action == \"connection_accepted\" and event.type == \"start\" and \n destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\" and \n not process.name : (\n \"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\", \"java\", \"telnet\",\n \"ftp\", \"socat\", \"curl\", \"wget\", \"dpkg\", \"docker\", \"dockerd\", \"yum\", \"apt\", \"rpm\", \"dnf\", \"ssh\", \"sshd\", \"hugo\")]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Invoke-Mimikatz PowerShell Script", + "description": "Mimikatz is a credential dumper capable of obtaining plaintext Windows account logins and passwords, along with many other features that make it useful for testing the security of networks. This rule detects Invoke-Mimikatz PowerShell script and alike.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Mimikatz PowerShell Activity\n\n[Mimikatz](https://github.com/gentilkiwi/mimikatz) is an open-source tool used to collect, decrypt, and/or use cached credentials. This tool is commonly abused by adversaries during the post-compromise stage where adversaries have gained an initial foothold on an endpoint and are looking to elevate privileges and seek out additional authentication objects such as tokens/hashes/credentials that can then be used to move laterally and pivot across a network.\n\nThis rule looks for PowerShell scripts that load mimikatz in memory, like Invoke-Mimikataz, which are used to dump credentials from the Local Security Authority Subsystem Service (LSASS). Any activity triggered from this rule should be treated with high priority as it typically represents an active adversary.\n\nMore information about Mimikatz components and how to detect/prevent them can be found on [ADSecurity](https://adsecurity.org/?page_id=1821).\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Invoke-Mimitakz and alike scripts heavily use other capabilities covered by other detections described in the \"Related Rules\" section.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host.\n - Examine network and security events in the environment to identify potential lateral movement using compromised credentials.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n- Suspicious .NET Reflection via PowerShell - e26f042e-c590-4e82-8e05-41e81bd822ad\n- PowerShell Suspicious Payload Encoded and Compressed - 81fe9dc6-a2d7-4192-a2d8-eed98afc766a\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n- Mimikatz Memssp Log File Detected - ebb200e8-adf0-43f8-a0bb-4ee5b5d852c6\n- Modification of WDigest Security Provider - d703a5af-d5b0-43bd-8ddb-7a5d500b7da5\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Validate that cleartext passwords are disabled in memory for use with `WDigest`.\n- Look into preventing access to `LSASS` using capabilities such as LSA protection or antivirus/EDR tools that provide this capability.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 106, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Resources: Investigation Guide", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://attack.mitre.org/software/S0002/", + "https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1", + "https://www.elastic.co/security-labs/detect-credential-access" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "61a429e6-48c6-4e02-968f-cdd586a98555", + "rule_id": "ac96ceb8-4399-4191-af1d-4feeac1f1f46", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be configured (Enable).\n\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\npowershell.file.script_block_text:(\n (DumpCreds and\n DumpCerts) or\n \"sekurlsa::logonpasswords\" or\n (\"crypto::certificates\" and\n \"CERT_SYSTEM_STORE_LOCAL_MACHINE\")\n)\n", + "language": "kuery" + }, + { + "name": "Signed Proxy Execution via MS Work Folders", + "description": "Identifies the use of Windows Work Folders to execute a potentially masqueraded control.exe file in the current working directory. Misuse of Windows Work Folders could indicate malicious activity.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Signed Proxy Execution via MS Work Folders\n\nWork Folders is a role service for file servers running Windows Server that provides a consistent way for users to access their work files from their PCs and devices. This allows users to store work files and access them from anywhere. When called, Work Folders will automatically execute any Portable Executable (PE) named control.exe as an argument before accessing the synced share.\n\nUsing Work Folders to execute a masqueraded control.exe could allow an adversary to bypass application controls and increase privileges.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Examine the location of the WorkFolders.exe binary to determine if it was copied to the location of the control.exe binary. It resides in the System32 directory by default.\n- Trace the activity related to the control.exe binary to identify any continuing intrusion activity on the host.\n- Review the control.exe binary executed with Work Folders to determine maliciousness such as additional host activity or network traffic.\n- Determine if control.exe was synced to sync share, indicating potential lateral movement.\n- Review how control.exe was originally delivered on the host, such as emailed, downloaded from the web, or written to\ndisk from a separate binary.\n\n### False positive analysis\n\n- Windows Work Folders are used legitimately by end users and administrators for file sharing and syncing but not in the instance where a suspicious control.exe is passed as an argument.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Review the Work Folders synced share to determine if the control.exe was shared and if so remove it.\n- If no lateral movement was identified during investigation, take the affected host offline if possible and remove the control.exe binary as well as any additional artifacts identified during investigation.\n- Review integrating Windows Information Protection (WIP) to enforce data protection by encrypting the data on PCs using Work Folders.\n- Confirm with the user whether this was expected or not, and reset their password.", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/windows-server/storage/work-folders/work-folders-overview", + "https://twitter.com/ElliotKillick/status/1449812843772227588", + "https://lolbas-project.github.io/lolbas/Binaries/WorkFolders/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "f570b449-de04-4a03-8bce-964bf2f8e430", + "rule_id": "ad0d2742-9a49-11ec-8d6b-acde48001122", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\"\n and process.name : \"control.exe\" and process.parent.name : \"WorkFolders.exe\"\n and not process.executable : (\"?:\\\\Windows\\\\System32\\\\control.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\control.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Suspicious Communication App Child Process", + "description": "Identifies suspicious child processes of communications apps, which can indicate a potential masquerading as the communication app or the exploitation of a vulnerability on the application causing it to execute code.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Persistence", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + }, + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + }, + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1554", + "name": "Compromise Client Software Binary", + "reference": "https://attack.mitre.org/techniques/T1554/" + } + ] + } + ], + "id": "60c933ab-bd79-4270-956d-22c135929b0e", + "rule_id": "adbfa3ee-777e-4747-b6b0-7bd645f30880", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n /* Slack */\n (process.parent.name : \"slack.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Zoom\\\\bin\\\\Zoom.exe\",\n \"?:\\\\Windows\\\\System32\\\\rundll32.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Mozilla Firefox\\\\firefox.exe\",\n \"?:\\\\Windows\\\\System32\\\\notepad.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Slack Technologies, Inc.\",\n \"Slack Technologies, LLC\"\n ) and process.code_signature.trusted == true\n ) or\n (\n (process.name : \"powershell.exe\" and process.command_line : \"powershell.exe -c Invoke-WebRequest -Uri https://slackb.com/*\") or\n (process.name : \"cmd.exe\" and process.command_line : \"C:\\\\WINDOWS\\\\system32\\\\cmd.exe /d /s /c \\\"%windir%\\\\System32\\\\rundll32.exe User32.dll,SetFocus 0\\\"\")\n )\n )\n ) or\n\n /* WebEx */\n (process.parent.name : (\"CiscoCollabHost.exe\", \"WebexHost.exe\") and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Cisco Systems, Inc.\",\n \"Cisco WebEx LLC\",\n \"Cisco Systems Inc.\"\n ) and process.code_signature.trusted == true\n )\n )\n ) or\n\n /* Teams */\n (process.parent.name : \"Teams.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Microsoft Corporation\",\n \"Microsoft 3rd Party Application Component\"\n ) and process.code_signature.trusted == true\n ) or\n (\n (process.name : \"taskkill.exe\" and process.args : \"Teams.exe\")\n )\n )\n ) or\n\n /* Discord */\n (process.parent.name : \"Discord.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\reg.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\reg.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Discord Inc.\"\n ) and process.code_signature.trusted == true\n ) or\n (\n process.name : \"cmd.exe\" and process.command_line : (\n \"C:\\\\WINDOWS\\\\system32\\\\cmd.exe /d /s /c \\\"chcp\\\"\",\n \"C:\\\\WINDOWS\\\\system32\\\\cmd.exe /q /d /s /c \\\"C:\\\\Program^ Files\\\\NVIDIA^ Corporation\\\\NVSMI\\\\nvidia-smi.exe\\\"\"\n )\n )\n )\n ) or\n\n /* WhatsApp */\n (process.parent.name : \"Whatsapp.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\reg.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\reg.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"WhatsApp LLC\",\n \"WhatsApp, Inc\",\n \"24803D75-212C-471A-BC57-9EF86AB91435\"\n ) and process.code_signature.trusted == true\n ) or\n (\n (process.name : \"cmd.exe\" and process.command_line : \"C:\\\\Windows\\\\system32\\\\cmd.exe /d /s /c \\\"C:\\\\Windows\\\\system32\\\\wbem\\\\wmic.exe*\")\n )\n )\n ) or\n\n /* Zoom */\n (process.parent.name : \"Zoom.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Zoom Video Communications, Inc.\"\n ) and process.code_signature.trusted == true\n )\n )\n ) or\n\n /* Outlook */\n (process.parent.name : \"outlook.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\Teams\\\\current\\\\Teams.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\NewOutlookInstall\\\\NewOutlookInstaller.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Zoom\\\\bin\\\\Zoom.exe\",\n \"?:\\\\Windows\\\\System32\\\\IME\\\\SHARED\\\\IMEWDBLD.EXE\",\n \"?:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\prevhost.exe\",\n \"?:\\\\Windows\\\\System32\\\\dwwin.exe\",\n \"?:\\\\Windows\\\\System32\\\\notepad.exe\",\n \"?:\\\\Windows\\\\explorer.exe\"\n ) and process.code_signature.trusted == true \n )\n )\n ) or\n\n /* Thunderbird */\n (process.parent.name : \"thunderbird.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Mozilla Corporation\"\n ) and process.code_signature.trusted == true\n )\n )\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual User Privilege Enumeration via id", + "description": "This rule monitors for a sequence of 20 \"id\" command executions within 1 second by the same parent process. This behavior is unusual, and may be indicative of the execution of an enumeration script such as LinPEAS or LinEnum. These scripts leverage the \"id\" command to enumerate the privileges of all users present on the system.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1033", + "name": "System Owner/User Discovery", + "reference": "https://attack.mitre.org/techniques/T1033/" + } + ] + } + ], + "id": "ac872de7-488d-48a6-9d5a-7d0b6cb37c2a", + "rule_id": "afa135c0-a365-43ab-aa35-fd86df314a47", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, process.parent.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name == \"id\" and process.args_count == 2 and \n not (process.parent.name == \"rpm\" or process.parent.args : \"/var/tmp/rpm-tmp*\")] with runs=20\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Network Activity Detected via cat", + "description": "This rule monitors for the execution of the cat command, followed by a connection attempt by the same process. Cat is capable of transfering data via tcp/udp channels by redirecting its read output to a /dev/tcp or /dev/udp channel. This activity is highly suspicious, and should be investigated. Attackers may leverage this capability to transfer tools or files to another host in the network or exfiltrate data while attempting to evade detection in the process.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [] + } + ], + "id": "448298ee-9121-4e34-81f7-cc44668e19aa", + "rule_id": "afd04601-12fc-4149-9b78-9c3f8fe45d39", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and process.name == \"cat\" and \n process.parent.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")]\n [network where host.os.type == \"linux\" and event.action in (\"connection_attempted\", \"disconnect_received\") and process.name == \"cat\" and \n destination.ip != null and not cidrmatch(destination.ip, \"127.0.0.0/8\", \"169.254.0.0/16\", \"224.0.0.0/4\", \"::1\")]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Network Share Discovery", + "description": "Adversaries may look for folders and drives shared on remote systems to identify sources of information to gather as a precursor for collection and identify potential systems of interest for Lateral Movement.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Tactic: Collection", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1135", + "name": "Network Share Discovery", + "reference": "https://attack.mitre.org/techniques/T1135/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1039", + "name": "Data from Network Shared Drive", + "reference": "https://attack.mitre.org/techniques/T1039/" + } + ] + } + ], + "id": "fe122867-0662-4780-9a2e-16cf78a5d0ef", + "rule_id": "b2318c71-5959-469a-a3ce-3a0768e63b9c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + }, + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "source.ip", + "type": "ip", + "ecs": true + }, + { + "name": "source.port", + "type": "long", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.ShareName", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "sequence by user.name, source.port, source.ip with maxspan=15s \n [file where event.action == \"network-share-object-access-checked\" and \n winlog.event_data.ShareName : (\"\\\\*ADMIN$\", \"\\\\*C$\") and \n source.ip != null and source.ip != \"0.0.0.0\" and source.ip != \"::1\" and source.ip != \"::\" and source.ip != \"127.0.0.1\"]\n [file where event.action == \"network-share-object-access-checked\" and \n winlog.event_data.ShareName : (\"\\\\*ADMIN$\", \"\\\\*C$\") and \n source.ip != null and source.ip != \"0.0.0.0\" and source.ip != \"::1\" and source.ip != \"::\" and source.ip != \"127.0.0.1\"]\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*", + "logs-system.*" + ] + }, + { + "name": "Microsoft 365 Unusual Volume of File Deletion", + "description": "Identifies that a user has deleted an unusually large volume of files as reported by Microsoft Cloud App Security.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Users or System Administrator cleaning out folders." + ], + "references": [ + "https://docs.microsoft.com/en-us/cloud-app-security/anomaly-detection-policy", + "https://docs.microsoft.com/en-us/cloud-app-security/policy-template-reference" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + } + ], + "id": "b7c5f85b-a6cb-41f6-99ff-7f6529dda1ff", + "rule_id": "b2951150-658f-4a60-832f-a00d1e6c6745", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.category:web and event.action:\"Unusual volume of file deletion\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "At.exe Command Lateral Movement", + "description": "Identifies use of at.exe to interact with the task scheduler on remote hosts. Remote task creations, modifications or execution could be indicative of adversary lateral movement.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1053", + "name": "Scheduled Task/Job", + "reference": "https://attack.mitre.org/techniques/T1053/", + "subtechnique": [ + { + "id": "T1053.002", + "name": "At", + "reference": "https://attack.mitre.org/techniques/T1053/002/" + }, + { + "id": "T1053.005", + "name": "Scheduled Task", + "reference": "https://attack.mitre.org/techniques/T1053/005/" + } + ] + } + ] + } + ], + "id": "d6d93c79-65d8-4c84-a40d-4849767706e1", + "rule_id": "b483365c-98a8-40c0-92d8-0458ca25058a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"at.exe\" and process.args : \"\\\\\\\\*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Azure Event Hub Authorization Rule Created or Updated", + "description": "Identifies when an Event Hub Authorization Rule is created or updated in Azure. An authorization rule is associated with specific rights, and carries a pair of cryptographic keys. When you create an Event Hubs namespace, a policy rule named RootManageSharedAccessKey is created for the namespace. This has manage permissions for the entire namespace and it's recommended that you treat this rule like an administrative root account and don't use it in your application.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 103, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Log Auditing", + "Tactic: Collection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Authorization rule additions or modifications may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Authorization rule additions or modifications from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/event-hubs/authorize-access-shared-access-signature" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1530", + "name": "Data from Cloud Storage", + "reference": "https://attack.mitre.org/techniques/T1530/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1537", + "name": "Transfer Data to Cloud Account", + "reference": "https://attack.mitre.org/techniques/T1537/" + } + ] + } + ], + "id": "c2a4583d-5606-4acf-88d2-c63d22ad8063", + "rule_id": "b6dce542-2b75-4ffb-b7d6-38787298ba9d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.EVENTHUB/NAMESPACES/AUTHORIZATIONRULES/WRITE\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Linux System Information Discovery", + "description": "Enrich process events with uname and other command lines that imply Linux system information discovery.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1082", + "name": "System Information Discovery", + "reference": "https://attack.mitre.org/techniques/T1082/" + } + ] + } + ], + "id": "79e91603-bafc-4bc5-89ef-cb9385bbab71", + "rule_id": "b81bd314-db5b-4d97-82e8-88e3e5fc9de5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and\n(\n process.name: \"uname\" or\n (process.name: (\"cat\", \"more\", \"less\") and\n process.args: (\"*issue*\", \"*version*\", \"*profile*\", \"*services*\", \"*cpuinfo*\"))\n)\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Kirbi File Creation", + "description": "Identifies the creation of .kirbi files. The creation of this kind of file is an indicator of an attacker running Kerberos ticket dump utilities, such as Mimikatz, and precedes attacks such as Pass-The-Ticket (PTT), which allows the attacker to impersonate users using Kerberos tickets.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + }, + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/" + } + ] + } + ], + "id": "40740277-0995-42ea-ae05-4b896455eb67", + "rule_id": "b8f8da2d-a9dc-48c0-90e4-955c0aa1259a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and file.extension : \"kirbi\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Multiple Alerts in Different ATT&CK Tactics on a Single Host", + "description": "This rule uses alert data to determine when multiple alerts in different phases of an attack involving the same host are triggered. Analysts can use this to prioritize triage and response, as these hosts are more likely to be compromised.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 4, + "tags": [ + "Use Case: Threat Detection", + "Rule Type: Higher-Order Rule" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "1h", + "from": "now-24h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "False positives can occur because the rules may be mapped to a few MITRE ATT&CK tactics. Use the attached Timeline to determine which detections were triggered on the host." + ], + "references": [], + "max_signals": 100, + "threat": [], + "id": "37050c8c-9432-4f95-bea0-ef06d5790b60", + "rule_id": "b946c2f7-df06-4c00-a5aa-1f6fbc7bb72c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "kibana.alert.rule.threat.tactic.id", + "type": "unknown", + "ecs": false + }, + { + "name": "signal.rule.name", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "threshold", + "query": "signal.rule.name:* and kibana.alert.rule.threat.tactic.id:*\n", + "threshold": { + "field": [ + "host.id" + ], + "value": 1, + "cardinality": [ + { + "field": "kibana.alert.rule.threat.tactic.id", + "value": 3 + } + ] + }, + "index": [ + ".alerts-security.*" + ], + "language": "kuery" + }, + { + "name": "Azure Resource Group Deletion", + "description": "Identifies the deletion of a resource group in Azure, which includes all resources within the group. Deletion is permanent and irreversible. An adversary may delete a resource group in an attempt to evade defenses or intentionally destroy data.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Log Auditing", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Deletion of a resource group may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Resource group deletions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "7f6c7479-8587-4244-9c79-ec1f0c8f9127", + "rule_id": "bb4fe8d2-7ae2-475c-8b5d-55b449e4264f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.RESOURCES/SUBSCRIPTIONS/RESOURCEGROUPS/DELETE\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "OneDrive Malware File Upload", + "description": "Identifies the occurence of files uploaded to OneDrive being detected as Malware by the file scanning engine. Attackers can use File Sharing and Organization Repositories to spread laterally within the company and amplify their access. Users can inadvertently share these files without knowing their maliciousness, giving adversaries opportunity to gain initial access to other endpoints in the environment.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Benign files can trigger signatures in the built-in virus protection" + ], + "references": [ + "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/virus-detection-in-spo?view=o365-worldwide" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1080", + "name": "Taint Shared Content", + "reference": "https://attack.mitre.org/techniques/T1080/" + } + ] + } + ], + "id": "40da07a5-4e1c-4b4a-95e8-b73c8869d11e", + "rule_id": "bba1b212-b85c-41c6-9b28-be0e5cdfc9b1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:OneDrive and event.code:SharePointFileOperation and event.action:FileMalwareDetected\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 Teams Custom Application Interaction Allowed", + "description": "Identifies when custom applications are allowed in Microsoft Teams. If an organization requires applications other than those available in the Teams app store, custom applications can be developed as packages and uploaded. An adversary may abuse this behavior to establish persistence in an environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Custom applications may be allowed by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/deploy-and-publish/apps-upload" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + } + ], + "id": "f4cbff4a-4895-4be6-8069-70f8fba55f05", + "rule_id": "bbd1a775-8267-41fa-9232-20e5582596ac", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "o365.audit.Name", + "type": "keyword", + "ecs": false + }, + { + "name": "o365.audit.NewValue", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:MicrosoftTeams and\nevent.category:web and event.action:TeamsTenantSettingChanged and\no365.audit.Name:\"Allow sideloading and interaction of custom apps\" and\no365.audit.NewValue:True and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "GCP Storage Bucket Deletion", + "description": "Identifies when a Google Cloud Platform (GCP) storage bucket is deleted. An adversary may delete a storage bucket in order to disrupt their target's business operations.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Storage buckets may be deleted by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Bucket deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/storage/docs/key-terms#buckets" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + } + ], + "id": "c13cf5af-7b10-4b51-9189-42e2ecab2d92", + "rule_id": "bc0f2d83-32b8-4ae2-b0e6-6a45772e9331", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:\"storage.buckets.delete\"\n", + "language": "kuery" + }, + { + "name": "Azure Conditional Access Policy Modified", + "description": "Identifies when an Azure Conditional Access policy is modified. Azure Conditional Access policies control access to resources via if-then statements. For example, if a user wants to access a resource, then they must complete an action such as using multi-factor authentication to access it. An adversary may modify a Conditional Access policy in order to weaken their target's security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Configuration Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/overview" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "28473cab-ae72-41c8-a338-902647fbe832", + "rule_id": "bc48bba7-4a23-4232-b551-eca3ca1e3f20", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + }, + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:(azure.activitylogs or azure.auditlogs) and\nevent.action:\"Update conditional access policy\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "GCP Service Account Disabled", + "description": "Identifies when a service account is disabled in Google Cloud Platform (GCP). A service account is a special type of account used by an application or a virtual machine (VM) instance, not a person. Applications use service accounts to make authorized API calls, authorized as either the service account itself, or as G Suite or Cloud Identity users through domain-wide delegation. An adversary may disable a service account in order to disrupt to disrupt their target's business operations.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Identity and Access Audit", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Service accounts may be disabled by system administrators. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/iam/docs/service-accounts" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1531", + "name": "Account Access Removal", + "reference": "https://attack.mitre.org/techniques/T1531/" + } + ] + } + ], + "id": "18f46392-2f95-4b95-af82-224bbe1fe249", + "rule_id": "bca7d28e-4a48-47b1-adb7-5074310e9a61", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.DisableServiceAccount and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "System Owner/User Discovery Linux", + "description": "Identifies the use of built-in tools which adversaries may use to enumerate the system owner/user of a compromised system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1033", + "name": "System Owner/User Discovery", + "reference": "https://attack.mitre.org/techniques/T1033/" + }, + { + "id": "T1069", + "name": "Permission Groups Discovery", + "reference": "https://attack.mitre.org/techniques/T1069/" + } + ] + } + ], + "id": "194feeab-06a3-47f2-9728-1599d1c5acfb", + "rule_id": "bf8c007c-7dee-4842-8e9a-ee534c09d205", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and\n process.name : (\"whoami\", \"w\", \"who\", \"users\", \"id\")\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Credential Manipulation - Detected - Elastic Endgame", + "description": "Elastic Endgame detected Credential Manipulation. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/" + } + ] + } + ], + "id": "b1deb36c-0d6d-4c28-8310-0c55ce4690c9", + "rule_id": "c0be5f31-e180-48ed-aa08-96b36899d48f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:token_manipulation_event or endgame.event_subtype_full:token_manipulation_event)\n", + "language": "kuery" + }, + { + "name": "Unsigned DLL Loaded by a Trusted Process", + "description": "Identifies digitally signed (trusted) processes loading unsigned DLLs. Attackers may plant their payloads into the application folder and invoke the legitimate application to execute the payload, masking actions they perform under a legitimate, trusted, and potentially elevated system or software process.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 101, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.001", + "name": "DLL Search Order Hijacking", + "reference": "https://attack.mitre.org/techniques/T1574/001/" + }, + { + "id": "T1574.002", + "name": "DLL Side-Loading", + "reference": "https://attack.mitre.org/techniques/T1574/002/" + } + ] + } + ] + } + ], + "id": "5dd44365-6389-4783-89ca-dea9d66d34af", + "rule_id": "c20cd758-07b1-46a1-b03f-fa66158258b8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.Ext.device.product_id", + "type": "unknown", + "ecs": false + }, + { + "name": "dll.Ext.relative_file_creation_time", + "type": "unknown", + "ecs": false + }, + { + "name": "dll.Ext.relative_file_name_modify_time", + "type": "unknown", + "ecs": false + }, + { + "name": "dll.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.hash.sha256", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "library where host.os.type == \"windows\" and\n (dll.Ext.relative_file_creation_time <= 500 or\n dll.Ext.relative_file_name_modify_time <= 500 or\n dll.Ext.device.product_id : (\"Virtual DVD-ROM\", \"Virtual Disk\")) and dll.hash.sha256 != null and\n process.code_signature.status :\"trusted\" and not dll.code_signature.status : (\"trusted\", \"errorExpired\", \"errorCode_endpoint*\") and\n /* DLL loaded from the process.executable current directory */\n endswith~(substring(dll.path, 0, length(dll.path) - (length(dll.name) + 1)), substring(process.executable, 0, length(process.executable) - (length(process.name) + 1)))\n and not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Permission Theft - Detected - Elastic Endgame", + "description": "Elastic Endgame detected Permission Theft. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/" + } + ] + } + ], + "id": "b990f237-6a45-47be-8e10-4b1586f0aaaf", + "rule_id": "c3167e1b-f73c-41be-b60b-87f4df707fe3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:token_protection_event or endgame.event_subtype_full:token_protection_event)\n", + "language": "kuery" + }, + { + "name": "GCP Virtual Private Cloud Network Deletion", + "description": "Identifies when a Virtual Private Cloud (VPC) network is deleted in Google Cloud Platform (GCP). A VPC network is a virtual version of a physical network within a GCP project. Each VPC network has its own subnets, routes, and firewall, as well as other elements. An adversary may delete a VPC network in order to disrupt their target's network and business operations.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Virtual Private Cloud networks may be deleted by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/vpc/docs/vpc" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.007", + "name": "Disable or Modify Cloud Firewall", + "reference": "https://attack.mitre.org/techniques/T1562/007/" + } + ] + } + ] + } + ], + "id": "178c36f1-79e2-460c-90ed-ee1093d4c271", + "rule_id": "c58c3081-2e1d-4497-8491-e73a45d1a6d6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:v*.compute.networks.delete and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "CyberArk Privileged Access Security Recommended Monitor", + "description": "Identifies the occurrence of a CyberArk Privileged Access Security (PAS) non-error level audit event which is recommended for monitoring by the vendor. The event.code correlates to the CyberArk Vault Audit Action Code.", + "risk_score": 73, + "severity": "high", + "rule_name_override": "event.action", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\nThis is a promotion rule for CyberArk events, which the vendor recommends should be monitored.\nConsult vendor documentation on interpreting specific events.", + "version": 102, + "tags": [ + "Data Source: CyberArk PAS", + "Use Case: Log Auditing", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "To tune this rule, add exceptions to exclude any event.code which should not trigger this rule." + ], + "references": [ + "https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PASREF/Vault%20Audit%20Action%20Codes.htm?tocpath=Administration%7CReferences%7C_____3#RecommendedActionCodesforMonitoring" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [] + } + ], + "id": "effce35a-9261-48ed-87cc-8ce2f9381e78", + "rule_id": "c5f81243-56e0-47f9-b5bb-55a5ed89ba57", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cyberarkpas", + "version": "^2.2.0" + } + ], + "required_fields": [ + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "The CyberArk Privileged Access Security (PAS) Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-cyberarkpas.audit*" + ], + "query": "event.dataset:cyberarkpas.audit and\n event.code:(4 or 22 or 24 or 31 or 38 or 57 or 60 or 130 or 295 or 300 or 302 or\n 308 or 319 or 344 or 346 or 359 or 361 or 378 or 380 or 411) and\n not event.type:error\n", + "language": "kuery" + }, + { + "name": "Kubernetes Privileged Pod Created", + "description": "This rule detects when a user creates a pod/container running in privileged mode. A highly privileged container has access to the node's resources and breaks the isolation between containers. If compromised, an attacker can use the privileged container to gain access to the underlying host. Gaining access to the host may provide the adversary with the opportunity to achieve follow-on objectives, such as establishing persistence, moving laterally within the environment, or setting up a command and control channel on the host.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 202, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Execution", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "By default a container is not allowed to access any devices on the host, but a \"privileged\" container is given access to all devices on the host. This allows the container nearly all the same access as processes running on the host. An administrator may want to run a privileged container to use operating system administrative capabilities such as manipulating the network stack or accessing hardware devices from within the cluster. Add exceptions for trusted container images using the query field \"kubernetes.audit.requestObject.spec.container.image\"" + ], + "references": [ + "https://media.defense.gov/2021/Aug/03/2002820425/-1/-1/1/CTR_KUBERNETES%20HARDENING%20GUIDANCE.PDF", + "https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1611", + "name": "Escape to Host", + "reference": "https://attack.mitre.org/techniques/T1611/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1610", + "name": "Deploy Container", + "reference": "https://attack.mitre.org/techniques/T1610/" + } + ] + } + ], + "id": "e1cffa1e-8da2-48a6-8219-f3862831d682", + "rule_id": "c7908cac-337a-4f38-b50d-5eeb78bdb531", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.resource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.containers.image", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.containers.securityContext.privileged", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.verb", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:pods\n and kubernetes.audit.verb:create\n and kubernetes.audit.requestObject.spec.containers.securityContext.privileged:true\n and not kubernetes.audit.requestObject.spec.containers.image: (\"docker.elastic.co/beats/elastic-agent:8.4.0\")\n", + "language": "kuery" + }, + { + "name": "Credential Manipulation - Prevented - Elastic Endgame", + "description": "Elastic Endgame prevented Credential Manipulation. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1134", + "name": "Access Token Manipulation", + "reference": "https://attack.mitre.org/techniques/T1134/" + } + ] + } + ], + "id": "def00a7a-ba21-40ab-b554-79c625141462", + "rule_id": "c9e38e64-3f4c-4bf3-ad48-0e61a60ea1fa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:token_manipulation_event or endgame.event_subtype_full:token_manipulation_event)\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 Exchange Malware Filter Rule Modification", + "description": "Identifies when a malware filter rule has been deleted or disabled in Microsoft 365. An adversary or insider threat may want to modify a malware filter rule to evade detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A malware filter rule may be deleted by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-malwarefilterrule?view=exchange-ps", + "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-malwarefilterrule?view=exchange-ps" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "b44140b8-b96e-448a-aec3-08cbdeaaa491", + "rule_id": "ca79768e-40e1-4e45-a097-0e5fbc876ac2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:(\"Remove-MalwareFilterRule\" or \"Disable-MalwareFilterRule\") and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Google Workspace MFA Enforcement Disabled", + "description": "Detects when multi-factor authentication (MFA) enforcement is disabled for Google Workspace users. An adversary may disable MFA enforcement in order to weaken an organization’s security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Google Workspace MFA Enforcement Disabled\n\nMulti-factor authentication is a process in which users are prompted during the sign-in process for an additional form of identification, such as a code on their cellphone or a fingerprint scan.\n\nIf you only use a password to authenticate a user, it leaves an insecure vector for attack. If the password is weak or has been exposed elsewhere, an attacker could be using it to gain access. When you require a second form of authentication, security is increased because this additional factor isn't something that's easy for an attacker to obtain or duplicate.\n\nFor more information about using MFA in Google Workspace, access the [official documentation](https://support.google.com/a/answer/175197).\n\nThis rule identifies the disabling of MFA enforcement in Google Workspace. This modification weakens the security of the accounts and can lead to the compromise of accounts and other assets.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- While this activity can be done by administrators, all users must use MFA. The security team should address any potential benign true positive (B-TP), as this configuration can risk the user and domain.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate the multi-factor authentication enforcement.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", + "version": 207, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Configuration Audit", + "Tactic: Impact", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "MFA policies may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://support.google.com/a/answer/9176657?hl=en#" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1531", + "name": "Account Access Removal", + "reference": "https://attack.mitre.org/techniques/T1531/" + } + ] + } + ], + "id": "da76b106-6585-4905-b696-18a62c3cf798", + "rule_id": "cad4500a-abd7-4ef3-b5d3-95524de7cfe1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "google_workspace.admin.new_value", + "type": "keyword", + "ecs": false + } + ], + "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset:google_workspace.admin and event.provider:admin\n and event.category:iam and event.action:ENFORCE_STRONG_AUTHENTICATION\n and google_workspace.admin.new_value:false\n", + "language": "kuery" + }, + { + "name": "GCP Pub/Sub Subscription Deletion", + "description": "Identifies the deletion of a subscription in Google Cloud Platform (GCP). In GCP, the publisher-subscriber relationship (Pub/Sub) is an asynchronous messaging service that decouples event-producing and event-processing services. A subscription is a named resource representing the stream of messages to be delivered to the subscribing application.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Log Auditing", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Subscription deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Subscription deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/pubsub/docs/overview" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "a76b6efe-8922-46e1-a79e-3f96bd259d36", + "rule_id": "cc89312d-6f47-48e4-a87c-4977bd4633c3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.pubsub.v*.Subscriber.DeleteSubscription and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Compression DLL Loaded by Unusual Process", + "description": "Identifies the image load of a compression DLL. Adversaries will often compress and encrypt data in preparation for exfiltration.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1560", + "name": "Archive Collected Data", + "reference": "https://attack.mitre.org/techniques/T1560/" + } + ] + } + ], + "id": "3c61f441-76f8-46e9-845f-f886d4cc8a77", + "rule_id": "d197478e-39f0-4347-a22f-ba654718b148", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "library where \n dll.name : (\"System.IO.Compression.FileSystem.ni.dll\", \"System.IO.Compression.ni.dll\") and\n not \n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\mscorsvw.exe\",\n \"?:\\\\Windows\\\\System32\\\\sdiagnhost.exe\",\n \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\w3wp.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender Advanced Threat Protection\\\\DataCollection\\\\*\\\\OpenHandleCollector.exe\"\n ) and process.code_signature.trusted == true\n ) or\n (\n process.name : \"NuGet.exe\" and process.code_signature.trusted == true and user.id : (\"S-1-5-18\", \"S-1-5-20\")\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Web Application Suspicious Activity: sqlmap User Agent", + "description": "This is an example of how to detect an unwanted web client user agent. This search matches the user agent for sqlmap 1.3.11, which is a popular FOSS tool for testing web applications for SQL injection vulnerabilities.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 102, + "tags": [ + "Data Source: APM" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "This rule does not indicate that a SQL injection attack occurred, only that the `sqlmap` tool was used. Security scans and tests may result in these errors. If the source is not an authorized security tester, this is generally suspicious or malicious activity." + ], + "references": [ + "http://sqlmap.org/" + ], + "max_signals": 100, + "threat": [], + "id": "6223caf5-8d51-439e-b9de-282676ea2758", + "rule_id": "d49cc73f-7a16-4def-89ce-9fc7127d7820", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "apm", + "version": "^8.0.0" + } + ], + "required_fields": [ + { + "name": "user_agent.original", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "apm-*-transaction*", + "traces-apm*" + ], + "query": "user_agent.original:\"sqlmap/1.3.11#stable (http://sqlmap.org)\"\n", + "language": "kuery" + }, + { + "name": "Linux init (PID 1) Secret Dump via GDB", + "description": "This rule monitors for the potential memory dump of the init process (PID 1) through gdb. Attackers may leverage memory dumping techniques to attempt secret extraction from privileged processes. Tools that display this behavior include \"truffleproc\" and \"bash-memory-dump\". This behavior should not happen by default, and should be investigated thoroughly.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/controlplaneio/truffleproc", + "https://github.com/hajzer/bash-memory-dump" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.007", + "name": "Proc Filesystem", + "reference": "https://attack.mitre.org/techniques/T1003/007/" + } + ] + } + ] + } + ], + "id": "1e960657-5b57-4ef4-8f1d-1f956e912c77", + "rule_id": "d4ff2f53-c802-4d2e-9fb9-9ecc08356c3f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"gdb\" and process.args in (\"--pid\", \"-p\") and process.args == \"1\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "GCP Pub/Sub Subscription Creation", + "description": "Identifies the creation of a subscription in Google Cloud Platform (GCP). In GCP, the publisher-subscriber relationship (Pub/Sub) is an asynchronous messaging service that decouples event-producing and event-processing services. A subscription is a named resource representing the stream of messages to be delivered to the subscribing application.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 105, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Log Auditing", + "Tactic: Collection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Subscription creations may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Subscription creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/pubsub/docs/overview" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1530", + "name": "Data from Cloud Storage", + "reference": "https://attack.mitre.org/techniques/T1530/" + } + ] + } + ], + "id": "12198067-c394-4a0e-b755-58558934e5c9", + "rule_id": "d62b64a8-a7c9-43e5-aee3-15a725a794e7", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.pubsub.v*.Subscriber.CreateSubscription and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 Exchange Anti-Phish Policy Deletion", + "description": "Identifies the deletion of an anti-phishing policy in Microsoft 365. By default, Microsoft 365 includes built-in features that help protect users from phishing attacks. Anti-phishing polices increase this protection by refining settings to better detect and prevent attacks.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "An anti-phishing policy may be deleted by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-antiphishpolicy?view=exchange-ps", + "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/set-up-anti-phishing-policies?view=o365-worldwide" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/" + } + ] + } + ], + "id": "582a2b9d-386f-47f8-9450-86ee7f77e0c9", + "rule_id": "d68eb1b5-5f1c-4b6d-9e63-5b6b145cd4aa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Remove-AntiPhishPolicy\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Microsoft 365 Exchange Malware Filter Policy Deletion", + "description": "Identifies when a malware filter policy has been deleted in Microsoft 365. A malware filter policy is used to alert administrators that an internal user sent a message that contained malware. This may indicate an account or machine compromise that would need to be investigated. Deletion of a malware filter policy may be done to evade detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A malware filter policy may be deleted by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-malwarefilterpolicy?view=exchange-ps" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "f2947459-c8fa-4859-b511-022a5fc30133", + "rule_id": "d743ff2a-203e-4a46-a3e3-40512cfe8fbb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Remove-MalwareFilterPolicy\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Potential Pass-the-Hash (PtH) Attempt", + "description": "Adversaries may pass the hash using stolen password hashes to move laterally within an environment, bypassing normal system access controls. Pass the hash (PtH) is a method of authenticating as a user without having access to the user's cleartext password.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://attack.mitre.org/techniques/T1550/002/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1550", + "name": "Use Alternate Authentication Material", + "reference": "https://attack.mitre.org/techniques/T1550/", + "subtechnique": [ + { + "id": "T1550.002", + "name": "Pass the Hash", + "reference": "https://attack.mitre.org/techniques/T1550/002/" + } + ] + } + ] + } + ], + "id": "1cd8e30e-1673-4042-8e1e-4ef69cac6335", + "rule_id": "daafdf96-e7b1-4f14-b494-27e0d24b11f6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + }, + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.LogonProcessName", + "type": "keyword", + "ecs": false + }, + { + "name": "winlog.logon.type", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type:\"windows\" and \nevent.category : \"authentication\" and event.action : \"logged-in\" and \nwinlog.logon.type : \"NewCredentials\" and event.outcome : \"success\" and \nuser.id : (S-1-5-21-* or S-1-12-1-*) and winlog.event_data.LogonProcessName : \"seclogo\"\n", + "new_terms_fields": [ + "user.id" + ], + "history_window_start": "now-10d", + "index": [ + "winlogbeat-*", + "logs-windows.*", + "logs-system.*" + ], + "language": "kuery" + }, + { + "name": "Multi-Factor Authentication Disabled for an Azure User", + "description": "Identifies when multi-factor authentication (MFA) is disabled for an Azure user account. An adversary may disable MFA for a user account in order to weaken the authentication requirements for the account.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Multi-Factor Authentication Disabled for an Azure User\n\nMulti-factor authentication is a process in which users are prompted during the sign-in process for an additional form of identification, such as a code on their cellphone or a fingerprint scan.\n\nIf you only use a password to authenticate a user, it leaves an insecure vector for attack. If the password is weak or has been exposed elsewhere, an attacker could be using it to gain access. When you require a second form of authentication, security is increased because this additional factor isn't something that's easy for an attacker to obtain or duplicate.\n\nFor more information about using MFA in Azure AD, access the [official documentation](https://docs.microsoft.com/en-us/azure/active-directory/authentication/concept-mfa-howitworks#how-to-enable-and-use-azure-ad-multi-factor-authentication).\n\nThis rule identifies the deactivation of MFA for an Azure user account. This modification weakens account security and can lead to the compromise of accounts and other assets.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- While this activity can be done by administrators, all users must use MFA. The security team should address any potential benign true positive (B-TP), as this configuration can risk the user and domain.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate multi-factor authentication for the user.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security defaults [provided by Microsoft](https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/concept-fundamentals-security-defaults).\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 105, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "d7742322-b171-4698-838d-7a2f55284b1c", + "rule_id": "dafa3235-76dc-40e2-9f71-1773b96d24cf", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Disable Strong Authentication\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Network-Level Authentication (NLA) Disabled", + "description": "Identifies the attempt to disable Network-Level Authentication (NLA) via registry modification. Network Level Authentication (NLA) is a feature on Windows that provides an extra layer of security for Remote Desktop (RDP) connections, as it requires users to authenticate before allowing a full RDP session. Attackers can disable NLA to enable persistence methods that require access to the Windows sign-in screen without authenticating, such as Accessibility Features persistence methods, like Sticky Keys.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Data Source: Elastic Endgame", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.microsoft.com/en-us/security/blog/2023/08/24/flax-typhoon-using-legitimate-software-to-quietly-access-taiwanese-organizations/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + }, + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "8e318d58-dec5-4c50-8b63-e1e880470c8b", + "rule_id": "db65f5ba-d1ef-4944-b9e8-7e51060c2b42", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.action != \"deletion\" and\n registry.path :\n (\"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Terminal Server\\\\WinStations\\\\RDP-Tcp\\\\UserAuthentication\", \n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Terminal Server\\\\WinStations\\\\RDP-Tcp\\\\UserAuthentication\" ) and\n registry.data.strings : \"0\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Credential Dumping - Prevented - Elastic Endgame", + "description": "Elastic Endgame prevented Credential Dumping. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame", + "Use Case: Threat Detection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "82bc27b6-267e-4ba2-9b6b-756c6edca093", + "rule_id": "db8c33a8-03cd-4988-9e2c-d0a4863adb13", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:cred_theft_event or endgame.event_subtype_full:cred_theft_event)\n", + "language": "kuery" + }, + { + "name": "Azure Automation Account Created", + "description": "Identifies when an Azure Automation account is created. Azure Automation accounts can be used to automate management tasks and orchestrate actions across systems. An adversary may create an Automation account in order to maintain persistence in their target's environment.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://powerzure.readthedocs.io/en/latest/Functions/operational.html#create-backdoor", + "https://github.com/hausec/PowerZure", + "https://posts.specterops.io/attacking-azure-azure-ad-and-introducing-powerzure-ca70b330511a", + "https://azure.microsoft.com/en-in/blog/azure-automation-runbook-management/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "0f32a4d2-1b1e-4191-b1c2-4900a32abd0b", + "rule_id": "df26fd74-1baa-4479-b42e-48da84642330", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/WRITE\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Kubernetes Pod Created With HostPID", + "description": "This rule detects an attempt to create or modify a pod attached to the host PID namespace. HostPID allows a pod to access all the processes running on the host and could allow an attacker to take malicious action. When paired with ptrace this can be used to escalate privileges outside of the container. When paired with a privileged container, the pod can see all of the processes on the host. An attacker can enter the init system (PID 1) on the host. From there, they could execute a shell and continue to escalate privileges to root.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 202, + "tags": [ + "Data Source: Kubernetes", + "Tactic: Execution", + "Tactic: Privilege Escalation" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "An administrator or developer may want to use a pod that runs as root and shares the hosts IPC, Network, and PID namespaces for debugging purposes. If something is going wrong in the cluster and there is no easy way to SSH onto the host nodes directly, a privileged pod of this nature can be useful for viewing things like iptable rules and network namespaces from the host's perspective. Add exceptions for trusted container images using the query field \"kubernetes.audit.requestObject.spec.container.image\"" + ], + "references": [ + "https://research.nccgroup.com/2021/11/10/detection-engineering-for-kubernetes-clusters/#part3-kubernetes-detections", + "https://kubernetes.io/docs/concepts/security/pod-security-policy/#host-namespaces", + "https://bishopfox.com/blog/kubernetes-pod-privilege-escalation" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1611", + "name": "Escape to Host", + "reference": "https://attack.mitre.org/techniques/T1611/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1610", + "name": "Deploy Container", + "reference": "https://attack.mitre.org/techniques/T1610/" + } + ] + } + ], + "id": "be2def3d-dd34-44e3-ae92-a5f9fe660b60", + "rule_id": "df7fda76-c92b-4943-bc68-04460a5ea5ba", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "kubernetes", + "version": "^1.4.1" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.objectRef.resource", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.containers.image", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.requestObject.spec.hostPID", + "type": "unknown", + "ecs": false + }, + { + "name": "kubernetes.audit.verb", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "logs-kubernetes.*" + ], + "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:\"pods\"\n and kubernetes.audit.verb:(\"create\" or \"update\" or \"patch\")\n and kubernetes.audit.requestObject.spec.hostPID:true\n and not kubernetes.audit.requestObject.spec.containers.image: (\"docker.elastic.co/beats/elastic-agent:8.4.0\")\n", + "language": "kuery" + }, + { + "name": "Azure Firewall Policy Deletion", + "description": "Identifies the deletion of a firewall policy in Azure. An adversary may delete a firewall policy in an attempt to evade defenses and/or to eliminate barriers to their objective.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Network Security Monitoring", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Firewall policy deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Firewall policy deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/firewall-manager/policy-overview" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "2547c0fc-7be2-4c49-853d-f49084aae987", + "rule_id": "e02bd3ea-72c6-4181-ac2b-0f83d17ad969", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.NETWORK/FIREWALLPOLICIES/DELETE\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Azure Event Hub Deletion", + "description": "Identifies an Event Hub deletion in Azure. An Event Hub is an event processing service that ingests and processes large volumes of events and data. An adversary may delete an Event Hub in an attempt to evade detection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Log Auditing", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Event Hub deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Event Hub deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-about", + "https://azure.microsoft.com/en-in/services/event-hubs/", + "https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "adb5f692-97c9-422c-9d48-084fdfb78161", + "rule_id": "e0f36de1-0342-453d-95a9-a068b257b053", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.EVENTHUB/NAMESPACES/EVENTHUBS/DELETE\" and event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "System Network Connections Discovery", + "description": "Adversaries may attempt to get a listing of network connections to or from a compromised system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1049", + "name": "System Network Connections Discovery", + "reference": "https://attack.mitre.org/techniques/T1049/" + } + ] + } + ], + "id": "ee7d6f2f-fc51-400d-9fcc-f3ea64121dd6", + "rule_id": "e2dc8f8c-5f16-42fa-b49e-0eb8057f7444", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and\n process.name : (\"netstat\", \"lsof\", \"who\", \"w\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "GCP IAM Role Deletion", + "description": "Identifies an Identity and Access Management (IAM) role deletion in Google Cloud Platform (GCP). A role contains a set of permissions that allows you to perform specific actions on Google Cloud resources. An adversary may delete an IAM role to inhibit access to accounts utilized by legitimate users.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Identity and Access Audit", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Role deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Role deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://cloud.google.com/iam/docs/understanding-roles" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1531", + "name": "Account Access Removal", + "reference": "https://attack.mitre.org/techniques/T1531/" + } + ] + } + ], + "id": "54783da6-440e-4cc4-8738-33557345fa3a", + "rule_id": "e2fb5b18-e33c-4270-851e-c3d675c9afcd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.DeleteRole and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Ransomware - Prevented - Elastic Endgame", + "description": "Elastic Endgame prevented ransomware. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 101, + "tags": [ + "Data Source: Elastic Endgame" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-15m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [], + "id": "9b335ac5-6dcc-4f3d-b3f2-97f604f35118", + "rule_id": "e3c5d5cb-41d5-4206-805c-f30561eae3ac", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "endgame.event_subtype_full", + "type": "unknown", + "ecs": false + }, + { + "name": "endgame.metadata.type", + "type": "unknown", + "ecs": false + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "endgame-*" + ], + "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:ransomware_event or endgame.event_subtype_full:ransomware_event)\n", + "language": "kuery" + }, + { + "name": "Unusual Process For MSSQL Service Accounts", + "description": "Identifies unusual process executions using MSSQL Service accounts, which can indicate the exploitation/compromise of SQL instances. Attackers may exploit exposed MSSQL instances for initial access or lateral movement.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Tactic: Persistence", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.microsoft.com/en-us/security/blog/2023/08/24/flax-typhoon-using-legitimate-software-to-quietly-access-taiwanese-organizations/", + "https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-windows-service-accounts-and-permissions?view=sql-server-ver16" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1505", + "name": "Server Software Component", + "reference": "https://attack.mitre.org/techniques/T1505/", + "subtechnique": [ + { + "id": "T1505.001", + "name": "SQL Stored Procedures", + "reference": "https://attack.mitre.org/techniques/T1505/001/" + } + ] + } + ] + } + ], + "id": "03bd32cb-83a3-48a9-af34-2f331b7954f1", + "rule_id": "e74d645b-fec6-431e-bf93-ca64a538e0de", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.domain", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and host.os.type == \"windows\" and\n user.name : (\n \"SQLSERVERAGENT\", \"SQLAGENT$*\",\n \"MSSQLSERVER\", \"MSSQL$*\",\n \"MSSQLServerOLAPService\",\n \"ReportServer*\", \"MsDtsServer150\",\n \"MSSQLFDLauncher*\",\n \"SQLServer2005SQLBrowserUser$*\",\n \"SQLWriter\", \"winmgmt\"\n ) and user.domain : \"NT SERVICE\" and\n not (\n process.name : (\n \"sqlceip.exe\", \"sqlservr.exe\", \"sqlagent.exe\",\n \"msmdsrv.exe\", \"ReportingServicesService.exe\",\n \"MsDtsSrvr.exe\", \"sqlbrowser.exe\"\n ) and (process.code_signature.subject_name : \"Microsoft Corporation\" and process.code_signature.trusted == true)\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Azure Automation Webhook Created", + "description": "Identifies when an Azure Automation webhook is created. Azure Automation runbooks can be configured to execute via a webhook. A webhook uses a custom URL passed to Azure Automation along with a data payload specific to the runbook. An adversary may create a webhook in order to trigger a runbook that contains malicious code.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Configuration Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://powerzure.readthedocs.io/en/latest/Functions/operational.html#create-backdoor", + "https://github.com/hausec/PowerZure", + "https://posts.specterops.io/attacking-azure-azure-ad-and-introducing-powerzure-ca70b330511a", + "https://www.ciraltos.com/webhooks-and-azure-automation-runbooks/" + ], + "max_signals": 100, + "threat": [], + "id": "c7fdf8ae-0b2b-46ea-82cc-d62d72d12ba6", + "rule_id": "e9ff9c1c-fe36-4d0d-b3fd-9e0bf4853a62", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and\n azure.activitylogs.operation_name:\n (\n \"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/WEBHOOKS/ACTION\" or\n \"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/WEBHOOKS/WRITE\"\n ) and\n event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "External Alerts", + "description": "Generates a detection alert for each external alert written to the configured indices. Enabling this rule allows you to immediately begin investigating external alerts in the app.", + "risk_score": 47, + "severity": "medium", + "rule_name_override": "message", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 102, + "tags": [ + "OS: Windows", + "Data Source: APM", + "OS: macOS", + "OS: Linux" + ], + "enabled": false, + "risk_score_mapping": [ + { + "field": "event.risk_score", + "operator": "equals", + "value": "" + } + ], + "severity_mapping": [ + { + "field": "event.severity", + "operator": "equals", + "severity": "low", + "value": "21" + }, + { + "field": "event.severity", + "operator": "equals", + "severity": "medium", + "value": "47" + }, + { + "field": "event.severity", + "operator": "equals", + "severity": "high", + "value": "73" + }, + { + "field": "event.severity", + "operator": "equals", + "severity": "critical", + "value": "99" + } + ], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 10000, + "threat": [], + "id": "76453041-89d0-40bd-8630-a73920de3a92", + "rule_id": "eb079c62-4481-4d6e-9643-3ca499df7aaa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "apm-*-transaction*", + "traces-apm*", + "auditbeat-*", + "filebeat-*", + "logs-*", + "packetbeat-*", + "winlogbeat-*" + ], + "query": "event.kind:alert and not event.module:(endgame or endpoint or cloud_defend)\n", + "language": "kuery" + }, + { + "name": "File Made Executable via Chmod Inside A Container", + "description": "This rule detects when chmod is used to add the execute permission to a file inside a container. Modifying file permissions to make a file executable could indicate malicious activity, as an attacker may attempt to run unauthorized or malicious code inside the container.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1222", + "name": "File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/", + "subtechnique": [ + { + "id": "T1222.002", + "name": "Linux and Mac File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/002/" + } + ] + } + ] + } + ], + "id": "0975852f-e366-409c-83ec-4a4a2cc39b82", + "rule_id": "ec604672-bed9-43e1-8871-cf591c052550", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where container.id: \"*\" and event.type in (\"change\", \"creation\") and\n\n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/\n(process.name : \"chmod\" or process.args : \"chmod\") and \nprocess.args : (\"*x*\", \"777\", \"755\", \"754\", \"700\") and not process.args: \"-x\"\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "Microsoft 365 Inbox Forwarding Rule Created", + "description": "Identifies when a new Inbox forwarding rule is created in Microsoft 365. Inbox rules process messages in the Inbox based on conditions and take actions. In this case, the rules will forward the emails to a defined address. Attackers can abuse Inbox Rules to intercept and exfiltrate email data without making organization-wide configuration changes or having the corresponding privileges.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Collection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Gary Blackwell", + "Austin Songer" + ], + "false_positives": [ + "Users and Administrators can create inbox rules for legitimate purposes. Verify if it complies with the company policy and done with the user's consent. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/responding-to-a-compromised-email-account?view=o365-worldwide", + "https://docs.microsoft.com/en-us/powershell/module/exchange/new-inboxrule?view=exchange-ps", + "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/detect-and-remediate-outlook-rules-forms-attack?view=o365-worldwide", + "https://raw.githubusercontent.com/PwC-IR/Business-Email-Compromise-Guide/main/Extractor%20Cheat%20Sheet.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1114", + "name": "Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/", + "subtechnique": [ + { + "id": "T1114.003", + "name": "Email Forwarding Rule", + "reference": "https://attack.mitre.org/techniques/T1114/003/" + } + ] + } + ] + } + ], + "id": "0e5a9937-a43c-46c1-bf53-1763a5f59029", + "rule_id": "ec8efb0c-604d-42fa-ac46-ed1cfbc38f78", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + }, + { + "name": "o365.audit.Parameters.ForwardAsAttachmentTo", + "type": "unknown", + "ecs": false + }, + { + "name": "o365.audit.Parameters.ForwardTo", + "type": "unknown", + "ecs": false + }, + { + "name": "o365.audit.Parameters.RedirectTo", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and\nevent.category:web and event.action:(\"New-InboxRule\" or \"Set-InboxRule\") and\n (\n o365.audit.Parameters.ForwardTo:* or\n o365.audit.Parameters.ForwardAsAttachmentTo:* or\n o365.audit.Parameters.RedirectTo:*\n )\n and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "Azure Global Administrator Role Addition to PIM User", + "description": "Identifies an Azure Active Directory (AD) Global Administrator role addition to a Privileged Identity Management (PIM) user account. PIM is a service that enables you to manage, control, and monitor access to important resources in an organization. Users who are assigned to the Global administrator role can read and modify any administrative setting in your Azure AD organization.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Global administrator additions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Global administrator additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/" + } + ] + } + ], + "id": "9bc01f6a-58fe-4987-88ef-273e9779b053", + "rule_id": "ed9ecd27-e3e6-4fd9-8586-7754803f7fc8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "azure.auditlogs.properties.category", + "type": "keyword", + "ecs": false + }, + { + "name": "azure.auditlogs.properties.target_resources.*.display_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.auditlogs and azure.auditlogs.properties.category:RoleManagement and\n azure.auditlogs.operation_name:(\"Add eligible member to role in PIM completed (permanent)\" or\n \"Add member to role in PIM completed (timebound)\") and\n azure.auditlogs.properties.target_resources.*.display_name:\"Global Administrator\" and\n event.outcome:(Success or success)\n", + "language": "kuery" + }, + { + "name": "Linux User Account Creation", + "description": "Identifies attempts to create new users. Attackers may add new users to establish persistence on a system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating Linux User Account Creation\n\nThe `useradd` and `adduser` commands are used to create new user accounts in Linux-based operating systems.\n\nAttackers may create new accounts (both local and domain) to maintain access to victim systems.\n\nThis rule identifies the usage of `useradd` and `adduser` to create new accounts.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible investigation steps\n\n- Investigate whether the user was created succesfully.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific User\",\"query\":\"SELECT * FROM users WHERE username = {{user.name}}\"}}\n- Investigate whether the user is currently logged in and active.\n - !{osquery{\"label\":\"Osquery - Investigate the Account Authentication Status\",\"query\":\"SELECT * FROM logged_in_users WHERE user = {{user.name}}\"}}\n- Identify if the account was added to privileged groups or assigned special privileges after creation.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific Group\",\"query\":\"SELECT * FROM groups WHERE groupname = {{group.name}}\"}}\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Account creation is a common administrative task, so there is a high chance of the activity being legitimate. Before investigating further, verify that this activity is not benign.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Delete the created account.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Resources: Investigation Guide" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1136/001/" + } + ] + } + ] + } + ], + "id": "a908f5e2-62a1-41d1-ab69-745e4046e21e", + "rule_id": "edfd5ca9-9d6c-44d9-b615-1e56b920219c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "iam where host.os.type == \"linux\" and (event.type == \"user\" and event.type == \"creation\") and\nprocess.name in (\"useradd\", \"adduser\") and user.name != null\n", + "language": "eql", + "index": [ + "logs-system.auth-*" + ] + }, + { + "name": "Azure Alert Suppression Rule Created or Modified", + "description": "Identifies the creation of suppression rules in Azure. Suppression rules are a mechanism used to suppress alerts previously identified as false positives or too noisy to be in production. This mechanism can be abused or mistakenly configured, resulting in defense evasions and loss of security visibility.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Austin Songer" + ], + "false_positives": [ + "Suppression Rules can be created legitimately by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Suppression Rules created by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations", + "https://docs.microsoft.com/en-us/rest/api/securitycenter/alerts-suppression-rules/update" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "c192a736-0b2c-444e-b5ae-8e8213983f5f", + "rule_id": "f0bc081a-2346-4744-a6a4-81514817e888", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0", + "integration": "activitylogs" + } + ], + "required_fields": [ + { + "name": "azure.activitylogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.SECURITY/ALERTSSUPPRESSIONRULES/WRITE\" and\nevent.outcome: \"success\"\n", + "language": "kuery" + }, + { + "name": "Forwarded Google Workspace Security Alert", + "description": "Identifies the occurrence of a security alert from the Google Workspace alerts center. Google Workspace's security alert center provides an overview of actionable alerts that may be affecting an organization's domain. An alert is a warning of a potential security issue that Google has detected.", + "risk_score": 73, + "severity": "high", + "rule_name_override": "google_workspace.alert.type", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\nThis is a promotion rule for Google Workspace security events, which are alertable events per the vendor.\nConsult vendor documentation on interpreting specific events.", + "version": 2, + "tags": [ + "Domain: Cloud", + "Data Source: Google Workspace", + "Use Case: Log Auditing", + "Use Case: Threat Detection" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [ + { + "field": "google_workspace.alert.metadata.severity", + "operator": "equals", + "severity": "low", + "value": "LOW" + }, + { + "field": "google_workspace.alert.metadata.severity", + "operator": "equals", + "severity": "medium", + "value": "MEDIUM" + }, + { + "field": "google_workspace.alert.metadata.severity", + "operator": "equals", + "severity": "high", + "value": "HIGH" + } + ], + "interval": "10m", + "from": "now-130m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "To tune this rule, add exceptions to exclude any google_workspace.alert.type which should not trigger this rule.", + "For additional tuning, severity exceptions for google_workspace.alert.metadata.severity can be added." + ], + "references": [ + "https://workspace.google.com/products/admin/alert-center/" + ], + "max_signals": 100, + "threat": [], + "id": "da4d7fb7-1ec1-4eda-bca3-40716f003dde", + "rule_id": "f1a6d0f4-95b8-11ed-9517-f661ea17fbcc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "google_workspace", + "version": "^2.0.0" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "query", + "index": [ + "filebeat-*", + "logs-google_workspace*" + ], + "query": "event.dataset: google_workspace.alert\n", + "language": "kuery" + }, + { + "name": "Potential curl CVE-2023-38545 Exploitation", + "description": "Detects potential exploitation of curl CVE-2023-38545 by monitoring for vulnerable command line arguments in conjunction with an unusual command line length. A flaw in curl version <= 8.3 makes curl vulnerable to a heap based buffer overflow during the SOCKS5 proxy handshake. Upgrade to curl version >= 8.4 to patch this vulnerability. This exploit can be executed with and without the use of environment variables. For increased visibility, enable the collection of http_proxy, HTTPS_PROXY and ALL_PROXY environment variables based on the instructions provided in the setup guide of this rule.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Use Case: Vulnerability", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://curl.se/docs/CVE-2023-38545.html", + "https://daniel.haxx.se/blog/2023/10/11/curl-8-4-0/", + "https://twitter.com/_JohnHammond/status/1711986412554531015" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1203", + "name": "Exploitation for Client Execution", + "reference": "https://attack.mitre.org/techniques/T1203/" + } + ] + } + ], + "id": "5919bd1f-613c-444f-bdc2-b25091c69b78", + "rule_id": "f41296b4-9975-44d6-9486-514c6f635b2d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.env_vars", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\nElastic Defend integration does not collect environment variable logging by default.\nIn order to capture this behavior, this rule requires a specific configuration option set within the advanced settings of the Elastic Defend integration.\n #### To set up environment variable capture for an Elastic Agent policy:\n- Go to Security → Manage → Policies.\n- Select an Elastic Agent policy.\n- Click Show advanced settings.\n- Scroll down or search for linux.advanced.capture_env_vars.\n- Enter the names of env vars you want to capture, separated by commas.\n- For this rule the linux.advanced.capture_env_vars variable should be set to \"http_proxy,HTTPS_PROXY,ALL_PROXY\".\n- Click Save.\nAfter saving the integration change, the Elastic Agents running this policy will be updated and\nthe rule will function properly.\nFor more information on capturing environment variables refer the [helper guide](https://www.elastic.co/guide/en/security/current/environment-variable-capture.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and process.name == \"curl\" \nand (\n process.args : (\"--socks5-hostname\", \"--proxy\", \"--preproxy\", \"socks5*\") or \n process.env_vars: (\"http_proxy=socks5h://*\", \"HTTPS_PROXY=socks5h://*\", \"ALL_PROXY=socks5h://*\")\n) and length(process.command_line) > 255\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "SSH Connection Established Inside A Running Container", + "description": "This rule detects an incoming SSH connection established inside a running container. Running an ssh daemon inside a container should be avoided and monitored closely if necessary. If an attacker gains valid credentials they can use it to gain initial access or establish persistence within a compromised environment.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "SSH usage may be legitimate depending on the environment. Access patterns and follow-on activity should be analyzed to distinguish between authorized and potentially malicious behavior." + ], + "references": [ + "https://microsoft.github.io/Threat-Matrix-for-Kubernetes/techniques/SSH%20server%20running%20inside%20container/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1133", + "name": "External Remote Services", + "reference": "https://attack.mitre.org/techniques/T1133/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.004", + "name": "SSH", + "reference": "https://attack.mitre.org/techniques/T1021/004/" + } + ] + } + ] + } + ], + "id": "1a9955a9-3c3e-4bd2-82e6-8c62ca2180d8", + "rule_id": "f5488ac1-099e-4008-a6cb-fb638a0f0828", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entry_leader.entry_meta.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entry_leader.same_as_process", + "type": "boolean", + "ecs": true + }, + { + "name": "process.interactive", + "type": "boolean", + "ecs": true + }, + { + "name": "process.session_leader.same_as_process", + "type": "boolean", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where container.id: \"*\" and event.type == \"start\" and \n\n/* use of sshd to enter a container*/\nprocess.entry_leader.entry_meta.type: \"sshd\" and \n\n/* process is the initial process run in a container or start of a new session*/\n(process.entry_leader.same_as_process== true or process.session_leader.same_as_process== true) and \n\n/* interactive process*/\nprocess.interactive== true\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "WRITEDAC Access on Active Directory Object", + "description": "Identifies the access on an object with WRITEDAC permissions. With the WRITEDAC permission, the user can perform a Write Discretionary Access Control List (WriteDACL) operation, which is used to modify the access control rules associated with a specific object within Active Directory. Attackers may abuse this privilege to grant themselves or other compromised accounts additional rights, ultimately compromising the target object, resulting in privilege escalation, lateral movement, and persistence.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Active Directory", + "Use Case: Active Directory Monitoring", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.blackhat.com/docs/us-17/wednesday/us-17-Robbins-An-ACE-Up-The-Sleeve-Designing-Active-Directory-DACL-Backdoors.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1222", + "name": "File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/", + "subtechnique": [ + { + "id": "T1222.001", + "name": "Windows File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/001/" + } + ] + } + ] + } + ], + "id": "226455e6-c1f7-4931-b237-7de1b9d72c56", + "rule_id": "f5861570-e39a-4b8a-9259-abd39f84cb97", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + }, + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.code", + "type": "keyword", + "ecs": true + }, + { + "name": "winlog.event_data.AccessMask", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'Audit Directory Service Access' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Access (Success,Failure)\n```\n", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-system.*", + "logs-windows.*" + ], + "query": "event.action:\"Directory Service Access\" and event.code:\"5136\" and\n winlog.event_data.AccessMask:\"0x40000\"\n", + "language": "kuery" + }, + { + "name": "WMIC Remote Command", + "description": "Identifies the use of wmic.exe to run commands on remote hosts. While this can be used by administrators legitimately, attackers can abuse this built-in utility to achieve lateral movement.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.006", + "name": "Windows Remote Management", + "reference": "https://attack.mitre.org/techniques/T1021/006/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "1fba900d-74a4-4b04-b259-ea7f2f5f1206", + "rule_id": "f59668de-caa0-4b84-94c1-3a1549e1e798", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"WMIC.exe\" and\n process.args : \"*node:*\" and\n process.args : (\"call\", \"set\", \"get\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Account or Group Discovery via Built-In Tools", + "description": "Adversaries may use built-in applications to get a listing of local system or domain accounts and groups.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1069", + "name": "Permission Groups Discovery", + "reference": "https://attack.mitre.org/techniques/T1069/", + "subtechnique": [ + { + "id": "T1069.001", + "name": "Local Groups", + "reference": "https://attack.mitre.org/techniques/T1069/001/" + }, + { + "id": "T1069.002", + "name": "Domain Groups", + "reference": "https://attack.mitre.org/techniques/T1069/002/" + } + ] + }, + { + "id": "T1087", + "name": "Account Discovery", + "reference": "https://attack.mitre.org/techniques/T1087/", + "subtechnique": [ + { + "id": "T1087.001", + "name": "Local Account", + "reference": "https://attack.mitre.org/techniques/T1087/001/" + }, + { + "id": "T1087.002", + "name": "Domain Account", + "reference": "https://attack.mitre.org/techniques/T1087/002/" + } + ] + } + ] + } + ], + "id": "b17f8e74-9bdd-4a54-85e0-9f268bd3c0fa", + "rule_id": "f638a66d-3bbf-46b1-a52c-ef6f39fb6caf", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type== \"start\" and event.action == \"exec\" and\n ( (process.name: (\"groups\",\"id\"))\n or (process.name : \"dscl\" and process.args : (\"/Active Directory/*\", \"/Users*\", \"/Groups*\"))\n or (process.name: \"dscacheutil\" and process.args:(\"user\", \"group\"))\n or process.args:(\"/etc/passwd\", \"/etc/master.passwd\", \"/etc/sudoers\")\n or (process.name: \"getent\" and process.args:(\"passwd\", \"group\"))\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "System Hosts File Access", + "description": "Identifies the use of built-in tools to read the contents of \\etc\\hosts on a local machine. Attackers may use this data to discover remote machines in an environment that may be used for Lateral Movement from the current system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1018", + "name": "Remote System Discovery", + "reference": "https://attack.mitre.org/techniques/T1018/" + } + ] + } + ], + "id": "7252df2d-5435-4126-b3e1-5051afc3f601", + "rule_id": "f75f65cf-ed04-48df-a7ff-b02a8bfe636e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and event.action == \"exec\" and\n (process.name:(\"vi\", \"nano\", \"cat\", \"more\", \"less\") and process.args : \"/etc/hosts\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Azure Service Principal Credentials Added", + "description": "Identifies when new Service Principal credentials have been added in Azure. In most organizations, credentials will be added to service principals infrequently. Hijacking an application (by adding a rogue secret or certificate) with granted permissions will allow the attacker to access data that is normally protected by MFA requirements.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Azure", + "Use Case: Identity and Access Audit", + "Tactic: Impact" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "10m", + "from": "now-25m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic", + "Austin Songer" + ], + "false_positives": [ + "Service principal credential additions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Credential additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." + ], + "references": [ + "https://www.fireeye.com/content/dam/collateral/en/wp-m-unc2452.pdf" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1496", + "name": "Resource Hijacking", + "reference": "https://attack.mitre.org/techniques/T1496/" + } + ] + } + ], + "id": "c921c2f6-4d7c-4414-97f8-cabe369864fe", + "rule_id": "f766ffaf-9568-4909-b734-75d19b35cbf4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "azure", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "azure.auditlogs.operation_name", + "type": "keyword", + "ecs": false + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-azure*" + ], + "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Add service principal credentials\" and event.outcome:(success or Success)\n", + "language": "kuery" + }, + { + "name": "SSH Authorized Keys File Modified Inside a Container", + "description": "This rule detects the creation or modification of an authorized_keys or sshd_config file inside a container. The Secure Shell (SSH) authorized_keys file specifies which users are allowed to log into a server using public key authentication. Adversaries may modify it to maintain persistence on a victim host by adding their own public key(s). Unexpected and unauthorized SSH usage inside a container can be an indicator of compromise and should be investigated.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.004", + "name": "SSH Authorized Keys", + "reference": "https://attack.mitre.org/techniques/T1098/004/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1563", + "name": "Remote Service Session Hijacking", + "reference": "https://attack.mitre.org/techniques/T1563/", + "subtechnique": [ + { + "id": "T1563.001", + "name": "SSH Hijacking", + "reference": "https://attack.mitre.org/techniques/T1563/001/" + } + ] + }, + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.004", + "name": "SSH", + "reference": "https://attack.mitre.org/techniques/T1021/004/" + } + ] + } + ] + } + ], + "id": "9efea149-6a6c-48b9-b61d-1ef05438bf09", + "rule_id": "f7769104-e8f9-4931-94a2-68fc04eadec3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "container.id", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where container.id:\"*\" and\n event.type in (\"change\", \"creation\") and file.name: (\"authorized_keys\", \"authorized_keys2\", \"sshd_config\")\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "Potential Disabling of AppArmor", + "description": "This rule monitors for potential attempts to disable AppArmor. AppArmor is a Linux security module that enforces fine-grained access control policies to restrict the actions and resources that specific applications and processes can access. Adversaries may disable security tools to avoid possible detection of their tools and activities.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "3939f961-38bf-4de8-90ea-59889be3258a", + "rule_id": "fac52c69-2646-4e79-89c0-fd7653461010", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and (\n (process.name == \"systemctl\" and process.args == \"disable\" and process.args == \"apparmor\") or\n (process.name == \"ln\" and process.args : \"/etc/apparmor.d/*\" and process.args : \"/etc/apparmor.d/disable/\")\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Masquerading as System32 DLL", + "description": "Identifies suspicious instances of default system32 DLLs either unsigned or signed with non-MS certificates. This can potentially indicate the attempt to masquerade as system DLLs, perform DLL Search Order Hijacking or backdoor and resign legitimate DLLs.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 102, + "tags": [ + "Domain: Endpoint", + "Data Source: Elastic Defend", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Persistence", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + }, + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + }, + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.001", + "name": "DLL Search Order Hijacking", + "reference": "https://attack.mitre.org/techniques/T1574/001/" + }, + { + "id": "T1574.002", + "name": "DLL Side-Loading", + "reference": "https://attack.mitre.org/techniques/T1574/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1554", + "name": "Compromise Client Software Binary", + "reference": "https://attack.mitre.org/techniques/T1554/" + } + ] + } + ], + "id": "e66de135-b6ac-4218-8285-892069f04a30", + "rule_id": "fb01d790-9f74-4e76-97dd-b4b0f7bf6435", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.Ext.relative_file_creation_time", + "type": "unknown", + "ecs": false + }, + { + "name": "dll.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.path", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "library where event.action == \"load\" and dll.Ext.relative_file_creation_time <= 3600 and\n not (\n dll.path : (\n \"?:\\\\Windows\\\\System32\\\\*\",\n \"?:\\\\Windows\\\\SysWOW64\\\\*\",\n \"?:\\\\Windows\\\\SystemTemp\\\\*\",\n \"?:\\\\$WINDOWS.~BT\\\\NewOS\\\\Windows\\\\WinSxS\\\\*\",\n \"?:\\\\$WINDOWS.~BT\\\\NewOS\\\\Windows\\\\System32\\\\*\",\n \"?:\\\\$WINDOWS.~BT\\\\Sources\\\\*\",\n \"?:\\\\$WINDOWS.~BT\\\\Work\\\\*\",\n \"?:\\\\Windows\\\\WinSxS\\\\*\",\n \"?:\\\\Windows\\\\SoftwareDistribution\\\\Download\\\\*\",\n \"?:\\\\Windows\\\\assembly\\\\NativeImages_v*\"\n )\n ) and\n not (\n dll.code_signature.subject_name in (\n \"Microsoft Windows\",\n \"Microsoft Corporation\",\n \"Microsoft Windows Hardware Abstraction Layer Publisher\",\n \"Microsoft Windows Publisher\",\n \"Microsoft Windows 3rd party Component\",\n \"Microsoft 3rd Party Application Component\"\n ) and dll.code_signature.trusted == true\n ) and not dll.code_signature.status : (\"errorCode_endpoint*\", \"errorUntrustedRoot\", \"errorChaining\") and\n dll.name : (\n \"aadauthhelper.dll\", \"aadcloudap.dll\", \"aadjcsp.dll\", \"aadtb.dll\", \"aadwamextension.dll\", \"aarsvc.dll\", \"abovelockapphost.dll\", \"accessibilitycpl.dll\", \"accountaccessor.dll\", \"accountsrt.dll\", \"acgenral.dll\", \"aclayers.dll\", \"acledit.dll\", \"aclui.dll\", \"acmigration.dll\", \"acppage.dll\", \"acproxy.dll\", \"acspecfc.dll\", \"actioncenter.dll\", \"actioncentercpl.dll\", \"actionqueue.dll\", \"activationclient.dll\", \"activeds.dll\", \"activesynccsp.dll\", \"actxprxy.dll\", \"acwinrt.dll\", \"acxtrnal.dll\", \"adaptivecards.dll\", \"addressparser.dll\", \"adhapi.dll\", \"adhsvc.dll\", \"admtmpl.dll\", \"adprovider.dll\", \"adrclient.dll\", \"adsldp.dll\", \"adsldpc.dll\", \"adsmsext.dll\", \"adsnt.dll\", \"adtschema.dll\", \"advancedemojids.dll\", \"advapi32.dll\", \"advapi32res.dll\", \"advpack.dll\", \"aeevts.dll\", \"aeinv.dll\", \"aepic.dll\", \"ajrouter.dll\", \"altspace.dll\", \"amsi.dll\", \"amsiproxy.dll\", \"amstream.dll\", \"apds.dll\", \"aphostclient.dll\", \"aphostres.dll\", \"aphostservice.dll\", \"apisampling.dll\", \"apisetschema.dll\", \"apmon.dll\", \"apmonui.dll\", \"appcontracts.dll\", \"appextension.dll\", \"apphelp.dll\", \"apphlpdm.dll\", \"appidapi.dll\", \"appidsvc.dll\", \"appinfo.dll\", \"appinfoext.dll\", \"applicationframe.dll\", \"applockercsp.dll\", \"appmgmts.dll\", \"appmgr.dll\", \"appmon.dll\", \"appointmentapis.dll\", \"appraiser.dll\", \"appreadiness.dll\", \"apprepapi.dll\", \"appresolver.dll\", \"appsruprov.dll\", \"appvcatalog.dll\", \"appvclientps.dll\", \"appvetwclientres.dll\", \"appvintegration.dll\", \"appvmanifest.dll\", \"appvpolicy.dll\", \"appvpublishing.dll\", \"appvreporting.dll\", \"appvscripting.dll\", \"appvsentinel.dll\", \"appvstreamingux.dll\", \"appvstreammap.dll\", \"appvterminator.dll\", \"appxalluserstore.dll\", \"appxpackaging.dll\", \"appxsip.dll\", \"appxsysprep.dll\", \"archiveint.dll\", \"asferror.dll\", \"aspnet_counters.dll\", \"asycfilt.dll\", \"atl.dll\", \"atlthunk.dll\", \"atmlib.dll\", \"audioeng.dll\", \"audiohandlers.dll\", \"audiokse.dll\", \"audioses.dll\", \"audiosrv.dll\", \"auditcse.dll\", \"auditpolcore.dll\", \"auditpolmsg.dll\", \"authbroker.dll\", \"authbrokerui.dll\", \"authentication.dll\", \"authext.dll\", \"authfwcfg.dll\", \"authfwgp.dll\", \"authfwsnapin.dll\", \"authfwwizfwk.dll\", \"authhostproxy.dll\", \"authui.dll\", \"authz.dll\", \"autopilot.dll\", \"autopilotdiag.dll\", \"autoplay.dll\", \"autotimesvc.dll\", \"avicap32.dll\", \"avifil32.dll\", \"avrt.dll\", \"axinstsv.dll\", \"azroles.dll\", \"azroleui.dll\", \"azsqlext.dll\", \"basecsp.dll\", \"basesrv.dll\", \"batmeter.dll\", \"bcastdvrbroker.dll\", \"bcastdvrclient.dll\", \"bcastdvrcommon.dll\", \"bcd.dll\", \"bcdprov.dll\", \"bcdsrv.dll\", \"bcp47langs.dll\", \"bcp47mrm.dll\", \"bcrypt.dll\", \"bcryptprimitives.dll\", \"bdehdcfglib.dll\", \"bderepair.dll\", \"bdesvc.dll\", \"bdesysprep.dll\", \"bdeui.dll\", \"bfe.dll\", \"bi.dll\", \"bidispl.dll\", \"bindfltapi.dll\", \"bingasds.dll\", \"bingfilterds.dll\", \"bingmaps.dll\", \"biocredprov.dll\", \"bisrv.dll\", \"bitlockercsp.dll\", \"bitsigd.dll\", \"bitsperf.dll\", \"bitsproxy.dll\", \"biwinrt.dll\", \"blbevents.dll\", \"blbres.dll\", \"blb_ps.dll\", \"bluetoothapis.dll\", \"bnmanager.dll\", \"bootmenuux.dll\", \"bootstr.dll\", \"bootux.dll\", \"bootvid.dll\", \"bridgeres.dll\", \"brokerlib.dll\", \"browcli.dll\", \"browserbroker.dll\", \"browseui.dll\", \"btagservice.dll\", \"bthavctpsvc.dll\", \"bthavrcp.dll\", \"bthavrcpappsvc.dll\", \"bthci.dll\", \"bthpanapi.dll\", \"bthradiomedia.dll\", \"bthserv.dll\", \"bthtelemetry.dll\", \"btpanui.dll\", \"bwcontexthandler.dll\", \"cabapi.dll\", \"cabinet.dll\", \"cabview.dll\", \"callbuttons.dll\", \"cameracaptureui.dll\", \"capauthz.dll\", \"capiprovider.dll\", \"capisp.dll\", \"captureservice.dll\", \"castingshellext.dll\", \"castlaunch.dll\", \"catsrv.dll\", \"catsrvps.dll\", \"catsrvut.dll\", \"cbdhsvc.dll\", \"cca.dll\", \"cdd.dll\", \"cdosys.dll\", \"cdp.dll\", \"cdprt.dll\", \"cdpsvc.dll\", \"cdpusersvc.dll\", \"cemapi.dll\", \"certca.dll\", \"certcli.dll\", \"certcredprovider.dll\", \"certenc.dll\", \"certenroll.dll\", \"certenrollui.dll\", \"certmgr.dll\", \"certpkicmdlet.dll\", \"certpoleng.dll\", \"certprop.dll\", \"cewmdm.dll\", \"cfgbkend.dll\", \"cfgmgr32.dll\", \"cfgspcellular.dll\", \"cfgsppolicy.dll\", \"cflapi.dll\", \"cfmifs.dll\", \"cfmifsproxy.dll\", \"chakra.dll\", \"chakradiag.dll\", \"chakrathunk.dll\", \"chartv.dll\", \"chatapis.dll\", \"chkwudrv.dll\", \"chsstrokeds.dll\", \"chtbopomofods.dll\", \"chtcangjieds.dll\", \"chthkstrokeds.dll\", \"chtquickds.dll\", \"chxapds.dll\", \"chxdecoder.dll\", \"chxhapds.dll\", \"chxinputrouter.dll\", \"chxranker.dll\", \"ci.dll\", \"cic.dll\", \"cimfs.dll\", \"circoinst.dll\", \"ciwmi.dll\", \"clb.dll\", \"clbcatq.dll\", \"cldapi.dll\", \"cleanpccsp.dll\", \"clfsw32.dll\", \"cliconfg.dll\", \"clipboardserver.dll\", \"clipc.dll\", \"clipsvc.dll\", \"clipwinrt.dll\", \"cloudap.dll\", \"cloudidsvc.dll\", \"clrhost.dll\", \"clusapi.dll\", \"cmcfg32.dll\", \"cmdext.dll\", \"cmdial32.dll\", \"cmgrcspps.dll\", \"cmifw.dll\", \"cmintegrator.dll\", \"cmlua.dll\", \"cmpbk32.dll\", \"cmstplua.dll\", \"cmutil.dll\", \"cngcredui.dll\", \"cngprovider.dll\", \"cnvfat.dll\", \"cofiredm.dll\", \"colbact.dll\", \"colorcnv.dll\", \"colorui.dll\", \"combase.dll\", \"comcat.dll\", \"comctl32.dll\", \"comdlg32.dll\", \"coml2.dll\", \"comppkgsup.dll\", \"compstui.dll\", \"computecore.dll\", \"computenetwork.dll\", \"computestorage.dll\", \"comrepl.dll\", \"comres.dll\", \"comsnap.dll\", \"comsvcs.dll\", \"comuid.dll\", \"configmanager2.dll\", \"conhostv1.dll\", \"connect.dll\", \"consentux.dll\", \"consentuxclient.dll\", \"console.dll\", \"consolelogon.dll\", \"contactapis.dll\", \"container.dll\", \"coredpus.dll\", \"coreglobconfig.dll\", \"coremas.dll\", \"coremessaging.dll\", \"coremmres.dll\", \"coreshell.dll\", \"coreshellapi.dll\", \"coreuicomponents.dll\", \"correngine.dll\", \"courtesyengine.dll\", \"cpfilters.dll\", \"creddialogbroker.dll\", \"credprovhelper.dll\", \"credprovhost.dll\", \"credprovs.dll\", \"credprovslegacy.dll\", \"credssp.dll\", \"credui.dll\", \"crypt32.dll\", \"cryptbase.dll\", \"cryptcatsvc.dll\", \"cryptdlg.dll\", \"cryptdll.dll\", \"cryptext.dll\", \"cryptnet.dll\", \"cryptngc.dll\", \"cryptowinrt.dll\", \"cryptsp.dll\", \"cryptsvc.dll\", \"crypttpmeksvc.dll\", \"cryptui.dll\", \"cryptuiwizard.dll\", \"cryptxml.dll\", \"cscapi.dll\", \"cscdll.dll\", \"cscmig.dll\", \"cscobj.dll\", \"cscsvc.dll\", \"cscui.dll\", \"csplte.dll\", \"cspproxy.dll\", \"csrsrv.dll\", \"cxcredprov.dll\", \"c_g18030.dll\", \"c_gsm7.dll\", \"c_is2022.dll\", \"c_iscii.dll\", \"d2d1.dll\", \"d3d10.dll\", \"d3d10core.dll\", \"d3d10level9.dll\", \"d3d10warp.dll\", \"d3d10_1.dll\", \"d3d10_1core.dll\", \"d3d11.dll\", \"d3d11on12.dll\", \"d3d12.dll\", \"d3d12core.dll\", \"d3d8thk.dll\", \"d3d9.dll\", \"d3d9on12.dll\", \"d3dscache.dll\", \"dab.dll\", \"dabapi.dll\", \"daconn.dll\", \"dafbth.dll\", \"dafdnssd.dll\", \"dafescl.dll\", \"dafgip.dll\", \"dafiot.dll\", \"dafipp.dll\", \"dafmcp.dll\", \"dafpos.dll\", \"dafprintprovider.dll\", \"dafupnp.dll\", \"dafwcn.dll\", \"dafwfdprovider.dll\", \"dafwiprov.dll\", \"dafwsd.dll\", \"damediamanager.dll\", \"damm.dll\", \"das.dll\", \"dataclen.dll\", \"datusage.dll\", \"davclnt.dll\", \"davhlpr.dll\", \"davsyncprovider.dll\", \"daxexec.dll\", \"dbgcore.dll\", \"dbgeng.dll\", \"dbghelp.dll\", \"dbgmodel.dll\", \"dbnetlib.dll\", \"dbnmpntw.dll\", \"dciman32.dll\", \"dcntel.dll\", \"dcomp.dll\", \"ddaclsys.dll\", \"ddcclaimsapi.dll\", \"ddds.dll\", \"ddisplay.dll\", \"ddoiproxy.dll\", \"ddores.dll\", \"ddpchunk.dll\", \"ddptrace.dll\", \"ddputils.dll\", \"ddp_ps.dll\", \"ddraw.dll\", \"ddrawex.dll\", \"defragproxy.dll\", \"defragres.dll\", \"defragsvc.dll\", \"deploymentcsps.dll\", \"deskadp.dll\", \"deskmon.dll\", \"desktopshellext.dll\", \"devenum.dll\", \"deviceaccess.dll\", \"devicecenter.dll\", \"devicecredential.dll\", \"devicepairing.dll\", \"deviceuxres.dll\", \"devinv.dll\", \"devmgr.dll\", \"devobj.dll\", \"devpropmgr.dll\", \"devquerybroker.dll\", \"devrtl.dll\", \"dfdts.dll\", \"dfscli.dll\", \"dfshim.dll\", \"dfsshlex.dll\", \"dggpext.dll\", \"dhcpcmonitor.dll\", \"dhcpcore.dll\", \"dhcpcore6.dll\", \"dhcpcsvc.dll\", \"dhcpcsvc6.dll\", \"dhcpsapi.dll\", \"diagcpl.dll\", \"diagnosticlogcsp.dll\", \"diagperf.dll\", \"diagsvc.dll\", \"diagtrack.dll\", \"dialclient.dll\", \"dialserver.dll\", \"dictationmanager.dll\", \"difxapi.dll\", \"dimsjob.dll\", \"dimsroam.dll\", \"dinput.dll\", \"dinput8.dll\", \"direct2ddesktop.dll\", \"directml.dll\", \"discan.dll\", \"dismapi.dll\", \"dispbroker.dll\", \"dispex.dll\", \"display.dll\", \"displaymanager.dll\", \"dlnashext.dll\", \"dmappsres.dll\", \"dmcfgutils.dll\", \"dmcmnutils.dll\", \"dmcsps.dll\", \"dmdlgs.dll\", \"dmdskmgr.dll\", \"dmdskres.dll\", \"dmdskres2.dll\", \"dmenrollengine.dll\", \"dmintf.dll\", \"dmiso8601utils.dll\", \"dmloader.dll\", \"dmocx.dll\", \"dmoleaututils.dll\", \"dmpushproxy.dll\", \"dmpushroutercore.dll\", \"dmrcdecoder.dll\", \"dmrserver.dll\", \"dmsynth.dll\", \"dmusic.dll\", \"dmutil.dll\", \"dmvdsitf.dll\", \"dmwappushsvc.dll\", \"dmwmicsp.dll\", \"dmxmlhelputils.dll\", \"dnsapi.dll\", \"dnscmmc.dll\", \"dnsext.dll\", \"dnshc.dll\", \"dnsrslvr.dll\", \"docprop.dll\", \"dolbydecmft.dll\", \"domgmt.dll\", \"dosettings.dll\", \"dosvc.dll\", \"dot3api.dll\", \"dot3cfg.dll\", \"dot3conn.dll\", \"dot3dlg.dll\", \"dot3gpclnt.dll\", \"dot3gpui.dll\", \"dot3hc.dll\", \"dot3mm.dll\", \"dot3msm.dll\", \"dot3svc.dll\", \"dot3ui.dll\", \"dpapi.dll\", \"dpapiprovider.dll\", \"dpapisrv.dll\", \"dpnaddr.dll\", \"dpnathlp.dll\", \"dpnet.dll\", \"dpnhpast.dll\", \"dpnhupnp.dll\", \"dpnlobby.dll\", \"dps.dll\", \"dpx.dll\", \"drprov.dll\", \"drt.dll\", \"drtprov.dll\", \"drttransport.dll\", \"drvsetup.dll\", \"drvstore.dll\", \"dsauth.dll\", \"dsccore.dll\", \"dsccoreconfprov.dll\", \"dsclient.dll\", \"dscproxy.dll\", \"dsctimer.dll\", \"dsdmo.dll\", \"dskquota.dll\", \"dskquoui.dll\", \"dsound.dll\", \"dsparse.dll\", \"dsprop.dll\", \"dsquery.dll\", \"dsreg.dll\", \"dsregtask.dll\", \"dsrole.dll\", \"dssec.dll\", \"dssenh.dll\", \"dssvc.dll\", \"dsui.dll\", \"dsuiext.dll\", \"dswave.dll\", \"dtsh.dll\", \"ducsps.dll\", \"dui70.dll\", \"duser.dll\", \"dusmapi.dll\", \"dusmsvc.dll\", \"dwmapi.dll\", \"dwmcore.dll\", \"dwmghost.dll\", \"dwminit.dll\", \"dwmredir.dll\", \"dwmscene.dll\", \"dwrite.dll\", \"dxcore.dll\", \"dxdiagn.dll\", \"dxgi.dll\", \"dxgwdi.dll\", \"dxilconv.dll\", \"dxmasf.dll\", \"dxp.dll\", \"dxpps.dll\", \"dxptasksync.dll\", \"dxtmsft.dll\", \"dxtrans.dll\", \"dxva2.dll\", \"dynamoapi.dll\", \"eapp3hst.dll\", \"eappcfg.dll\", \"eappcfgui.dll\", \"eappgnui.dll\", \"eapphost.dll\", \"eappprxy.dll\", \"eapprovp.dll\", \"eapputil.dll\", \"eapsimextdesktop.dll\", \"eapsvc.dll\", \"eapteapauth.dll\", \"eapteapconfig.dll\", \"eapteapext.dll\", \"easconsent.dll\", \"easwrt.dll\", \"edgeangle.dll\", \"edgecontent.dll\", \"edgehtml.dll\", \"edgeiso.dll\", \"edgemanager.dll\", \"edpauditapi.dll\", \"edpcsp.dll\", \"edptask.dll\", \"edputil.dll\", \"eeprov.dll\", \"eeutil.dll\", \"efsadu.dll\", \"efscore.dll\", \"efsext.dll\", \"efslsaext.dll\", \"efssvc.dll\", \"efsutil.dll\", \"efswrt.dll\", \"ehstorapi.dll\", \"ehstorpwdmgr.dll\", \"ehstorshell.dll\", \"els.dll\", \"elscore.dll\", \"elshyph.dll\", \"elslad.dll\", \"elstrans.dll\", \"emailapis.dll\", \"embeddedmodesvc.dll\", \"emojids.dll\", \"encapi.dll\", \"energy.dll\", \"energyprov.dll\", \"energytask.dll\", \"enrollmentapi.dll\", \"enterpriseapncsp.dll\", \"enterprisecsps.dll\", \"enterpriseetw.dll\", \"eqossnap.dll\", \"errordetails.dll\", \"errordetailscore.dll\", \"es.dll\", \"esclprotocol.dll\", \"esclscan.dll\", \"esclwiadriver.dll\", \"esdsip.dll\", \"esent.dll\", \"esentprf.dll\", \"esevss.dll\", \"eshims.dll\", \"etwrundown.dll\", \"euiccscsp.dll\", \"eventaggregation.dll\", \"eventcls.dll\", \"evr.dll\", \"execmodelclient.dll\", \"execmodelproxy.dll\", \"explorerframe.dll\", \"exsmime.dll\", \"extrasxmlparser.dll\", \"f3ahvoas.dll\", \"facilitator.dll\", \"familysafetyext.dll\", \"faultrep.dll\", \"fcon.dll\", \"fdbth.dll\", \"fdbthproxy.dll\", \"fddevquery.dll\", \"fde.dll\", \"fdeploy.dll\", \"fdphost.dll\", \"fdpnp.dll\", \"fdprint.dll\", \"fdproxy.dll\", \"fdrespub.dll\", \"fdssdp.dll\", \"fdwcn.dll\", \"fdwnet.dll\", \"fdwsd.dll\", \"feclient.dll\", \"ffbroker.dll\", \"fhcat.dll\", \"fhcfg.dll\", \"fhcleanup.dll\", \"fhcpl.dll\", \"fhengine.dll\", \"fhevents.dll\", \"fhshl.dll\", \"fhsrchapi.dll\", \"fhsrchph.dll\", \"fhsvc.dll\", \"fhsvcctl.dll\", \"fhtask.dll\", \"fhuxadapter.dll\", \"fhuxapi.dll\", \"fhuxcommon.dll\", \"fhuxgraphics.dll\", \"fhuxpresentation.dll\", \"fidocredprov.dll\", \"filemgmt.dll\", \"filterds.dll\", \"findnetprinters.dll\", \"firewallapi.dll\", \"flightsettings.dll\", \"fltlib.dll\", \"fluencyds.dll\", \"fmapi.dll\", \"fmifs.dll\", \"fms.dll\", \"fntcache.dll\", \"fontext.dll\", \"fontprovider.dll\", \"fontsub.dll\", \"fphc.dll\", \"framedyn.dll\", \"framedynos.dll\", \"frameserver.dll\", \"frprov.dll\", \"fsutilext.dll\", \"fthsvc.dll\", \"fundisc.dll\", \"fveapi.dll\", \"fveapibase.dll\", \"fvecerts.dll\", \"fvecpl.dll\", \"fveskybackup.dll\", \"fveui.dll\", \"fvewiz.dll\", \"fwbase.dll\", \"fwcfg.dll\", \"fwmdmcsp.dll\", \"fwpolicyiomgr.dll\", \"fwpuclnt.dll\", \"fwremotesvr.dll\", \"gameinput.dll\", \"gamemode.dll\", \"gamestreamingext.dll\", \"gameux.dll\", \"gamingtcui.dll\", \"gcdef.dll\", \"gdi32.dll\", \"gdi32full.dll\", \"gdiplus.dll\", \"generaltel.dll\", \"geocommon.dll\", \"geolocation.dll\", \"getuname.dll\", \"glmf32.dll\", \"globinputhost.dll\", \"glu32.dll\", \"gmsaclient.dll\", \"gpapi.dll\", \"gpcsewrappercsp.dll\", \"gpedit.dll\", \"gpprefcl.dll\", \"gpprnext.dll\", \"gpscript.dll\", \"gpsvc.dll\", \"gptext.dll\", \"graphicscapture.dll\", \"graphicsperfsvc.dll\", \"groupinghc.dll\", \"hal.dll\", \"halextpl080.dll\", \"hascsp.dll\", \"hashtagds.dll\", \"hbaapi.dll\", \"hcproviders.dll\", \"hdcphandler.dll\", \"heatcore.dll\", \"helppaneproxy.dll\", \"hgcpl.dll\", \"hhsetup.dll\", \"hid.dll\", \"hidcfu.dll\", \"hidserv.dll\", \"hlink.dll\", \"hmkd.dll\", \"hnetcfg.dll\", \"hnetcfgclient.dll\", \"hnetmon.dll\", \"hologramworld.dll\", \"holoshellruntime.dll\", \"holoshextensions.dll\", \"hotplug.dll\", \"hrtfapo.dll\", \"httpapi.dll\", \"httpprxc.dll\", \"httpprxm.dll\", \"httpprxp.dll\", \"httpsdatasource.dll\", \"htui.dll\", \"hvhostsvc.dll\", \"hvloader.dll\", \"hvsigpext.dll\", \"hvsocket.dll\", \"hydrogen.dll\", \"ia2comproxy.dll\", \"ias.dll\", \"iasacct.dll\", \"iasads.dll\", \"iasdatastore.dll\", \"iashlpr.dll\", \"iasmigplugin.dll\", \"iasnap.dll\", \"iaspolcy.dll\", \"iasrad.dll\", \"iasrecst.dll\", \"iassam.dll\", \"iassdo.dll\", \"iassvcs.dll\", \"icfupgd.dll\", \"icm32.dll\", \"icmp.dll\", \"icmui.dll\", \"iconcodecservice.dll\", \"icsigd.dll\", \"icsvc.dll\", \"icsvcext.dll\", \"icu.dll\", \"icuin.dll\", \"icuuc.dll\", \"idctrls.dll\", \"idlisten.dll\", \"idndl.dll\", \"idstore.dll\", \"ieadvpack.dll\", \"ieapfltr.dll\", \"iedkcs32.dll\", \"ieframe.dll\", \"iemigplugin.dll\", \"iepeers.dll\", \"ieproxy.dll\", \"iernonce.dll\", \"iertutil.dll\", \"iesetup.dll\", \"iesysprep.dll\", \"ieui.dll\", \"ifmon.dll\", \"ifsutil.dll\", \"ifsutilx.dll\", \"igddiag.dll\", \"ihds.dll\", \"ikeext.dll\", \"imagehlp.dll\", \"imageres.dll\", \"imagesp1.dll\", \"imapi.dll\", \"imapi2.dll\", \"imapi2fs.dll\", \"imgutil.dll\", \"imm32.dll\", \"implatsetup.dll\", \"indexeddblegacy.dll\", \"inetcomm.dll\", \"inetmib1.dll\", \"inetpp.dll\", \"inetppui.dll\", \"inetres.dll\", \"inked.dll\", \"inkobjcore.dll\", \"inproclogger.dll\", \"input.dll\", \"inputcloudstore.dll\", \"inputcontroller.dll\", \"inputhost.dll\", \"inputservice.dll\", \"inputswitch.dll\", \"inseng.dll\", \"installservice.dll\", \"internetmail.dll\", \"internetmailcsp.dll\", \"invagent.dll\", \"iologmsg.dll\", \"iphlpapi.dll\", \"iphlpsvc.dll\", \"ipnathlp.dll\", \"ipnathlpclient.dll\", \"ippcommon.dll\", \"ippcommonproxy.dll\", \"iprtprio.dll\", \"iprtrmgr.dll\", \"ipsecsnp.dll\", \"ipsecsvc.dll\", \"ipsmsnap.dll\", \"ipxlatcfg.dll\", \"iri.dll\", \"iscsicpl.dll\", \"iscsidsc.dll\", \"iscsied.dll\", \"iscsiexe.dll\", \"iscsilog.dll\", \"iscsium.dll\", \"iscsiwmi.dll\", \"iscsiwmiv2.dll\", \"ism.dll\", \"itircl.dll\", \"itss.dll\", \"iuilp.dll\", \"iumbase.dll\", \"iumcrypt.dll\", \"iumdll.dll\", \"iumsdk.dll\", \"iyuv_32.dll\", \"joinproviderol.dll\", \"joinutil.dll\", \"jpmapcontrol.dll\", \"jpndecoder.dll\", \"jpninputrouter.dll\", \"jpnranker.dll\", \"jpnserviceds.dll\", \"jscript.dll\", \"jscript9.dll\", \"jscript9diag.dll\", \"jsproxy.dll\", \"kbd101.dll\", \"kbd101a.dll\", \"kbd101b.dll\", \"kbd101c.dll\", \"kbd103.dll\", \"kbd106.dll\", \"kbd106n.dll\", \"kbda1.dll\", \"kbda2.dll\", \"kbda3.dll\", \"kbdadlm.dll\", \"kbdal.dll\", \"kbdarme.dll\", \"kbdarmph.dll\", \"kbdarmty.dll\", \"kbdarmw.dll\", \"kbdax2.dll\", \"kbdaze.dll\", \"kbdazel.dll\", \"kbdazst.dll\", \"kbdbash.dll\", \"kbdbe.dll\", \"kbdbene.dll\", \"kbdbgph.dll\", \"kbdbgph1.dll\", \"kbdbhc.dll\", \"kbdblr.dll\", \"kbdbr.dll\", \"kbdbu.dll\", \"kbdbug.dll\", \"kbdbulg.dll\", \"kbdca.dll\", \"kbdcan.dll\", \"kbdcher.dll\", \"kbdcherp.dll\", \"kbdcr.dll\", \"kbdcz.dll\", \"kbdcz1.dll\", \"kbdcz2.dll\", \"kbdda.dll\", \"kbddiv1.dll\", \"kbddiv2.dll\", \"kbddv.dll\", \"kbddzo.dll\", \"kbdes.dll\", \"kbdest.dll\", \"kbdfa.dll\", \"kbdfar.dll\", \"kbdfc.dll\", \"kbdfi.dll\", \"kbdfi1.dll\", \"kbdfo.dll\", \"kbdfr.dll\", \"kbdfthrk.dll\", \"kbdgae.dll\", \"kbdgeo.dll\", \"kbdgeoer.dll\", \"kbdgeome.dll\", \"kbdgeooa.dll\", \"kbdgeoqw.dll\", \"kbdgkl.dll\", \"kbdgn.dll\", \"kbdgr.dll\", \"kbdgr1.dll\", \"kbdgrlnd.dll\", \"kbdgthc.dll\", \"kbdhau.dll\", \"kbdhaw.dll\", \"kbdhe.dll\", \"kbdhe220.dll\", \"kbdhe319.dll\", \"kbdheb.dll\", \"kbdhebl3.dll\", \"kbdhela2.dll\", \"kbdhela3.dll\", \"kbdhept.dll\", \"kbdhu.dll\", \"kbdhu1.dll\", \"kbdibm02.dll\", \"kbdibo.dll\", \"kbdic.dll\", \"kbdinasa.dll\", \"kbdinbe1.dll\", \"kbdinbe2.dll\", \"kbdinben.dll\", \"kbdindev.dll\", \"kbdinen.dll\", \"kbdinguj.dll\", \"kbdinhin.dll\", \"kbdinkan.dll\", \"kbdinmal.dll\", \"kbdinmar.dll\", \"kbdinori.dll\", \"kbdinpun.dll\", \"kbdintam.dll\", \"kbdintel.dll\", \"kbdinuk2.dll\", \"kbdir.dll\", \"kbdit.dll\", \"kbdit142.dll\", \"kbdiulat.dll\", \"kbdjav.dll\", \"kbdjpn.dll\", \"kbdkaz.dll\", \"kbdkhmr.dll\", \"kbdkni.dll\", \"kbdkor.dll\", \"kbdkurd.dll\", \"kbdkyr.dll\", \"kbdla.dll\", \"kbdlao.dll\", \"kbdlisub.dll\", \"kbdlisus.dll\", \"kbdlk41a.dll\", \"kbdlt.dll\", \"kbdlt1.dll\", \"kbdlt2.dll\", \"kbdlv.dll\", \"kbdlv1.dll\", \"kbdlvst.dll\", \"kbdmac.dll\", \"kbdmacst.dll\", \"kbdmaori.dll\", \"kbdmlt47.dll\", \"kbdmlt48.dll\", \"kbdmon.dll\", \"kbdmonmo.dll\", \"kbdmonst.dll\", \"kbdmyan.dll\", \"kbdne.dll\", \"kbdnec.dll\", \"kbdnec95.dll\", \"kbdnecat.dll\", \"kbdnecnt.dll\", \"kbdnepr.dll\", \"kbdnko.dll\", \"kbdno.dll\", \"kbdno1.dll\", \"kbdnso.dll\", \"kbdntl.dll\", \"kbdogham.dll\", \"kbdolch.dll\", \"kbdoldit.dll\", \"kbdosa.dll\", \"kbdosm.dll\", \"kbdpash.dll\", \"kbdphags.dll\", \"kbdpl.dll\", \"kbdpl1.dll\", \"kbdpo.dll\", \"kbdro.dll\", \"kbdropr.dll\", \"kbdrost.dll\", \"kbdru.dll\", \"kbdru1.dll\", \"kbdrum.dll\", \"kbdsf.dll\", \"kbdsg.dll\", \"kbdsl.dll\", \"kbdsl1.dll\", \"kbdsmsfi.dll\", \"kbdsmsno.dll\", \"kbdsn1.dll\", \"kbdsora.dll\", \"kbdsorex.dll\", \"kbdsors1.dll\", \"kbdsorst.dll\", \"kbdsp.dll\", \"kbdsw.dll\", \"kbdsw09.dll\", \"kbdsyr1.dll\", \"kbdsyr2.dll\", \"kbdtaile.dll\", \"kbdtajik.dll\", \"kbdtam99.dll\", \"kbdtat.dll\", \"kbdth0.dll\", \"kbdth1.dll\", \"kbdth2.dll\", \"kbdth3.dll\", \"kbdtifi.dll\", \"kbdtifi2.dll\", \"kbdtiprc.dll\", \"kbdtiprd.dll\", \"kbdtt102.dll\", \"kbdtuf.dll\", \"kbdtuq.dll\", \"kbdturme.dll\", \"kbdtzm.dll\", \"kbdughr.dll\", \"kbdughr1.dll\", \"kbduk.dll\", \"kbdukx.dll\", \"kbdur.dll\", \"kbdur1.dll\", \"kbdurdu.dll\", \"kbdus.dll\", \"kbdusa.dll\", \"kbdusl.dll\", \"kbdusr.dll\", \"kbdusx.dll\", \"kbduzb.dll\", \"kbdvntc.dll\", \"kbdwol.dll\", \"kbdyak.dll\", \"kbdyba.dll\", \"kbdycc.dll\", \"kbdycl.dll\", \"kd.dll\", \"kdcom.dll\", \"kdcpw.dll\", \"kdhvcom.dll\", \"kdnet.dll\", \"kdnet_uart16550.dll\", \"kdscli.dll\", \"kdstub.dll\", \"kdusb.dll\", \"kd_02_10df.dll\", \"kd_02_10ec.dll\", \"kd_02_1137.dll\", \"kd_02_14e4.dll\", \"kd_02_15b3.dll\", \"kd_02_1969.dll\", \"kd_02_19a2.dll\", \"kd_02_1af4.dll\", \"kd_02_8086.dll\", \"kd_07_1415.dll\", \"kd_0c_8086.dll\", \"kerbclientshared.dll\", \"kerberos.dll\", \"kernel32.dll\", \"kernelbase.dll\", \"keycredmgr.dll\", \"keyiso.dll\", \"keymgr.dll\", \"knobscore.dll\", \"knobscsp.dll\", \"ksuser.dll\", \"ktmw32.dll\", \"l2gpstore.dll\", \"l2nacp.dll\", \"l2sechc.dll\", \"laprxy.dll\", \"legacynetux.dll\", \"lfsvc.dll\", \"libcrypto.dll\", \"licensemanager.dll\", \"licensingcsp.dll\", \"licensingdiagspp.dll\", \"licensingwinrt.dll\", \"licmgr10.dll\", \"linkinfo.dll\", \"lltdapi.dll\", \"lltdres.dll\", \"lltdsvc.dll\", \"lmhsvc.dll\", \"loadperf.dll\", \"localsec.dll\", \"localspl.dll\", \"localui.dll\", \"locationapi.dll\", \"lockappbroker.dll\", \"lockcontroller.dll\", \"lockscreendata.dll\", \"loghours.dll\", \"logoncli.dll\", \"logoncontroller.dll\", \"lpasvc.dll\", \"lpk.dll\", \"lsasrv.dll\", \"lscshostpolicy.dll\", \"lsm.dll\", \"lsmproxy.dll\", \"lstelemetry.dll\", \"luainstall.dll\", \"luiapi.dll\", \"lz32.dll\", \"magnification.dll\", \"maintenanceui.dll\", \"manageci.dll\", \"mapconfiguration.dll\", \"mapcontrolcore.dll\", \"mapgeocoder.dll\", \"mapi32.dll\", \"mapistub.dll\", \"maprouter.dll\", \"mapsbtsvc.dll\", \"mapsbtsvcproxy.dll\", \"mapscsp.dll\", \"mapsstore.dll\", \"mapstoasttask.dll\", \"mapsupdatetask.dll\", \"mbaeapi.dll\", \"mbaeapipublic.dll\", \"mbaexmlparser.dll\", \"mbmediamanager.dll\", \"mbsmsapi.dll\", \"mbussdapi.dll\", \"mccsengineshared.dll\", \"mccspal.dll\", \"mciavi32.dll\", \"mcicda.dll\", \"mciqtz32.dll\", \"mciseq.dll\", \"mciwave.dll\", \"mcrecvsrc.dll\", \"mdmcommon.dll\", \"mdmdiagnostics.dll\", \"mdminst.dll\", \"mdmmigrator.dll\", \"mdmregistration.dll\", \"memorydiagnostic.dll\", \"messagingservice.dll\", \"mf.dll\", \"mf3216.dll\", \"mfaacenc.dll\", \"mfasfsrcsnk.dll\", \"mfaudiocnv.dll\", \"mfc42.dll\", \"mfc42u.dll\", \"mfcaptureengine.dll\", \"mfcore.dll\", \"mfcsubs.dll\", \"mfds.dll\", \"mfdvdec.dll\", \"mferror.dll\", \"mfh263enc.dll\", \"mfh264enc.dll\", \"mfksproxy.dll\", \"mfmediaengine.dll\", \"mfmjpegdec.dll\", \"mfmkvsrcsnk.dll\", \"mfmp4srcsnk.dll\", \"mfmpeg2srcsnk.dll\", \"mfnetcore.dll\", \"mfnetsrc.dll\", \"mfperfhelper.dll\", \"mfplat.dll\", \"mfplay.dll\", \"mfps.dll\", \"mfreadwrite.dll\", \"mfsensorgroup.dll\", \"mfsrcsnk.dll\", \"mfsvr.dll\", \"mftranscode.dll\", \"mfvdsp.dll\", \"mfvfw.dll\", \"mfwmaaec.dll\", \"mgmtapi.dll\", \"mi.dll\", \"mibincodec.dll\", \"midimap.dll\", \"migisol.dll\", \"miguiresource.dll\", \"mimefilt.dll\", \"mimofcodec.dll\", \"minstoreevents.dll\", \"miracastinputmgr.dll\", \"miracastreceiver.dll\", \"mirrordrvcompat.dll\", \"mispace.dll\", \"mitigationclient.dll\", \"miutils.dll\", \"mlang.dll\", \"mmcbase.dll\", \"mmcndmgr.dll\", \"mmcshext.dll\", \"mmdevapi.dll\", \"mmgaclient.dll\", \"mmgaproxystub.dll\", \"mmres.dll\", \"mobilenetworking.dll\", \"modemui.dll\", \"modernexecserver.dll\", \"moricons.dll\", \"moshost.dll\", \"moshostclient.dll\", \"moshostcore.dll\", \"mosstorage.dll\", \"mp3dmod.dll\", \"mp43decd.dll\", \"mp4sdecd.dll\", \"mpeval.dll\", \"mpg4decd.dll\", \"mpr.dll\", \"mprapi.dll\", \"mprddm.dll\", \"mprdim.dll\", \"mprext.dll\", \"mprmsg.dll\", \"mpssvc.dll\", \"mpunits.dll\", \"mrmcorer.dll\", \"mrmdeploy.dll\", \"mrmindexer.dll\", \"mrt100.dll\", \"mrt_map.dll\", \"msaatext.dll\", \"msac3enc.dll\", \"msacm32.dll\", \"msafd.dll\", \"msajapi.dll\", \"msalacdecoder.dll\", \"msalacencoder.dll\", \"msamrnbdecoder.dll\", \"msamrnbencoder.dll\", \"msamrnbsink.dll\", \"msamrnbsource.dll\", \"msasn1.dll\", \"msauddecmft.dll\", \"msaudite.dll\", \"msauserext.dll\", \"mscandui.dll\", \"mscat32.dll\", \"msclmd.dll\", \"mscms.dll\", \"mscoree.dll\", \"mscorier.dll\", \"mscories.dll\", \"msctf.dll\", \"msctfmonitor.dll\", \"msctfp.dll\", \"msctfui.dll\", \"msctfuimanager.dll\", \"msdadiag.dll\", \"msdart.dll\", \"msdelta.dll\", \"msdmo.dll\", \"msdrm.dll\", \"msdtckrm.dll\", \"msdtclog.dll\", \"msdtcprx.dll\", \"msdtcspoffln.dll\", \"msdtctm.dll\", \"msdtcuiu.dll\", \"msdtcvsp1res.dll\", \"msfeeds.dll\", \"msfeedsbs.dll\", \"msflacdecoder.dll\", \"msflacencoder.dll\", \"msftedit.dll\", \"msheif.dll\", \"mshtml.dll\", \"mshtmldac.dll\", \"mshtmled.dll\", \"mshtmler.dll\", \"msi.dll\", \"msicofire.dll\", \"msidcrl40.dll\", \"msident.dll\", \"msidle.dll\", \"msidntld.dll\", \"msieftp.dll\", \"msihnd.dll\", \"msiltcfg.dll\", \"msimg32.dll\", \"msimsg.dll\", \"msimtf.dll\", \"msisip.dll\", \"msiso.dll\", \"msiwer.dll\", \"mskeyprotcli.dll\", \"mskeyprotect.dll\", \"msls31.dll\", \"msmpeg2adec.dll\", \"msmpeg2enc.dll\", \"msmpeg2vdec.dll\", \"msobjs.dll\", \"msoert2.dll\", \"msopusdecoder.dll\", \"mspatcha.dll\", \"mspatchc.dll\", \"msphotography.dll\", \"msports.dll\", \"msprivs.dll\", \"msrahc.dll\", \"msrating.dll\", \"msrawimage.dll\", \"msrdc.dll\", \"msrdpwebaccess.dll\", \"msrle32.dll\", \"msscntrs.dll\", \"mssecuser.dll\", \"mssign32.dll\", \"mssip32.dll\", \"mssitlb.dll\", \"mssph.dll\", \"mssprxy.dll\", \"mssrch.dll\", \"mssvp.dll\", \"mstask.dll\", \"mstextprediction.dll\", \"mstscax.dll\", \"msutb.dll\", \"msv1_0.dll\", \"msvcirt.dll\", \"msvcp110_win.dll\", \"msvcp120_clr0400.dll\", \"msvcp140_clr0400.dll\", \"msvcp60.dll\", \"msvcp_win.dll\", \"msvcr100_clr0400.dll\", \"msvcr120_clr0400.dll\", \"msvcrt.dll\", \"msvfw32.dll\", \"msvidc32.dll\", \"msvidctl.dll\", \"msvideodsp.dll\", \"msvp9dec.dll\", \"msvproc.dll\", \"msvpxenc.dll\", \"mswb7.dll\", \"mswebp.dll\", \"mswmdm.dll\", \"mswsock.dll\", \"msxml3.dll\", \"msxml3r.dll\", \"msxml6.dll\", \"msxml6r.dll\", \"msyuv.dll\", \"mtcmodel.dll\", \"mtf.dll\", \"mtfappserviceds.dll\", \"mtfdecoder.dll\", \"mtffuzzyds.dll\", \"mtfserver.dll\", \"mtfspellcheckds.dll\", \"mtxclu.dll\", \"mtxdm.dll\", \"mtxex.dll\", \"mtxoci.dll\", \"muifontsetup.dll\", \"mycomput.dll\", \"mydocs.dll\", \"napcrypt.dll\", \"napinsp.dll\", \"naturalauth.dll\", \"naturallanguage6.dll\", \"navshutdown.dll\", \"ncaapi.dll\", \"ncasvc.dll\", \"ncbservice.dll\", \"ncdautosetup.dll\", \"ncdprop.dll\", \"nci.dll\", \"ncobjapi.dll\", \"ncrypt.dll\", \"ncryptprov.dll\", \"ncryptsslp.dll\", \"ncsi.dll\", \"ncuprov.dll\", \"nddeapi.dll\", \"ndfapi.dll\", \"ndfetw.dll\", \"ndfhcdiscovery.dll\", \"ndishc.dll\", \"ndproxystub.dll\", \"nduprov.dll\", \"negoexts.dll\", \"netapi32.dll\", \"netbios.dll\", \"netcenter.dll\", \"netcfgx.dll\", \"netcorehc.dll\", \"netdiagfx.dll\", \"netdriverinstall.dll\", \"netevent.dll\", \"netfxperf.dll\", \"neth.dll\", \"netid.dll\", \"netiohlp.dll\", \"netjoin.dll\", \"netlogon.dll\", \"netman.dll\", \"netmsg.dll\", \"netplwiz.dll\", \"netprofm.dll\", \"netprofmsvc.dll\", \"netprovfw.dll\", \"netprovisionsp.dll\", \"netsetupapi.dll\", \"netsetupengine.dll\", \"netsetupshim.dll\", \"netsetupsvc.dll\", \"netshell.dll\", \"nettrace.dll\", \"netutils.dll\", \"networkexplorer.dll\", \"networkhelper.dll\", \"networkicon.dll\", \"networkproxycsp.dll\", \"networkstatus.dll\", \"networkuxbroker.dll\", \"newdev.dll\", \"nfcradiomedia.dll\", \"ngccredprov.dll\", \"ngcctnr.dll\", \"ngcctnrsvc.dll\", \"ngcisoctnr.dll\", \"ngckeyenum.dll\", \"ngcksp.dll\", \"ngclocal.dll\", \"ngcpopkeysrv.dll\", \"ngcprocsp.dll\", \"ngcrecovery.dll\", \"ngcsvc.dll\", \"ngctasks.dll\", \"ninput.dll\", \"nlaapi.dll\", \"nlahc.dll\", \"nlasvc.dll\", \"nlhtml.dll\", \"nlmgp.dll\", \"nlmproxy.dll\", \"nlmsprep.dll\", \"nlsbres.dll\", \"nlsdata0000.dll\", \"nlsdata0009.dll\", \"nlsdl.dll\", \"nlslexicons0009.dll\", \"nmadirect.dll\", \"normaliz.dll\", \"npmproxy.dll\", \"npsm.dll\", \"nrpsrv.dll\", \"nshhttp.dll\", \"nshipsec.dll\", \"nshwfp.dll\", \"nsi.dll\", \"nsisvc.dll\", \"ntasn1.dll\", \"ntdll.dll\", \"ntdsapi.dll\", \"ntlanman.dll\", \"ntlanui2.dll\", \"ntlmshared.dll\", \"ntmarta.dll\", \"ntprint.dll\", \"ntshrui.dll\", \"ntvdm64.dll\", \"objsel.dll\", \"occache.dll\", \"ocsetapi.dll\", \"odbc32.dll\", \"odbcbcp.dll\", \"odbcconf.dll\", \"odbccp32.dll\", \"odbccr32.dll\", \"odbccu32.dll\", \"odbcint.dll\", \"odbctrac.dll\", \"oemlicense.dll\", \"offfilt.dll\", \"officecsp.dll\", \"offlinelsa.dll\", \"offlinesam.dll\", \"offreg.dll\", \"ole32.dll\", \"oleacc.dll\", \"oleacchooks.dll\", \"oleaccrc.dll\", \"oleaut32.dll\", \"oledlg.dll\", \"oleprn.dll\", \"omadmagent.dll\", \"omadmapi.dll\", \"onebackuphandler.dll\", \"onex.dll\", \"onexui.dll\", \"opcservices.dll\", \"opengl32.dll\", \"ortcengine.dll\", \"osbaseln.dll\", \"osksupport.dll\", \"osuninst.dll\", \"p2p.dll\", \"p2pgraph.dll\", \"p2pnetsh.dll\", \"p2psvc.dll\", \"packager.dll\", \"panmap.dll\", \"pautoenr.dll\", \"pcacli.dll\", \"pcadm.dll\", \"pcaevts.dll\", \"pcasvc.dll\", \"pcaui.dll\", \"pcpksp.dll\", \"pcsvdevice.dll\", \"pcwum.dll\", \"pcwutl.dll\", \"pdh.dll\", \"pdhui.dll\", \"peerdist.dll\", \"peerdistad.dll\", \"peerdistcleaner.dll\", \"peerdistsh.dll\", \"peerdistsvc.dll\", \"peopleapis.dll\", \"peopleband.dll\", \"perceptiondevice.dll\", \"perfctrs.dll\", \"perfdisk.dll\", \"perfnet.dll\", \"perfos.dll\", \"perfproc.dll\", \"perfts.dll\", \"phoneom.dll\", \"phoneproviders.dll\", \"phoneservice.dll\", \"phoneserviceres.dll\", \"phoneutil.dll\", \"phoneutilres.dll\", \"photowiz.dll\", \"pickerplatform.dll\", \"pid.dll\", \"pidgenx.dll\", \"pifmgr.dll\", \"pimstore.dll\", \"pkeyhelper.dll\", \"pktmonapi.dll\", \"pku2u.dll\", \"pla.dll\", \"playlistfolder.dll\", \"playsndsrv.dll\", \"playtodevice.dll\", \"playtomanager.dll\", \"playtomenu.dll\", \"playtoreceiver.dll\", \"ploptin.dll\", \"pmcsnap.dll\", \"pngfilt.dll\", \"pnidui.dll\", \"pnpclean.dll\", \"pnppolicy.dll\", \"pnpts.dll\", \"pnpui.dll\", \"pnpxassoc.dll\", \"pnpxassocprx.dll\", \"pnrpauto.dll\", \"pnrphc.dll\", \"pnrpnsp.dll\", \"pnrpsvc.dll\", \"policymanager.dll\", \"polstore.dll\", \"posetup.dll\", \"posyncservices.dll\", \"pots.dll\", \"powercpl.dll\", \"powrprof.dll\", \"ppcsnap.dll\", \"prauthproviders.dll\", \"prflbmsg.dll\", \"printui.dll\", \"printwsdahost.dll\", \"prm0009.dll\", \"prncache.dll\", \"prnfldr.dll\", \"prnntfy.dll\", \"prntvpt.dll\", \"profapi.dll\", \"profext.dll\", \"profprov.dll\", \"profsvc.dll\", \"profsvcext.dll\", \"propsys.dll\", \"provcore.dll\", \"provdatastore.dll\", \"provdiagnostics.dll\", \"provengine.dll\", \"provhandlers.dll\", \"provisioningcsp.dll\", \"provmigrate.dll\", \"provops.dll\", \"provplugineng.dll\", \"provsysprep.dll\", \"provthrd.dll\", \"proximitycommon.dll\", \"proximityservice.dll\", \"prvdmofcomp.dll\", \"psapi.dll\", \"pshed.dll\", \"psisdecd.dll\", \"psmsrv.dll\", \"pstask.dll\", \"pstorec.dll\", \"ptpprov.dll\", \"puiapi.dll\", \"puiobj.dll\", \"pushtoinstall.dll\", \"pwlauncher.dll\", \"pwrshplugin.dll\", \"pwsso.dll\", \"qasf.dll\", \"qcap.dll\", \"qdv.dll\", \"qdvd.dll\", \"qedit.dll\", \"qedwipes.dll\", \"qmgr.dll\", \"query.dll\", \"quiethours.dll\", \"qwave.dll\", \"racengn.dll\", \"racpldlg.dll\", \"radardt.dll\", \"radarrs.dll\", \"radcui.dll\", \"rasadhlp.dll\", \"rasapi32.dll\", \"rasauto.dll\", \"raschap.dll\", \"raschapext.dll\", \"rasctrs.dll\", \"rascustom.dll\", \"rasdiag.dll\", \"rasdlg.dll\", \"rasgcw.dll\", \"rasman.dll\", \"rasmans.dll\", \"rasmbmgr.dll\", \"rasmediamanager.dll\", \"rasmm.dll\", \"rasmontr.dll\", \"rasplap.dll\", \"rasppp.dll\", \"rastapi.dll\", \"rastls.dll\", \"rastlsext.dll\", \"rdbui.dll\", \"rdpbase.dll\", \"rdpcfgex.dll\", \"rdpcore.dll\", \"rdpcorets.dll\", \"rdpencom.dll\", \"rdpendp.dll\", \"rdpnano.dll\", \"rdpsaps.dll\", \"rdpserverbase.dll\", \"rdpsharercom.dll\", \"rdpudd.dll\", \"rdpviewerax.dll\", \"rdsappxhelper.dll\", \"rdsdwmdr.dll\", \"rdvvmtransport.dll\", \"rdxservice.dll\", \"rdxtaskfactory.dll\", \"reagent.dll\", \"reagenttask.dll\", \"recovery.dll\", \"regapi.dll\", \"regctrl.dll\", \"regidle.dll\", \"regsvc.dll\", \"reguwpapi.dll\", \"reinfo.dll\", \"remotepg.dll\", \"remotewipecsp.dll\", \"reportingcsp.dll\", \"resampledmo.dll\", \"resbparser.dll\", \"reseteng.dll\", \"resetengine.dll\", \"resetengonline.dll\", \"resourcemapper.dll\", \"resutils.dll\", \"rgb9rast.dll\", \"riched20.dll\", \"riched32.dll\", \"rjvmdmconfig.dll\", \"rmapi.dll\", \"rmclient.dll\", \"rnr20.dll\", \"roamingsecurity.dll\", \"rometadata.dll\", \"rotmgr.dll\", \"rpcepmap.dll\", \"rpchttp.dll\", \"rpcns4.dll\", \"rpcnsh.dll\", \"rpcrt4.dll\", \"rpcrtremote.dll\", \"rpcss.dll\", \"rsaenh.dll\", \"rshx32.dll\", \"rstrtmgr.dll\", \"rtffilt.dll\", \"rtm.dll\", \"rtmediaframe.dll\", \"rtmmvrortc.dll\", \"rtutils.dll\", \"rtworkq.dll\", \"rulebasedds.dll\", \"samcli.dll\", \"samlib.dll\", \"samsrv.dll\", \"sas.dll\", \"sbe.dll\", \"sbeio.dll\", \"sberes.dll\", \"sbservicetrigger.dll\", \"scansetting.dll\", \"scardbi.dll\", \"scarddlg.dll\", \"scardsvr.dll\", \"scavengeui.dll\", \"scdeviceenum.dll\", \"scecli.dll\", \"scesrv.dll\", \"schannel.dll\", \"schedcli.dll\", \"schedsvc.dll\", \"scksp.dll\", \"scripto.dll\", \"scrobj.dll\", \"scrptadm.dll\", \"scrrun.dll\", \"sdcpl.dll\", \"sdds.dll\", \"sdengin2.dll\", \"sdfhost.dll\", \"sdhcinst.dll\", \"sdiageng.dll\", \"sdiagprv.dll\", \"sdiagschd.dll\", \"sdohlp.dll\", \"sdrsvc.dll\", \"sdshext.dll\", \"searchfolder.dll\", \"sechost.dll\", \"seclogon.dll\", \"secproc.dll\", \"secproc_isv.dll\", \"secproc_ssp.dll\", \"secproc_ssp_isv.dll\", \"secur32.dll\", \"security.dll\", \"semgrps.dll\", \"semgrsvc.dll\", \"sendmail.dll\", \"sens.dll\", \"sensapi.dll\", \"sensorsapi.dll\", \"sensorscpl.dll\", \"sensorservice.dll\", \"sensorsnativeapi.dll\", \"sensorsutilsv2.dll\", \"sensrsvc.dll\", \"serialui.dll\", \"servicinguapi.dll\", \"serwvdrv.dll\", \"sessenv.dll\", \"setbcdlocale.dll\", \"settingmonitor.dll\", \"settingsync.dll\", \"settingsynccore.dll\", \"setupapi.dll\", \"setupcl.dll\", \"setupcln.dll\", \"setupetw.dll\", \"sfc.dll\", \"sfc_os.dll\", \"sgrmenclave.dll\", \"shacct.dll\", \"shacctprofile.dll\", \"sharedpccsp.dll\", \"sharedrealitysvc.dll\", \"sharehost.dll\", \"sharemediacpl.dll\", \"shcore.dll\", \"shdocvw.dll\", \"shell32.dll\", \"shellstyle.dll\", \"shfolder.dll\", \"shgina.dll\", \"shimeng.dll\", \"shimgvw.dll\", \"shlwapi.dll\", \"shpafact.dll\", \"shsetup.dll\", \"shsvcs.dll\", \"shunimpl.dll\", \"shutdownext.dll\", \"shutdownux.dll\", \"shwebsvc.dll\", \"signdrv.dll\", \"simauth.dll\", \"simcfg.dll\", \"skci.dll\", \"slc.dll\", \"slcext.dll\", \"slwga.dll\", \"smartscreenps.dll\", \"smbhelperclass.dll\", \"smbwmiv2.dll\", \"smiengine.dll\", \"smphost.dll\", \"smsroutersvc.dll\", \"sndvolsso.dll\", \"snmpapi.dll\", \"socialapis.dll\", \"softkbd.dll\", \"softpub.dll\", \"sortwindows61.dll\", \"sortwindows62.dll\", \"spacebridge.dll\", \"spacecontrol.dll\", \"spatializerapo.dll\", \"spatialstore.dll\", \"spbcd.dll\", \"speechpal.dll\", \"spfileq.dll\", \"spinf.dll\", \"spmpm.dll\", \"spnet.dll\", \"spoolss.dll\", \"spopk.dll\", \"spp.dll\", \"sppc.dll\", \"sppcext.dll\", \"sppcomapi.dll\", \"sppcommdlg.dll\", \"sppinst.dll\", \"sppnp.dll\", \"sppobjs.dll\", \"sppwinob.dll\", \"sppwmi.dll\", \"spwinsat.dll\", \"spwizeng.dll\", \"spwizimg.dll\", \"spwizres.dll\", \"spwmp.dll\", \"sqlsrv32.dll\", \"sqmapi.dll\", \"srchadmin.dll\", \"srclient.dll\", \"srcore.dll\", \"srevents.dll\", \"srh.dll\", \"srhelper.dll\", \"srm.dll\", \"srmclient.dll\", \"srmlib.dll\", \"srmscan.dll\", \"srmshell.dll\", \"srmstormod.dll\", \"srmtrace.dll\", \"srm_ps.dll\", \"srpapi.dll\", \"srrstr.dll\", \"srumapi.dll\", \"srumsvc.dll\", \"srvcli.dll\", \"srvsvc.dll\", \"srwmi.dll\", \"sscore.dll\", \"sscoreext.dll\", \"ssdm.dll\", \"ssdpapi.dll\", \"ssdpsrv.dll\", \"sspicli.dll\", \"sspisrv.dll\", \"ssshim.dll\", \"sstpsvc.dll\", \"starttiledata.dll\", \"startupscan.dll\", \"stclient.dll\", \"sti.dll\", \"sti_ci.dll\", \"stobject.dll\", \"storageusage.dll\", \"storagewmi.dll\", \"storewuauth.dll\", \"storprop.dll\", \"storsvc.dll\", \"streamci.dll\", \"structuredquery.dll\", \"sud.dll\", \"svf.dll\", \"svsvc.dll\", \"swprv.dll\", \"sxproxy.dll\", \"sxs.dll\", \"sxshared.dll\", \"sxssrv.dll\", \"sxsstore.dll\", \"synccenter.dll\", \"synccontroller.dll\", \"synchostps.dll\", \"syncproxy.dll\", \"syncreg.dll\", \"syncres.dll\", \"syncsettings.dll\", \"syncutil.dll\", \"sysclass.dll\", \"sysfxui.dll\", \"sysmain.dll\", \"sysntfy.dll\", \"syssetup.dll\", \"systemcpl.dll\", \"t2embed.dll\", \"tabbtn.dll\", \"tabbtnex.dll\", \"tabsvc.dll\", \"tapi3.dll\", \"tapi32.dll\", \"tapilua.dll\", \"tapimigplugin.dll\", \"tapiperf.dll\", \"tapisrv.dll\", \"tapisysprep.dll\", \"tapiui.dll\", \"taskapis.dll\", \"taskbarcpl.dll\", \"taskcomp.dll\", \"taskschd.dll\", \"taskschdps.dll\", \"tbauth.dll\", \"tbs.dll\", \"tcbloader.dll\", \"tcpipcfg.dll\", \"tcpmib.dll\", \"tcpmon.dll\", \"tcpmonui.dll\", \"tdh.dll\", \"tdlmigration.dll\", \"tellib.dll\", \"termmgr.dll\", \"termsrv.dll\", \"tetheringclient.dll\", \"tetheringmgr.dll\", \"tetheringservice.dll\", \"tetheringstation.dll\", \"textshaping.dll\", \"themecpl.dll\", \"themeservice.dll\", \"themeui.dll\", \"threadpoolwinrt.dll\", \"thumbcache.dll\", \"timebrokerclient.dll\", \"timebrokerserver.dll\", \"timesync.dll\", \"timesynctask.dll\", \"tlscsp.dll\", \"tokenbinding.dll\", \"tokenbroker.dll\", \"tokenbrokerui.dll\", \"tpmcertresources.dll\", \"tpmcompc.dll\", \"tpmtasks.dll\", \"tpmvsc.dll\", \"tquery.dll\", \"traffic.dll\", \"transportdsa.dll\", \"trie.dll\", \"trkwks.dll\", \"tsbyuv.dll\", \"tscfgwmi.dll\", \"tserrredir.dll\", \"tsf3gip.dll\", \"tsgqec.dll\", \"tsmf.dll\", \"tspkg.dll\", \"tspubwmi.dll\", \"tssessionux.dll\", \"tssrvlic.dll\", \"tsworkspace.dll\", \"ttdloader.dll\", \"ttdplm.dll\", \"ttdrecord.dll\", \"ttdrecordcpu.dll\", \"ttlsauth.dll\", \"ttlscfg.dll\", \"ttlsext.dll\", \"tvratings.dll\", \"twext.dll\", \"twinapi.dll\", \"twinui.dll\", \"txflog.dll\", \"txfw32.dll\", \"tzautoupdate.dll\", \"tzres.dll\", \"tzsyncres.dll\", \"ubpm.dll\", \"ucmhc.dll\", \"ucrtbase.dll\", \"ucrtbase_clr0400.dll\", \"ucrtbase_enclave.dll\", \"udhisapi.dll\", \"udwm.dll\", \"ueficsp.dll\", \"uexfat.dll\", \"ufat.dll\", \"uiamanager.dll\", \"uianimation.dll\", \"uiautomationcore.dll\", \"uicom.dll\", \"uireng.dll\", \"uiribbon.dll\", \"uiribbonres.dll\", \"ulib.dll\", \"umb.dll\", \"umdmxfrm.dll\", \"umpdc.dll\", \"umpnpmgr.dll\", \"umpo-overrides.dll\", \"umpo.dll\", \"umpoext.dll\", \"umpowmi.dll\", \"umrdp.dll\", \"unattend.dll\", \"unenrollhook.dll\", \"unimdmat.dll\", \"uniplat.dll\", \"unistore.dll\", \"untfs.dll\", \"updateagent.dll\", \"updatecsp.dll\", \"updatepolicy.dll\", \"upnp.dll\", \"upnphost.dll\", \"upshared.dll\", \"urefs.dll\", \"urefsv1.dll\", \"ureg.dll\", \"url.dll\", \"urlmon.dll\", \"usbcapi.dll\", \"usbceip.dll\", \"usbmon.dll\", \"usbperf.dll\", \"usbpmapi.dll\", \"usbtask.dll\", \"usbui.dll\", \"user32.dll\", \"usercpl.dll\", \"userdataservice.dll\", \"userdatatimeutil.dll\", \"userenv.dll\", \"userinitext.dll\", \"usermgr.dll\", \"usermgrcli.dll\", \"usermgrproxy.dll\", \"usoapi.dll\", \"usocoreps.dll\", \"usosvc.dll\", \"usp10.dll\", \"ustprov.dll\", \"utcutil.dll\", \"utildll.dll\", \"uudf.dll\", \"uvcmodel.dll\", \"uwfcfgmgmt.dll\", \"uwfcsp.dll\", \"uwfservicingapi.dll\", \"uxinit.dll\", \"uxlib.dll\", \"uxlibres.dll\", \"uxtheme.dll\", \"vac.dll\", \"van.dll\", \"vault.dll\", \"vaultcds.dll\", \"vaultcli.dll\", \"vaultroaming.dll\", \"vaultsvc.dll\", \"vbsapi.dll\", \"vbscript.dll\", \"vbssysprep.dll\", \"vcardparser.dll\", \"vdsbas.dll\", \"vdsdyn.dll\", \"vdsutil.dll\", \"vdsvd.dll\", \"vds_ps.dll\", \"verifier.dll\", \"version.dll\", \"vertdll.dll\", \"vfuprov.dll\", \"vfwwdm32.dll\", \"vhfum.dll\", \"vid.dll\", \"videohandlers.dll\", \"vidreszr.dll\", \"virtdisk.dll\", \"vmbuspipe.dll\", \"vmdevicehost.dll\", \"vmictimeprovider.dll\", \"vmrdvcore.dll\", \"voiprt.dll\", \"vpnike.dll\", \"vpnikeapi.dll\", \"vpnsohdesktop.dll\", \"vpnv2csp.dll\", \"vscmgrps.dll\", \"vssapi.dll\", \"vsstrace.dll\", \"vss_ps.dll\", \"w32time.dll\", \"w32topl.dll\", \"waasassessment.dll\", \"waasmediccapsule.dll\", \"waasmedicps.dll\", \"waasmedicsvc.dll\", \"wabsyncprovider.dll\", \"walletproxy.dll\", \"walletservice.dll\", \"wavemsp.dll\", \"wbemcomn.dll\", \"wbiosrvc.dll\", \"wci.dll\", \"wcimage.dll\", \"wcmapi.dll\", \"wcmcsp.dll\", \"wcmsvc.dll\", \"wcnapi.dll\", \"wcncsvc.dll\", \"wcneapauthproxy.dll\", \"wcneappeerproxy.dll\", \"wcnnetsh.dll\", \"wcnwiz.dll\", \"wc_storage.dll\", \"wdc.dll\", \"wdi.dll\", \"wdigest.dll\", \"wdscore.dll\", \"webauthn.dll\", \"webcamui.dll\", \"webcheck.dll\", \"webclnt.dll\", \"webio.dll\", \"webservices.dll\", \"websocket.dll\", \"wecapi.dll\", \"wecsvc.dll\", \"wephostsvc.dll\", \"wer.dll\", \"werconcpl.dll\", \"wercplsupport.dll\", \"werenc.dll\", \"weretw.dll\", \"wersvc.dll\", \"werui.dll\", \"wevtapi.dll\", \"wevtfwd.dll\", \"wevtsvc.dll\", \"wfapigp.dll\", \"wfdprov.dll\", \"wfdsconmgr.dll\", \"wfdsconmgrsvc.dll\", \"wfhc.dll\", \"whealogr.dll\", \"whhelper.dll\", \"wiaaut.dll\", \"wiadefui.dll\", \"wiadss.dll\", \"wiarpc.dll\", \"wiascanprofiles.dll\", \"wiaservc.dll\", \"wiashext.dll\", \"wiatrace.dll\", \"wificloudstore.dll\", \"wificonfigsp.dll\", \"wifidisplay.dll\", \"wimgapi.dll\", \"win32spl.dll\", \"win32u.dll\", \"winbio.dll\", \"winbiodatamodel.dll\", \"winbioext.dll\", \"winbrand.dll\", \"wincorlib.dll\", \"wincredprovider.dll\", \"wincredui.dll\", \"windowmanagement.dll\", \"windowscodecs.dll\", \"windowscodecsext.dll\", \"windowscodecsraw.dll\", \"windowsiotcsp.dll\", \"windowslivelogin.dll\", \"winethc.dll\", \"winhttp.dll\", \"winhttpcom.dll\", \"winhvemulation.dll\", \"winhvplatform.dll\", \"wininet.dll\", \"wininetlui.dll\", \"wininitext.dll\", \"winipcfile.dll\", \"winipcsecproc.dll\", \"winipsec.dll\", \"winlangdb.dll\", \"winlogonext.dll\", \"winmde.dll\", \"winml.dll\", \"winmm.dll\", \"winmmbase.dll\", \"winmsipc.dll\", \"winnlsres.dll\", \"winnsi.dll\", \"winreagent.dll\", \"winrnr.dll\", \"winrscmd.dll\", \"winrsmgr.dll\", \"winrssrv.dll\", \"winrttracing.dll\", \"winsatapi.dll\", \"winscard.dll\", \"winsetupui.dll\", \"winshfhc.dll\", \"winsku.dll\", \"winsockhc.dll\", \"winsqlite3.dll\", \"winsrpc.dll\", \"winsrv.dll\", \"winsrvext.dll\", \"winsta.dll\", \"winsync.dll\", \"winsyncmetastore.dll\", \"winsyncproviders.dll\", \"wintrust.dll\", \"wintypes.dll\", \"winusb.dll\", \"wirednetworkcsp.dll\", \"wisp.dll\", \"wkscli.dll\", \"wkspbrokerax.dll\", \"wksprtps.dll\", \"wkssvc.dll\", \"wlanapi.dll\", \"wlancfg.dll\", \"wlanconn.dll\", \"wlandlg.dll\", \"wlangpui.dll\", \"wlanhc.dll\", \"wlanhlp.dll\", \"wlanmediamanager.dll\", \"wlanmm.dll\", \"wlanmsm.dll\", \"wlanpref.dll\", \"wlanradiomanager.dll\", \"wlansec.dll\", \"wlansvc.dll\", \"wlansvcpal.dll\", \"wlanui.dll\", \"wlanutil.dll\", \"wldap32.dll\", \"wldp.dll\", \"wlgpclnt.dll\", \"wlidcli.dll\", \"wlidcredprov.dll\", \"wlidfdp.dll\", \"wlidnsp.dll\", \"wlidprov.dll\", \"wlidres.dll\", \"wlidsvc.dll\", \"wmadmod.dll\", \"wmadmoe.dll\", \"wmalfxgfxdsp.dll\", \"wmasf.dll\", \"wmcodecdspps.dll\", \"wmdmlog.dll\", \"wmdmps.dll\", \"wmdrmsdk.dll\", \"wmerror.dll\", \"wmi.dll\", \"wmiclnt.dll\", \"wmicmiplugin.dll\", \"wmidcom.dll\", \"wmidx.dll\", \"wmiprop.dll\", \"wmitomi.dll\", \"wmnetmgr.dll\", \"wmp.dll\", \"wmpdui.dll\", \"wmpdxm.dll\", \"wmpeffects.dll\", \"wmphoto.dll\", \"wmploc.dll\", \"wmpps.dll\", \"wmpshell.dll\", \"wmsgapi.dll\", \"wmspdmod.dll\", \"wmspdmoe.dll\", \"wmvcore.dll\", \"wmvdecod.dll\", \"wmvdspa.dll\", \"wmvencod.dll\", \"wmvsdecd.dll\", \"wmvsencd.dll\", \"wmvxencd.dll\", \"woftasks.dll\", \"wofutil.dll\", \"wordbreakers.dll\", \"workfoldersgpext.dll\", \"workfoldersres.dll\", \"workfoldersshell.dll\", \"workfolderssvc.dll\", \"wosc.dll\", \"wow64.dll\", \"wow64cpu.dll\", \"wow64win.dll\", \"wpbcreds.dll\", \"wpc.dll\", \"wpcapi.dll\", \"wpcdesktopmonsvc.dll\", \"wpcproxystubs.dll\", \"wpcrefreshtask.dll\", \"wpcwebfilter.dll\", \"wpdbusenum.dll\", \"wpdshext.dll\", \"wpdshserviceobj.dll\", \"wpdsp.dll\", \"wpd_ci.dll\", \"wpnapps.dll\", \"wpnclient.dll\", \"wpncore.dll\", \"wpninprc.dll\", \"wpnprv.dll\", \"wpnservice.dll\", \"wpnsruprov.dll\", \"wpnuserservice.dll\", \"wpportinglibrary.dll\", \"wpprecorderum.dll\", \"wptaskscheduler.dll\", \"wpx.dll\", \"ws2help.dll\", \"ws2_32.dll\", \"wscapi.dll\", \"wscinterop.dll\", \"wscisvif.dll\", \"wsclient.dll\", \"wscproxystub.dll\", \"wscsvc.dll\", \"wsdapi.dll\", \"wsdchngr.dll\", \"wsdprintproxy.dll\", \"wsdproviderutil.dll\", \"wsdscanproxy.dll\", \"wsecedit.dll\", \"wsepno.dll\", \"wshbth.dll\", \"wshcon.dll\", \"wshelper.dll\", \"wshext.dll\", \"wshhyperv.dll\", \"wship6.dll\", \"wshqos.dll\", \"wshrm.dll\", \"wshtcpip.dll\", \"wshunix.dll\", \"wslapi.dll\", \"wsmagent.dll\", \"wsmauto.dll\", \"wsmplpxy.dll\", \"wsmres.dll\", \"wsmsvc.dll\", \"wsmwmipl.dll\", \"wsnmp32.dll\", \"wsock32.dll\", \"wsplib.dll\", \"wsp_fs.dll\", \"wsp_health.dll\", \"wsp_sr.dll\", \"wtsapi32.dll\", \"wuapi.dll\", \"wuaueng.dll\", \"wuceffects.dll\", \"wudfcoinstaller.dll\", \"wudfplatform.dll\", \"wudfsmcclassext.dll\", \"wudfx.dll\", \"wudfx02000.dll\", \"wudriver.dll\", \"wups.dll\", \"wups2.dll\", \"wuuhext.dll\", \"wuuhosdeployment.dll\", \"wvc.dll\", \"wwaapi.dll\", \"wwaext.dll\", \"wwanapi.dll\", \"wwancfg.dll\", \"wwanhc.dll\", \"wwanprotdim.dll\", \"wwanradiomanager.dll\", \"wwansvc.dll\", \"wwapi.dll\", \"xamltilerender.dll\", \"xaudio2_8.dll\", \"xaudio2_9.dll\", \"xblauthmanager.dll\", \"xblgamesave.dll\", \"xblgamesaveext.dll\", \"xblgamesaveproxy.dll\", \"xboxgipsvc.dll\", \"xboxgipsynthetic.dll\", \"xboxnetapisvc.dll\", \"xinput1_4.dll\", \"xinput9_1_0.dll\", \"xinputuap.dll\", \"xmlfilter.dll\", \"xmllite.dll\", \"xmlprovi.dll\", \"xolehlp.dll\", \"xpsgdiconverter.dll\", \"xpsprint.dll\", \"xpspushlayer.dll\", \"xpsrasterservice.dll\", \"xpsservices.dll\", \"xwizards.dll\", \"xwreg.dll\", \"xwtpdui.dll\", \"xwtpw32.dll\", \"zipcontainer.dll\", \"zipfldr.dll\", \"bootsvc.dll\", \"halextintcpsedma.dll\", \"icsvcvss.dll\", \"ieproxydesktop.dll\", \"lsaadt.dll\", \"nlansp_c.dll\", \"nrtapi.dll\", \"opencl.dll\", \"pfclient.dll\", \"pnpdiag.dll\", \"prxyqry.dll\", \"rdpnanotransport.dll\", \"servicingcommon.dll\", \"sortwindows63.dll\", \"sstpcfg.dll\", \"tdhres.dll\", \"umpodev.dll\", \"utcapi.dll\", \"windlp.dll\", \"wow64base.dll\", \"wow64con.dll\", \"blbuires.dll\", \"bpainst.dll\", \"cbclient.dll\", \"certadm.dll\", \"certocm.dll\", \"certpick.dll\", \"csdeployres.dll\", \"dsdeployres.dll\", \"eapa3hst.dll\", \"eapacfg.dll\", \"eapahost.dll\", \"elsext.dll\", \"encdump.dll\", \"escmigplugin.dll\", \"fsclient.dll\", \"fsdeployres.dll\", \"fssminst.dll\", \"fssmres.dll\", \"fssprov.dll\", \"ipamapi.dll\", \"kpssvc.dll\", \"lbfoadminlib.dll\", \"mintdh.dll\", \"mmci.dll\", \"mmcico.dll\", \"mprsnap.dll\", \"mstsmhst.dll\", \"mstsmmc.dll\", \"muxinst.dll\", \"personax.dll\", \"rassfm.dll\", \"rasuser.dll\", \"rdmsinst.dll\", \"rdmsres.dll\", \"rtrfiltr.dll\", \"sacsvr.dll\", \"scrdenrl.dll\", \"sdclient.dll\", \"sharedstartmodel.dll\", \"smsrouter.dll\", \"spwizimg_svr.dll\", \"sqlcecompact40.dll\", \"sqlceoledb40.dll\", \"sqlceqp40.dll\", \"sqlcese40.dll\", \"srvmgrinst.dll\", \"svrmgrnc.dll\", \"tapisnap.dll\", \"tlsbrand.dll\", \"tsec.dll\", \"tsprop.dll\", \"tspubiconhelper.dll\", \"tssdjet.dll\", \"tsuserex.dll\", \"ualapi.dll\", \"ualsvc.dll\", \"umcres.dll\", \"updatehandlers.dll\", \"usocore.dll\", \"vssui.dll\", \"wsbappres.dll\", \"wsbonline.dll\", \"wsmselpl.dll\", \"wsmselrr.dll\", \"xpsfilt.dll\", \"xpsshhdr.dll\"\n ) and\n not (\n (\n dll.name : \"icuuc.dll\" and dll.code_signature.subject_name in (\n \"Valve\", \"Valve Corp.\", \"Avanquest Software (7270356 Canada Inc)\", \"Adobe Inc.\"\n ) and dll.code_signature.trusted == true\n ) or\n (\n dll.name : (\"timeSync.dll\", \"appInfo.dll\") and dll.code_signature.subject_name in (\n \"VMware Inc.\", \"VMware, Inc.\"\n ) and dll.code_signature.trusted == true\n ) or\n (\n dll.name : \"libcrypto.dll\" and dll.code_signature.subject_name in (\n \"NoMachine S.a.r.l.\", \"Bitdefender SRL\", \"Oculus VR, LLC\"\n ) and dll.code_signature.trusted == true\n ) or\n (\n dll.name : \"ucrtbase.dll\" and dll.code_signature.subject_name in (\n \"Proofpoint, Inc.\", \"Rapid7 LLC\", \"Eclipse.org Foundation, Inc.\", \"Amazon.com Services LLC\", \"Windows Phone\"\n ) and dll.code_signature.trusted == true\n ) or\n (dll.name : \"ICMP.dll\" and dll.code_signature.subject_name == \"Paessler AG\" and dll.code_signature.trusted == true) or\n (dll.name : \"kerberos.dll\" and dll.code_signature.subject_name == \"Bitdefender SRL\" and dll.code_signature.trusted == true) or\n (dll.name : \"dbghelp.dll\" and dll.code_signature.trusted == true) or\n (dll.name : \"DirectML.dll\" and dll.code_signature.subject_name == \"Adobe Inc.\" and dll.code_signature.trusted == true) or\n (\n dll.path : (\n \"?:\\\\Windows\\\\SystemApps\\\\*\\\\dxgi.dll\",\n \"?:\\\\Windows\\\\SystemApps\\\\*\\\\wincorlib.dll\",\n \"?:\\\\Windows\\\\dxgi.dll\"\n )\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "System Binary Copied and/or Moved to Suspicious Directory", + "description": "This rule monitors for the copying or moving of a system binary to a suspicious directory. Adversaries may copy/move and rename system binaries to evade detection. Copying a system binary to a different location should not occur often, so if it does, the activity should be investigated.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1564", + "name": "Hide Artifacts", + "reference": "https://attack.mitre.org/techniques/T1564/" + }, + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.003", + "name": "Rename System Utilities", + "reference": "https://attack.mitre.org/techniques/T1036/003/" + } + ] + } + ] + } + ], + "id": "6cb99ab8-4d41-4400-ab41-f617c9033b2d", + "rule_id": "fda1d332-5e08-4f27-8a9b-8c802e3292a6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name in (\"cp\", \"mv\") and process.args : (\n // Shells\n \"/bin/*sh\", \"/usr/bin/*sh\", \n\n // Interpreters\n \"/bin/python*\", \"/usr/bin/python*\", \"/bin/php*\", \"/usr/bin/php*\", \"/bin/ruby*\", \"/usr/bin/ruby*\", \"/bin/perl*\",\n \"/usr/bin/perl*\", \"/bin/lua*\", \"/usr/bin/lua*\", \"/bin/java*\", \"/usr/bin/java*\", \n\n // Compilers\n \"/bin/gcc*\", \"/usr/bin/gcc*\", \"/bin/g++*\", \"/usr/bin/g++*\", \"/bin/cc\", \"/usr/bin/cc\",\n\n // Suspicious utilities\n \"/bin/nc\", \"/usr/bin/nc\", \"/bin/ncat\", \"/usr/bin/ncat\", \"/bin/netcat\", \"/usr/bin/netcat\", \"/bin/nc.openbsd\",\n \"/usr/bin/nc.openbsd\", \"/bin/*awk\", \"/usr/bin/*awk\", \"/bin/socat\", \"/usr/bin/socat\", \"/bin/openssl\",\n \"/usr/bin/openssl\", \"/bin/telnet\", \"/usr/bin/telnet\", \"/bin/mkfifo\", \"/usr/bin/mkfifo\", \"/bin/mknod\",\n \"/usr/bin/mknod\", \"/bin/ping*\", \"/usr/bin/ping*\", \"/bin/nmap\", \"/usr/bin/nmap\",\n\n // System utilities\n \"/bin/ls\", \"/usr/bin/ls\", \"/bin/cat\", \"/usr/bin/cat\", \"/bin/sudo\", \"/usr/bin/sudo\", \"/bin/curl\", \"/usr/bin/curl\",\n \"/bin/wget\", \"/usr/bin/wget\", \"/bin/tmux\", \"/usr/bin/tmux\", \"/bin/screen\", \"/usr/bin/screen\", \"/bin/ssh\",\n \"/usr/bin/ssh\", \"/bin/ftp\", \"/usr/bin/ftp\"\n ) and not process.parent.name in (\"dracut-install\", \"apticron\", \"generate-from-dir\", \"platform-python\")]\n [file where host.os.type == \"linux\" and event.action == \"creation\" and file.path : (\n \"/dev/shm/*\", \"/run/shm/*\", \"/tmp/*\", \"/var/tmp/*\", \"/run/*\", \"/var/run/*\", \"/var/www/*\", \"/proc/*/fd/*\"\n )]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "PowerShell Script with Password Policy Discovery Capabilities", + "description": "Identifies the use of Cmdlets and methods related to remote execution activities using WinRM. Attackers can abuse WinRM to perform lateral movement using built-in tools.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Tactic: Execution", + "Data Source: PowerShell Logs", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1201", + "name": "Password Policy Discovery", + "reference": "https://attack.mitre.org/techniques/T1201/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "08257b25-bb97-4dae-b282-2496a3038a6a", + "rule_id": "fe25d5bc-01fa-494a-95ff-535c29cc4c96", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category: \"process\" and host.os.type:windows and\n(\n powershell.file.script_block_text: (\n \"Get-ADDefaultDomainPasswordPolicy\" or\n \"Get-ADFineGrainedPasswordPolicy\" or\n \"Get-ADUserResultantPasswordPolicy\" or\n \"Get-DomainPolicy\" or\n \"Get-GPPPassword\" or\n \"Get-PassPol\"\n )\n or\n powershell.file.script_block_text: (\n (\"defaultNamingContext\" or \"ActiveDirectory.DirectoryContext\" or \"ActiveDirectory.DirectorySearcher\") and\n (\n (\n \".MinLengthPassword\" or\n \".MinPasswordAge\" or\n \".MaxPasswordAge\"\n ) or\n (\n \"minPwdAge\" or\n \"maxPwdAge\" or\n \"minPwdLength\"\n ) or\n (\n \"msDS-PasswordSettings\"\n )\n )\n )\n) and not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n and not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "Potential Masquerading as Business App Installer", + "description": "Identifies executables with names resembling legitimate business applications but lacking signatures from the original developer. Attackers may trick users into downloading malicious executables that masquerade as legitimate applications via malicious ads, forum posts, and tutorials, effectively gaining initial access.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 2, + "tags": [ + "Domain: Endpoint", + "Data Source: Elastic Defend", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Initial Access", + "Tactic: Execution", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.rapid7.com/blog/post/2023/08/31/fake-update-utilizes-new-idat-loader-to-execute-stealc-and-lumma-infostealers" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + }, + { + "id": "T1036.005", + "name": "Match Legitimate Name or Location", + "reference": "https://attack.mitre.org/techniques/T1036/005/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1189", + "name": "Drive-by Compromise", + "reference": "https://attack.mitre.org/techniques/T1189/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] + } + ], + "id": "fd29937f-9b29-402d-8dc7-db09351b6eac", + "rule_id": "feafdc51-c575-4ed2-89dd-8e20badc2d6c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and\n event.type == \"start\" and process.executable : \"?:\\\\Users\\\\*\\\\Downloads\\\\*\" and\n not process.code_signature.status : (\"errorCode_endpoint*\", \"errorUntrustedRoot\", \"errorChaining\") and\n (\n /* Slack */\n (process.name : \"*slack*.exe\" and not\n (process.code_signature.subject_name in (\n \"Slack Technologies, Inc.\",\n \"Slack Technologies, LLC\"\n ) and process.code_signature.trusted == true)\n ) or\n\n /* WebEx */\n (process.name : \"*webex*.exe\" and not\n (process.code_signature.subject_name in (\"Cisco WebEx LLC\", \"Cisco Systems, Inc.\") and process.code_signature.trusted == true)\n ) or\n\n /* Teams */\n (process.name : \"teams*.exe\" and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Discord */\n (process.name : \"*discord*.exe\" and not\n (process.code_signature.subject_name == \"Discord Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* WhatsApp */\n (process.name : \"*whatsapp*.exe\" and not\n (process.code_signature.subject_name in (\n \"WhatsApp LLC\",\n \"WhatsApp, Inc\",\n \"24803D75-212C-471A-BC57-9EF86AB91435\"\n ) and process.code_signature.trusted == true)\n ) or\n\n /* Zoom */\n (process.name : (\"*zoom*installer*.exe\", \"*zoom*setup*.exe\", \"zoom.exe\") and not\n (process.code_signature.subject_name == \"Zoom Video Communications, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Outlook */\n (process.name : \"*outlook*.exe\" and not\n (\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true) or\n (\n process.name: \"MSOutlookHelp-PST-Viewer.exe\" and process.code_signature.subject_name == \"Aryson Technologies Pvt. Ltd\" and\n process.code_signature.trusted == true\n )\n )\n ) or\n\n /* Thunderbird */\n (process.name : \"*thunderbird*.exe\" and not\n (process.code_signature.subject_name == \"Mozilla Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Grammarly */\n (process.name : \"*grammarly*.exe\" and not\n (process.code_signature.subject_name == \"Grammarly, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Dropbox */\n (process.name : \"*dropbox*.exe\" and not\n (process.code_signature.subject_name == \"Dropbox, Inc\" and process.code_signature.trusted == true)\n ) or\n\n /* Tableau */\n (process.name : \"*tableau*.exe\" and not\n (process.code_signature.subject_name == \"Tableau Software LLC\" and process.code_signature.trusted == true)\n ) or\n\n /* Google Drive */\n (process.name : \"*googledrive*.exe\" and not\n (process.code_signature.subject_name == \"Google LLC\" and process.code_signature.trusted == true)\n ) or\n\n /* MSOffice */\n (process.name : \"*office*setup*.exe\" and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Okta */\n (process.name : \"*okta*.exe\" and not\n (process.code_signature.subject_name == \"Okta, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* OneDrive */\n (process.name : \"*onedrive*.exe\" and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Chrome */\n (process.name : \"*chrome*.exe\" and not\n (process.code_signature.subject_name in (\"Google LLC\", \"Google Inc\") and process.code_signature.trusted == true)\n ) or\n\n /* Firefox */\n (process.name : \"*firefox*.exe\" and not\n (process.code_signature.subject_name == \"Mozilla Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Edge */\n (process.name : (\"*microsoftedge*.exe\", \"*msedge*.exe\") and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Brave */\n (process.name : \"*brave*.exe\" and not\n (process.code_signature.subject_name == \"Brave Software, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* GoogleCloud Related Tools */\n (process.name : \"*GoogleCloud*.exe\" and not\n (process.code_signature.subject_name == \"Google LLC\" and process.code_signature.trusted == true)\n ) or\n\n /* Github Related Tools */\n (process.name : \"*github*.exe\" and not\n (process.code_signature.subject_name == \"GitHub, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Notion */\n (process.name : \"*notion*.exe\" and not\n (process.code_signature.subject_name == \"Notion Labs, Inc.\" and process.code_signature.trusted == true)\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "MS Office Macro Security Registry Modifications", + "description": "Microsoft Office Products offer options for users and developers to control the security settings for running and using Macros. Adversaries may abuse these security settings to modify the default behavior of the Office Application to trust future macros and/or disable security warnings, which could increase their chances of establishing persistence.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Triage and analysis\n\n### Investigating MS Office Macro Security Registry Modifications\n\nMacros are small programs that are used to automate repetitive tasks in Microsoft Office applications. Historically, macros have been used for a variety of reasons -- from automating part of a job, to building entire processes and data flows. Macros are written in Visual Basic for Applications (VBA) and are saved as part of Microsoft Office files.\n\nMacros are often created for legitimate reasons, but they can also be written by attackers to gain access, harm a system, or bypass other security controls such as application allow listing. In fact, exploitation from malicious macros is one of the top ways that organizations are compromised today. These attacks are often conducted through phishing or spear phishing campaigns.\n\nAttackers can convince victims to modify Microsoft Office security settings, so their macros are trusted by default and no warnings are displayed when they are executed. These settings include:\n\n- *Trust access to the VBA project object model* - When enabled, Microsoft Office will trust all macros and run any code without showing a security warning or requiring user permission.\n- *VbaWarnings* - When set to 1, Microsoft Office will trust all macros and run any code without showing a security warning or requiring user permission.\n\nThis rule looks for registry changes affecting the conditions above.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the user and check if the change was done manually.\n- Verify whether malicious macros were executed after the registry change.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve recently executed Office documents and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Reset the registry key value.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Explore using GPOs to manage security settings for Microsoft Office macros.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", + "version": 105, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Resources: Investigation Guide", + "Data Source: Elastic Endgame" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] + } + ], + "id": "ae455dff-c06f-4bd4-af89-464b427710e1", + "rule_id": "feeed87c-5e95-4339-aef1-47fd79bcfbe3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path : (\n \"HKU\\\\S-1-5-21-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\AccessVBOM\",\n \"HKU\\\\S-1-5-21-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\VbaWarnings\",\n \"HKU\\\\S-1-12-1-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\AccessVBOM\",\n \"HKU\\\\S-1-12-1-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\VbaWarnings\",\n \"\\\\REGISTRY\\\\USER\\\\S-1-5-21-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\AccessVBOM\",\n \"\\\\REGISTRY\\\\USER\\\\S-1-5-21-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\VbaWarnings\",\n \"\\\\REGISTRY\\\\USER\\\\S-1-12-1-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\AccessVBOM\",\n \"\\\\REGISTRY\\\\USER\\\\S-1-12-1-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\VbaWarnings\"\n ) and\n registry.data.strings : (\"0x00000001\", \"1\") and\n process.name : (\"cscript.exe\", \"wscript.exe\", \"mshta.exe\", \"mshta.exe\", \"winword.exe\", \"excel.exe\")\n", + "language": "eql", + "index": [ + "winlogbeat-*", + "logs-windows.*", + "endgame-*" + ] + }, + { + "name": "Microsoft 365 Exchange Transport Rule Creation", + "description": "Identifies a transport rule creation in Microsoft 365. As a best practice, Exchange Online mail transport rules should not be set to forward email to domains outside of your organization. An adversary may create transport rules to exfiltrate data.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 102, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "A new transport rule may be created by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://docs.microsoft.com/en-us/powershell/module/exchange/new-transportrule?view=exchange-ps", + "https://docs.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1537", + "name": "Transfer Data to Cloud Account", + "reference": "https://attack.mitre.org/techniques/T1537/" + } + ] + } + ], + "id": "2dbecfe2-6d16-4f29-b439-d06a7fe89dc8", + "rule_id": "ff4dd44a-0ac6-44c4-8609-3f81bc820f02", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"New-TransportRule\" and event.outcome:success\n", + "language": "kuery" + }, + { + "name": "GCP Firewall Rule Deletion", + "description": "Identifies when a firewall rule is deleted in Google Cloud Platform (GCP) for Virtual Private Cloud (VPC) or App Engine. These firewall rules can be configured to allow or deny connections to or from virtual machine (VM) instances or specific applications. An adversary may delete a firewall rule in order to weaken their target's security controls.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 104, + "tags": [ + "Domain: Cloud", + "Data Source: GCP", + "Data Source: Google Cloud Platform", + "Use Case: Configuration Audit", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Firewall rules may be deleted by system administrators. Verify that the firewall configuration change was expected. Exceptions can be added to this rule to filter expected behavior." + ], + "references": [ + "https://cloud.google.com/vpc/docs/firewalls", + "https://cloud.google.com/appengine/docs/standard/python/understanding-firewalls" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/" + } + ] + } + ], + "id": "e3d92e31-66f5-4dd6-9f1e-83bb03dda3ca", + "rule_id": "ff9b571e-61d6-4f6c-9561-eb4cca3bafe1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "gcp", + "version": "^2.0.0", + "integration": "audit" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "query", + "index": [ + "filebeat-*", + "logs-gcp*" + ], + "query": "event.dataset:gcp.audit and event.action:(*.compute.firewalls.delete or google.appengine.*.Firewall.Delete*Rule)\n", + "language": "kuery" + }, + { + "name": "Potential Network Scan Executed From Host", + "description": "This threshold rule monitors for the rapid execution of unix utilities that are capable of conducting network scans. Adversaries may leverage built-in tools such as ping, netcat or socat to execute ping sweeps across the network while attempting to evade detection or due to the lack of network mapping tools available on the compromised host.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1046", + "name": "Network Service Discovery", + "reference": "https://attack.mitre.org/techniques/T1046/" + } + ] + } + ], + "id": "8910dae5-6594-47fb-9c8a-121099a2f8d2", + "rule_id": "03c23d45-d3cb-4ad4-ab5d-b361ffe8724a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "threshold", + "query": "host.os.type:linux and event.action:exec and event.type:start and \nprocess.name:(ping or nping or hping or hping2 or hping3 or nc or ncat or netcat or socat)\n", + "threshold": { + "field": [ + "host.id", + "process.parent.entity_id", + "process.executable" + ], + "value": 1, + "cardinality": [ + { + "field": "process.args", + "value": 100 + } + ] + }, + "index": [ + "logs-endpoint.events.*" + ], + "language": "kuery" + }, + { + "name": "Tainted Kernel Module Load", + "description": "This rule monitors the syslog log file for messages related to instances of a tainted kernel module load. Rootkits often leverage kernel modules as their main defense evasion technique. Detecting tainted kernel module loads is crucial for ensuring system security and integrity, as malicious or unauthorized modules can compromise the kernel and lead to system vulnerabilities or unauthorized access.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.006", + "name": "Kernel Modules and Extensions", + "reference": "https://attack.mitre.org/techniques/T1547/006/" + } + ] + } + ] + } + ], + "id": "8d07d8be-e998-4cbf-b1dc-c19cff936ff3", + "rule_id": "05cad2fb-200c-407f-b472-02ea8c9e5e4a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "system", + "version": "^1.6.4" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "message", + "type": "match_only_text", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "\nThis rule requires data coming in from one of the following integrations:\n- Auditbeat\n- Filebeat\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n### Filebeat Setup\nFilebeat is a lightweight shipper for forwarding and centralizing log data. Installed as an agent on your servers, Filebeat monitors the log files or locations that you specify, collects log events, and forwards them either to Elasticsearch or Logstash for indexing.\n\n#### The following steps should be executed in order to add the Filebeat for the Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/setup-repositories.html).\n- To run Filebeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html).\n- To run Filebeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/running-on-kubernetes.html).\n- For quick start information for Filebeat refer to the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/8.11/filebeat-installation-configuration.html).\n- For complete Setup and Run Filebeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/setting-up-and-running.html).\n\n#### Rule Specific Setup Note\n- This rule requires the Filebeat System Module to be enabled.\n- The system module collects and parses logs created by the system logging service of common Unix/Linux based distributions.\n- To run the system module of Filebeat on Linux follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-system.html).\n\n", + "type": "query", + "index": [ + "logs-system.auth-*" + ], + "query": "host.os.type:linux and event.dataset:\"system.syslog\" and process.name:kernel and \nmessage:\"module verification failed: signature and/or required key missing - tainting kernel\"\n", + "language": "kuery" + }, + { + "name": "Unusual Remote File Size", + "description": "A machine learning job has detected an unusually high file size shared by a remote host indicating potential lateral movement activity. One of the primary goals of attackers after gaining access to a network is to locate and exfiltrate valuable information. Instead of multiple small transfers that can raise alarms, attackers might choose to bundle data into a single large file transfer.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-90m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "75e82511-6992-44c4-8b64-f947611efb5a", + "rule_id": "0678bc9c-b71a-433b-87e6-2f664b6b3131", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_high_file_size_remote_file_transfer" + }, + { + "name": "GitHub Protected Branch Settings Changed", + "description": "This rule detects setting modifications for protected branches of a GitHub repository. Branch protection rules can be used to enforce certain workflows or requirements before a contributor can push changes to a branch in your repository. Changes to these protected branch settings should be investigated and verified as legitimate activity. Unauthorized changes could be used to lower your organization's security posture and leave you exposed for future attacks.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Cloud", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Github" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1562", + "name": "Impair Defenses", + "reference": "https://attack.mitre.org/techniques/T1562/", + "subtechnique": [ + { + "id": "T1562.001", + "name": "Disable or Modify Tools", + "reference": "https://attack.mitre.org/techniques/T1562/001/" + } + ] + } + ] + } + ], + "id": "3612ff77-f216-45a7-81ef-c5207bd7cae8", + "rule_id": "07639887-da3a-4fbf-9532-8ce748ff8c50", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "github", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "github.category", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "configuration where event.dataset == \"github.audit\" \n and github.category == \"protected_branch\" and event.type == \"change\" \n", + "language": "eql", + "index": [ + "logs-github.audit-*" + ] + }, + { + "name": "Processes with Trailing Spaces", + "description": "Identify instances where adversaries include trailing space characters to mimic regular files, disguising their activity to evade default file handling mechanisms.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.006", + "name": "Space after Filename", + "reference": "https://attack.mitre.org/techniques/T1036/006/" + } + ] + } + ] + } + ], + "id": "4e92eed2-1569-4198-b797-84be0e572058", + "rule_id": "0c093569-dff9-42b6-87b1-0242d9f7d9b4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type in (\"start\", \"process_started\") and process.name : \"* \"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Netcat Listener Established via rlwrap", + "description": "Monitors for the execution of a netcat listener via rlwrap. rlwrap is a 'readline wrapper', a small utility that uses the GNU Readline library to allow the editing of keyboard input for any command. This utility can be used in conjunction with netcat to gain a more stable reverse shell.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Netcat is a dual-use tool that can be used for benign or malicious activity. Netcat is included in some Linux distributions so its presence is not necessarily suspicious. Some normal use of this program, while uncommon, may originate from scripts, automation tools, and frameworks." + ], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "0d59aa15-32d7-45a1-8962-516ac3da43c4", + "rule_id": "0f56369f-eb3d-459c-a00b-87c2bf7bdfc5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"rlwrap\" and process.args in (\n \"nc\", \"ncat\", \"netcat\", \"nc.openbsd\", \"socat\"\n) and process.args : \"*l*\" and process.args_count >= 4\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Windows Process Cluster Spawned by a User", + "description": "A machine learning job combination has detected a set of one or more suspicious Windows processes with unusually high scores for malicious probability. These process(es) have been classified as malicious in several ways. The process(es) were predicted to be malicious by the ProblemChild supervised ML model. If the anomaly contains a cluster of suspicious processes, each process has the same user name, and the aggregate score of the event cluster was calculated to be unusually high by an unsupervised ML model. Such a cluster often contains suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Living off the Land Attack Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/problemchild", + "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + } + ], + "id": "9c507a01-33ae-4337-9530-c04e7ec092ab", + "rule_id": "1224da6c-0326-4b4f-8454-68cdc5ae542b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "problemchild", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "problem_child_high_sum_by_user" + }, + { + "name": "Machine Learning Detected a Suspicious Windows Event Predicted to be Malicious Activity", + "description": "A supervised machine learning model (ProblemChild) has identified a suspicious Windows process event with high probability of it being malicious activity. Alternatively, the model's blocklist identified the event as being malicious.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "OS: Windows", + "Data Source: Elastic Endgame", + "Use Case: Living off the Land Attack Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-10m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/problemchild", + "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.004", + "name": "Masquerade Task or Service", + "reference": "https://attack.mitre.org/techniques/T1036/004/" + } + ] + } + ] + } + ], + "id": "f3df8e9c-6909-48bc-a5c7-9a50ca2536ff", + "rule_id": "13e908b9-7bf0-4235-abc9-b5deb500d0ad", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "problemchild", + "version": "^2.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "blocklist_label", + "type": "unknown", + "ecs": false + }, + { + "name": "problemchild.prediction", + "type": "unknown", + "ecs": false + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "eql", + "query": "process where (problemchild.prediction == 1 or blocklist_label == 1) and not process.args : (\"*C:\\\\WINDOWS\\\\temp\\\\nessus_*.txt*\", \"*C:\\\\WINDOWS\\\\temp\\\\nessus_*.tmp*\")\n", + "language": "eql", + "index": [ + "endgame-*", + "logs-endpoint.events.process-*", + "winlogbeat-*" + ] + }, + { + "name": "Execution from a Removable Media with Network Connection", + "description": "Identifies process execution from a removable media and by an unusual process. Adversaries may move onto systems, possibly those on disconnected or air-gapped networks, by copying malware to removable media and taking advantage of Autorun features when the media is inserted into a system and executes.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1091", + "name": "Replication Through Removable Media", + "reference": "https://attack.mitre.org/techniques/T1091/" + } + ] + } + ], + "id": "9f330d67-fc42-46cc-9797-78f6e2b3837f", + "rule_id": "1542fa53-955e-4330-8e4d-b2d812adeb5f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.device.bus_type", + "type": "unknown", + "ecs": false + }, + { + "name": "process.Ext.device.product_id", + "type": "unknown", + "ecs": false + }, + { + "name": "process.code_signature.exists", + "type": "boolean", + "ecs": true + }, + { + "name": "process.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.entity_id with maxspan=5m\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n \n /* Direct Exec from USB */\n (process.Ext.device.bus_type : \"usb\" or process.Ext.device.product_id : \"USB *\") and\n (process.code_signature.trusted == false or process.code_signature.exists == false) and \n \n not process.code_signature.status : (\"errorExpired\", \"errorCode_endpoint*\")]\n [network where host.os.type == \"windows\" and event.action == \"connection_attempted\"]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Spike in Number of Connections Made to a Destination IP", + "description": "A machine learning job has detected a high count of source IPs establishing an RDP connection with a single destination IP. Attackers might use multiple compromised systems to attack a target to ensure redundancy in case a source IP gets detected and blocked.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-12h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "897e5842-a352-40d5-876f-0bfb4a5e2f2c", + "rule_id": "18a5dd9a-e3fa-4996-99b1-ae533b8f27fc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_high_rdp_distinct_count_source_ip_for_destination" + }, + { + "name": "Spike in Number of Processes in an RDP Session", + "description": "A machine learning job has detected unusually high number of processes started in a single RDP session. Executing a large number of processes remotely on other machines can be an indicator of lateral movement activity.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-12h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "a36c7a05-958c-4f74-9450-754294abafff", + "rule_id": "19e9daf3-f5c5-4bc2-a9af-6b1e97098f03", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_high_sum_rdp_number_of_processes" + }, + { + "name": "Potential Process Injection from Malicious Document", + "description": "Identifies child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, Excel) with unusual process arguments and path. This behavior is often observed during exploitation of Office applications or from documents with malicious macros.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Privilege Escalation", + "Tactic: Initial Access", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1055", + "name": "Process Injection", + "reference": "https://attack.mitre.org/techniques/T1055/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + } + ] + } + ] + } + ], + "id": "cbde5758-35b7-4dcc-ac01-468656a15f3a", + "rule_id": "1c5a04ae-d034-41bf-b0d8-96439b5cc774", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.action == \"start\" and\n process.parent.name : (\"excel.exe\", \"powerpnt.exe\", \"winword.exe\") and\n process.args_count == 1 and\n process.executable : (\n \"?:\\\\Windows\\\\SysWOW64\\\\*.exe\", \"?:\\\\Windows\\\\system32\\\\*.exe\"\n ) and\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\*\" and\n process.code_signature.trusted == true and not process.code_signature.subject_name : \"Microsoft *\") and\n not process.executable : (\n \"?:\\\\Windows\\\\Sys*\\\\Taskmgr.exe\",\n \"?:\\\\Windows\\\\Sys*\\\\ctfmon.exe\",\n \"?:\\\\Windows\\\\System32\\\\notepad.exe\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "New GitHub App Installed", + "description": "This rule detects when a new GitHub App has been installed in your organization account. GitHub Apps extend GitHub's functionality both within and outside of GitHub. When an app is installed it is granted permissions to read or modify your repository and organization data. Only trusted apps should be installed and any newly installed apps should be investigated to verify their legitimacy. Unauthorized app installation could lower your organization's security posture and leave you exposed for future attacks.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Cloud", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Github" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1072", + "name": "Software Deployment Tools", + "reference": "https://attack.mitre.org/techniques/T1072/" + } + ] + } + ], + "id": "57f777dd-35d7-4b7c-bff3-78f6fa2907ea", + "rule_id": "1ca62f14-4787-4913-b7af-df11745a49da", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "github", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "configuration where event.dataset == \"github.audit\" and event.action == \"integration_installation.create\"\n", + "language": "eql", + "index": [ + "logs-github.audit-*" + ] + }, + { + "name": "Potential Linux Hack Tool Launched", + "description": "Monitors for the execution of different processes that might be used by attackers for malicious intent. An alert from this rule should be investigated further, as hack tools are commonly used by blue teamers and system administrators as well.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [] + } + ], + "id": "15eb6f2d-dc0d-45d9-9a16-01bcef88bd7a", + "rule_id": "1df1152b-610a-4f48-9d7a-504f6ee5d9da", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and event.type == \"start\" and\nprocess.name in (\n // exploitation frameworks\n \"crackmapexec\", \"msfconsole\", \"msfvenom\", \"sliver-client\", \"sliver-server\", \"havoc\",\n // network scanners (nmap left out to reduce noise)\n \"zenmap\", \"nuclei\", \"netdiscover\", \"legion\",\n // web enumeration\n \"gobuster\", \"dirbuster\", \"dirb\", \"wfuzz\", \"ffuf\", \"whatweb\", \"eyewitness\",\n // web vulnerability scanning\n \"wpscan\", \"joomscan\", \"droopescan\", \"nikto\", \n // exploitation tools\n \"sqlmap\", \"commix\", \"yersinia\",\n // cracking and brute forcing\n \"john\", \"hashcat\", \"hydra\", \"ncrack\", \"cewl\", \"fcrackzip\", \"rainbowcrack\",\n // host and network\n \"linenum.sh\", \"linpeas.sh\", \"pspy32\", \"pspy32s\", \"pspy64\", \"pspy64s\", \"binwalk\", \"evil-winrm\"\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Creation of SettingContent-ms Files", + "description": "Identifies the suspicious creation of SettingContents-ms files, which have been used in attacks to achieve code execution while evading defenses.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://posts.specterops.io/the-tale-of-settingcontent-ms-files-f1ea253e4d39" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + } + ] + } + ] + } + ], + "id": "4c77a952-05da-45d6-b0c6-39f5119726a3", + "rule_id": "1e6363a6-3af5-41d4-b7ea-d475389c0ceb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n file.extension : \"settingcontent-ms\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual Process Execution on WBEM Path", + "description": "Identifies unusual processes running from the WBEM path, uncommon outside WMI-related Windows processes.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + } + ], + "id": "314e6406-67b1-47a6-a2eb-bb8ae85ddedc", + "rule_id": "1f460f12-a3cf-4105-9ebb-f788cc63f365", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.executable : (\"?:\\\\Windows\\\\System32\\\\wbem\\\\*\", \"?:\\\\Windows\\\\SysWow64\\\\wbem\\\\*\") and\n not process.name : (\n \"mofcomp.exe\",\n \"scrcons.exe\",\n \"unsecapp.exe\",\n \"wbemtest.exe\",\n \"winmgmt.exe\",\n \"wmiadap.exe\",\n \"wmiapsrv.exe\",\n \"wmic.exe\",\n \"wmiprvse.exe\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Werfault ReflectDebugger Persistence", + "description": "Identifies the registration of a Werfault Debugger. Attackers may abuse this mechanism to execute malicious payloads every time the utility is executed with the \"-pr\" parameter.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "366ba690-9918-48d0-bf9b-d1fbde7dad24", + "rule_id": "205b52c4-9c28-4af4-8979-935f3278d61a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\Windows Error Reporting\\\\Hangs\\\\ReflectDebugger\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\Windows Error Reporting\\\\Hangs\\\\ReflectDebugger\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Mofcomp Activity", + "description": "Managed Object Format (MOF) files can be compiled locally or remotely through mofcomp.exe. Attackers may leverage MOF files to build their own namespaces and classes into the Windows Management Instrumentation (WMI) repository, or establish persistence using WMI Event Subscription.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.003", + "name": "Windows Management Instrumentation Event Subscription", + "reference": "https://attack.mitre.org/techniques/T1546/003/" + } + ] + } + ] + } + ], + "id": "d4e6670b-25c6-4e9b-8b8f-ebbe172d247c", + "rule_id": "210d4430-b371-470e-b879-80b7182aa75e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"mofcomp.exe\" and process.args : \"*.mof\" and\n not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Remote File Creation on a Sensitive Directory", + "description": "Discovery of files created by a remote host on sensitive directories and folders. Remote file creation in these directories could indicate a malicious binary or script trying to compromise the system.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "Use Case: Lateral Movement Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-10m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/es/blog/remote-desktop-protocol-connections-elastic-security" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "6c2c9fb2-5db1-4cc2-916c-64823e6c2a88", + "rule_id": "2377946d-0f01-4957-8812-6878985f515d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where (event.action == \"creation\" or event.action == \"modification\") and\nprocess.name:(\"System\", \"scp\", \"sshd\", \"smbd\", \"vsftpd\", \"sftp-server\") and not\nuser.name:(\"SYSTEM\", \"root\") and\n(file.path : (\"C*\\\\Users\\\\*\\\\AppData\\\\Roaming*\", \"C*\\\\Program*Files\\\\*\",\n \"C*\\\\Windows\\\\*\", \"C*\\\\Windows\\\\System\\\\*\",\n \"C*\\\\Windows\\\\System32\\\\*\", \"/etc/*\", \"/tmp*\",\n \"/var/tmp*\", \"/home/*/.*\", \"/home/.*\", \"/usr/bin/*\",\n \"/sbin/*\", \"/bin/*\", \"/usr/lib/*\", \"/usr/sbin/*\",\n \"/usr/share/*\", \"/usr/local/*\", \"/var/lib/dpkg/*\",\n \"/lib/systemd/*\"\n )\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "New GitHub Owner Added", + "description": "Detects when a new member is added to a GitHub organization as an owner. This role provides admin level privileges. Any new owner roles should be investigated to determine it's validity. Unauthorized owner roles could indicate compromise within your organization and provide unlimited access to data and settings.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Cloud", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Github" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1136", + "name": "Create Account", + "reference": "https://attack.mitre.org/techniques/T1136/", + "subtechnique": [ + { + "id": "T1136.003", + "name": "Cloud Account", + "reference": "https://attack.mitre.org/techniques/T1136/003/" + } + ] + } + ] + } + ], + "id": "d89596d9-2948-46a4-8c82-dd25629fe25f", + "rule_id": "24401eca-ad0b-4ff9-9431-487a8e183af9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "github", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "github.permission", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "iam where event.dataset == \"github.audit\" and event.action == \"org.add_member\" and github.permission == \"admin\"\n", + "language": "eql", + "index": [ + "logs-github.audit-*" + ] + }, + { + "name": "Unusual Discovery Signal Alert with Unusual Process Command Line", + "description": "This rule leverages alert data from various Discovery building block rules to alert on signals with unusual unique host.id, user.id and process.command_line entries.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: Higher-Order Rule" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [] + } + ], + "id": "7ae0ee59-1544-4e3e-bd1d-41dd11218c03", + "rule_id": "29ef5686-9b93-433e-91b5-683911094698", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "kibana.alert.rule.rule_id", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type:windows and event.kind:signal and kibana.alert.rule.rule_id:(\n \"d68e95ad-1c82-4074-a12a-125fe10ac8ba\" or \"7b8bfc26-81d2-435e-965c-d722ee397ef1\" or\n \"0635c542-1b96-4335-9b47-126582d2c19a\" or \"6ea55c81-e2ba-42f2-a134-bccf857ba922\" or\n \"e0881d20-54ac-457f-8733-fe0bc5d44c55\" or \"06568a02-af29-4f20-929c-f3af281e41aa\" or\n \"c4e9ed3e-55a2-4309-a012-bc3c78dad10a\" or \"51176ed2-2d90-49f2-9f3d-17196428b169\"\n)\n", + "new_terms_fields": [ + "host.id", + "user.id", + "process.command_line" + ], + "history_window_start": "now-14d", + "index": [ + ".alerts-security.*" + ], + "language": "kuery" + }, + { + "name": "Potential Linux SSH X11 Forwarding", + "description": "This rule monitors for X11 forwarding via SSH. X11 forwarding is a feature that allows users to run graphical applications on a remote server and display the application's graphical user interface on their local machine. Attackers can abuse X11 forwarding for tunneling their GUI-based tools, pivot through compromised systems, and create covert communication channels, enabling lateral movement and facilitating remote control of systems within a network.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://book.hacktricks.xyz/generic-methodologies-and-resources/tunneling-and-port-forwarding" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + } + ], + "id": "a9cb84ee-cc6d-4662-8d3d-d4e9b04b9334", + "rule_id": "29f0cf93-d17c-4b12-b4f3-a433800539fa", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and\nprocess.name in (\"ssh\", \"sshd\") and process.args in (\"-X\", \"-Y\") and process.args_count >= 3 and \nprocess.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential SSH-IT SSH Worm Downloaded", + "description": "Identifies processes that are capable of downloading files with command line arguments containing URLs to SSH-IT's autonomous SSH worm. This worm intercepts outgoing SSH connections every time a user uses ssh.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend", + "Data Source: Elastic Endgame" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.thc.org/ssh-it/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.004", + "name": "SSH", + "reference": "https://attack.mitre.org/techniques/T1021/004/" + } + ] + }, + { + "id": "T1563", + "name": "Remote Service Session Hijacking", + "reference": "https://attack.mitre.org/techniques/T1563/", + "subtechnique": [ + { + "id": "T1563.001", + "name": "SSH Hijacking", + "reference": "https://attack.mitre.org/techniques/T1563/001/" + } + ] + } + ] + } + ], + "id": "3050cf6f-1822-46fd-a9c3-e0fab2bcfbb3", + "rule_id": "2ddc468e-b39b-4f5b-9825-f3dcb0e998ea", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name in (\"curl\", \"wget\") and process.args : (\n \"https://thc.org/ssh-it/x\", \"http://nossl.segfault.net/ssh-it-deploy.sh\", \"https://gsocket.io/x\",\n \"https://thc.org/ssh-it/bs\", \"http://nossl.segfault.net/bs\"\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Accessing Outlook Data Files", + "description": "Identifies commands containing references to Outlook data files extensions, which can potentially indicate the search, access, or modification of these files.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1114", + "name": "Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/", + "subtechnique": [ + { + "id": "T1114.001", + "name": "Local Email Collection", + "reference": "https://attack.mitre.org/techniques/T1114/001/" + } + ] + } + ] + } + ], + "id": "f51d7477-2977-4349-a739-7a489e916534", + "rule_id": "2e311539-cd88-4a85-a301-04f38795007c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.args : (\"*.ost\", \"*.pst\") and\n not process.name : \"outlook.exe\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Malicious Remote File Creation", + "description": "Malicious remote file creation, which can be an indicator of lateral movement activity.", + "risk_score": 99, + "severity": "critical", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "Use Case: Lateral Movement Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-10m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/es/blog/remote-desktop-protocol-connections-elastic-security" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "db724362-4a8b-4b2e-ae31-6cd06278437d", + "rule_id": "301571f3-b316-4969-8dd0-7917410030d3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.name\n[file where event.action == \"creation\" and process.name : (\"System\", \"scp\", \"sshd\", \"smbd\", \"vsftpd\", \"sftp-server\")]\n[file where event.category == \"malware\" or event.category == \"intrusion_detection\"\nand process.name:(\"System\", \"scp\", \"sshd\", \"smbd\", \"vsftpd\", \"sftp-server\")]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Modification of Dynamic Linker Preload Shared Object Inside A Container", + "description": "This rule detects the creation or modification of the dynamic linker preload shared object (ld.so.preload) inside a container. The Linux dynamic linker is used to load libraries needed by a program at runtime. Adversaries may hijack the dynamic linker by modifying the /etc/ld.so.preload file to point to malicious libraries. This behavior can be used to grant unauthorized access to system resources and has been used to evade detection of malicious processes in container environments.", + "risk_score": 73, + "severity": "high", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://unit42.paloaltonetworks.com/hildegard-malware-teamtnt/", + "https://www.anomali.com/blog/rocke-evolves-its-arsenal-with-a-new-malware-family-written-in-golang/", + "https://sysdig.com/blog/threat-detection-aws-cloud-containers/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1574", + "name": "Hijack Execution Flow", + "reference": "https://attack.mitre.org/techniques/T1574/", + "subtechnique": [ + { + "id": "T1574.006", + "name": "Dynamic Linker Hijacking", + "reference": "https://attack.mitre.org/techniques/T1574/006/" + } + ] + } + ] + } + ], + "id": "1623d66c-f553-4673-855a-5c9851b79ffe", + "rule_id": "342f834b-21a6-41bf-878c-87d116eba3ee", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "event.module", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where event.module== \"cloud_defend\" and event.type != \"deletion\" and file.path== \"/etc/ld.so.preload\"\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "GitHub Repository Deleted", + "description": "This rule detects when a GitHub repository is deleted within your organization. Repositories are a critical component used within an organization to manage work, collaborate with others and release products to the public. Any delete action against a repository should be investigated to determine it's validity. Unauthorized deletion of organization repositories could cause irreversible loss of intellectual property and indicate compromise within your organization.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Cloud", + "Use Case: Threat Detection", + "Tactic: Impact", + "Data Source: Github" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1485", + "name": "Data Destruction", + "reference": "https://attack.mitre.org/techniques/T1485/" + } + ] + } + ], + "id": "41d19ceb-785e-457e-ab17-fb9ae35ca062", + "rule_id": "345889c4-23a8-4bc0-b7ca-756bd17ce83b", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.module", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "configuration where event.module == \"github\" and event.action == \"repo.destroy\"\n", + "language": "eql", + "index": [ + "logs-github.audit-*" + ] + }, + { + "name": "Spike in Bytes Sent to an External Device", + "description": "A machine learning job has detected high bytes of data written to an external device. In a typical operational setting, there is usually a predictable pattern or a certain range of data that is written to external devices. An unusually large amount of data being written is anomalous and can signal illicit data copying or transfer activities.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Data Exfiltration Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-2h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/ded" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1052", + "name": "Exfiltration Over Physical Medium", + "reference": "https://attack.mitre.org/techniques/T1052/" + } + ] + } + ], + "id": "d7b5017e-d324-4f96-acf9-f52f9794bf86", + "rule_id": "35a3b253-eea8-46f0-abd3-68bdd47e6e3d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "ded", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "ded_high_bytes_written_to_external_device" + }, + { + "name": "High Mean of Process Arguments in an RDP Session", + "description": "A machine learning job has detected unusually high number of process arguments in an RDP session. Executing sophisticated attacks such as lateral movement can involve the use of complex commands, obfuscation mechanisms, redirection and piping, which in turn increases the number of arguments in a command.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-12h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "82a81395-45cd-4e4b-8eda-22709eda0f97", + "rule_id": "36c48a0c-c63a-4cbc-aee1-8cac87db31a9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_high_mean_rdp_process_args" + }, + { + "name": "Downloaded Shortcut Files", + "description": "Identifies .lnk shortcut file downloaded from outside the local network. These shortcut files are commonly used in phishing campaigns.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/", + "subtechnique": [ + { + "id": "T1204.002", + "name": "Malicious File", + "reference": "https://attack.mitre.org/techniques/T1204/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + }, + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + } + ], + "id": "7907aa12-7a21-42b8-8f9b-100e6769d128", + "rule_id": "39157d52-4035-44a8-9d1a-6f8c5f580a07", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.windows.zone_identifier", + "type": "unknown", + "ecs": false + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and file.extension == \"lnk\" and file.Ext.windows.zone_identifier > 1\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Spike in Number of Connections Made from a Source IP", + "description": "A machine learning job has detected a high count of destination IPs establishing an RDP connection with a single source IP. Once an attacker has gained access to one system, they might attempt to access more in the network in search of valuable assets, data, or further access points.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-12h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "6f6a79b4-70c2-444e-a859-54fadaa2c339", + "rule_id": "3e0561b5-3fac-4461-84cc-19163b9aaa61", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_high_rdp_distinct_count_destination_ip_for_source" + }, + { + "name": "Potential Remote File Execution via MSIEXEC", + "description": "Identifies the execution of the built-in Windows Installer, msiexec.exe, to install a remote package. Adversaries may abuse msiexec.exe to launch local or network accessible MSI files.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.007", + "name": "Msiexec", + "reference": "https://attack.mitre.org/techniques/T1218/007/" + } + ] + } + ] + } + ], + "id": "03a4816a-f24a-46cf-b7d3-f937a80fd11d", + "rule_id": "3e441bdb-596c-44fd-8628-2cfdf4516ada", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.Ext.token.integrity_level_name", + "type": "unknown", + "ecs": false + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.subject_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=1m\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.name : \"msiexec.exe\" and process.args : \"/V\"] by process.entity_id\n [network where host.os.type == \"windows\" and process.name : \"msiexec.exe\" and\n event.action == \"connection_attempted\"] by process.entity_id\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.parent.name : \"msiexec.exe\" and user.id : (\"S-1-5-21-*\", \"S-1-5-12-1-*\") and\n not process.executable : (\"?:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\srtasks.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\srtasks.exe\",\n \"?:\\\\Windows\\\\System32\\\\taskkill.exe\",\n \"?:\\\\Windows\\\\Installer\\\\MSI*.tmp\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\ie4uinit.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\ie4uinit.exe\",\n \"?:\\\\Windows\\\\System32\\\\sc.exe\",\n \"?:\\\\Windows\\\\system32\\\\Wbem\\\\mofcomp.exe\",\n \"?:\\\\Windows\\\\twain_32\\\\fjscan32\\\\SOP\\\\crtdmprc.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\taskkill.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\schtasks.exe\",\n \"?:\\\\Windows\\\\system32\\\\schtasks.exe\",\n \"?:\\\\Windows\\\\System32\\\\sdbinst.exe\") and\n not (process.code_signature.subject_name == \"Citrix Systems, Inc.\" and process.code_signature.trusted == true) and\n not (process.name : (\"regsvr32.exe\", \"powershell.exe\", \"rundll32.exe\", \"wscript.exe\") and\n process.Ext.token.integrity_level_name == \"high\" and\n process.args : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\")) and\n not (process.executable : (\"?:\\\\Program Files\\\\*.exe\", \"?:\\\\Program Files (x86)\\\\*.exe\") and process.code_signature.trusted == true) and\n not (process.name : \"rundll32.exe\" and process.args : \"printui.dll,PrintUIEntry\")\n ] by process.parent.entity_id\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual Time or Day for an RDP Session", + "description": "A machine learning job has detected an RDP session started at an usual time or weekday. An RDP session at an unusual time could be followed by other suspicious activities, so catching this is a good first step in detecting a larger attack.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-12h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "7abe07e5-9e9d-49a1-87af-ad1aaa762d97", + "rule_id": "3f4e2dba-828a-452a-af35-fe29c5e78969", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_unusual_time_weekday_rdp_session_start" + }, + { + "name": "Unusual Process Spawned by a User", + "description": "A machine learning job has detected a suspicious Windows process. This process has been classified as malicious in two ways. It was predicted to be malicious by the ProblemChild supervised ML model, and it was found to be suspicious given that its user context is unusual and does not commonly manifest malicious activity,by an unsupervised ML model. Such a process may be an instance of suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Living off the Land Attack Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/problemchild", + "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + } + ], + "id": "53f1fe64-3f33-4235-8729-db4495058ca4", + "rule_id": "40155ee4-1e6a-4e4d-a63b-e8ba16980cfb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "problemchild", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "problem_child_rare_process_by_user" + }, + { + "name": "Unix Socket Connection", + "description": "This rule monitors for inter-process communication via Unix sockets. Adversaries may attempt to communicate with local Unix sockets to enumerate application details, find vulnerabilities/configuration mistakes and potentially escalate privileges or set up malicious communication channels via Unix sockets for inter-process communication to attempt to evade detection.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1559", + "name": "Inter-Process Communication", + "reference": "https://attack.mitre.org/techniques/T1559/" + } + ] + } + ], + "id": "148096a0-4959-4762-be60-e414e79c7a80", + "rule_id": "41284ba3-ed1a-4598-bfba-a97f75d9aba2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and (\n (process.name in (\"nc\", \"ncat\", \"netcat\", \"nc.openbsd\") and \n process.args == \"-U\" and process.args : (\"/usr/local/*\", \"/run/*\", \"/var/run/*\")) or\n (process.name == \"socat\" and \n process.args == \"-\" and process.args : (\"UNIX-CLIENT:/usr/local/*\", \"UNIX-CLIENT:/run/*\", \"UNIX-CLIENT:/var/run/*\"))\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Microsoft 365 Mail Access by ClientAppId", + "description": "Identifies when a Microsoft 365 Mailbox is accessed by a ClientAppId that was observed for the fist time during the last 10 days.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Domain: Cloud", + "Data Source: Microsoft 365", + "Use Case: Configuration Audit", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-30m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "User using a new mail client." + ], + "references": [ + "https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-193a" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1078", + "name": "Valid Accounts", + "reference": "https://attack.mitre.org/techniques/T1078/" + } + ] + } + ], + "id": "c00f6575-c2c6-44d3-addf-cae5acbc84f2", + "rule_id": "48819484-9826-4083-9eba-1da74cd0eaf2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "o365", + "version": "^1.3.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "event.outcome", + "type": "keyword", + "ecs": true + }, + { + "name": "event.provider", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", + "type": "new_terms", + "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:MailItemsAccessed and event.outcome:success\n", + "new_terms_fields": [ + "o365.audit.ClientAppId", + "user.id" + ], + "history_window_start": "now-10d", + "index": [ + "filebeat-*", + "logs-o365*" + ], + "language": "kuery" + }, + { + "name": "Remote XSL Script Execution via COM", + "description": "Identifies the execution of a hosted XSL script using the Microsoft.XMLDOM COM interface via Microsoft Office processes. This behavior may indicate adversarial activity to execute malicious JScript or VBScript on the system.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Initial Access", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1220", + "name": "XSL Script Processing", + "reference": "https://attack.mitre.org/techniques/T1220/" + } + ] + } + ], + "id": "0bfd73bc-d6a6-4851-9af1-2da06da8aeec", + "rule_id": "48f657ee-de4f-477c-aa99-ed88ee7af97a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=1m\n [library where host.os.type == \"windows\" and dll.name : \"msxml3.dll\" and\n process.name : (\"winword.exe\", \"excel.exe\", \"powerpnt.exe\", \"mspub.exe\")] by process.entity_id\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.parent.name : (\"winword.exe\", \"excel.exe\", \"powerpnt.exe\", \"mspub.exe\") and \n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWoW64\\\\WerFault.exe\",\n \"?:\\\\windows\\\\splwow64.exe\",\n \"?:\\\\Windows\\\\System32\\\\conhost.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*exe\")] by process.parent.entity_id\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Cross Site Scripting (XSS)", + "description": "Cross-Site Scripting (XSS) is a type of attack in which malicious scripts are injected into trusted websites. In XSS attacks, an attacker uses a benign web application to send malicious code, generally in the form of a browser-side script. This detection rule identifies the potential malicious executions of such browser-side scripts.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Data Source: APM", + "Use Case: Threat Detection", + "Tactic: Initial Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/payloadbox/xss-payload-list" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1189", + "name": "Drive-by Compromise", + "reference": "https://attack.mitre.org/techniques/T1189/" + } + ] + } + ], + "id": "61e61892-a796-4d66-8af2-674210ed63ad", + "rule_id": "4aa58ac6-4dc0-4d18-b713-f58bf8bd015c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "apm", + "version": "^8.0.0" + } + ], + "required_fields": [ + { + "name": "processor.name", + "type": "unknown", + "ecs": false + }, + { + "name": "url.fragment", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "any where processor.name == \"transaction\" and\nurl.fragment : (\"\", \"\", \"*onerror=*\", \"*javascript*alert*\", \"*eval*(*)*\", \"*onclick=*\",\n\"*alert(document.cookie)*\", \"*alert(document.domain)*\",\"*onresize=*\",\"*onload=*\",\"*onmouseover=*\")\n", + "language": "eql", + "index": [ + "apm-*-transaction*", + "traces-apm*" + ] + }, + { + "name": "ProxyChains Activity", + "description": "This rule monitors for the execution of the ProxyChains utility. ProxyChains is a command-line tool that enables the routing of network connections through intermediary proxies, enhancing anonymity and enabling access to restricted resources. Attackers can exploit the ProxyChains utility to hide their true source IP address, evade detection, and perform malicious activities through a chain of proxy servers, potentially masking their identity and intentions.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1572", + "name": "Protocol Tunneling", + "reference": "https://attack.mitre.org/techniques/T1572/" + } + ] + } + ], + "id": "ada39d3f-937a-495a-919a-95794d04c12d", + "rule_id": "4b868f1f-15ff-4ba3-8c11-d5a7a6356d37", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and process.name == \"proxychains\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual Process Writing Data to an External Device", + "description": "A machine learning job has detected a rare process writing data to an external device. Malicious actors often use benign-looking processes to mask their data exfiltration activities. The discovery of such a process that has no legitimate reason to write data to external devices can indicate exfiltration.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Data Exfiltration Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-2h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/ded" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1052", + "name": "Exfiltration Over Physical Medium", + "reference": "https://attack.mitre.org/techniques/T1052/" + } + ] + } + ], + "id": "9fa045a3-7c26-45d9-be0f-4b5cec44a418", + "rule_id": "4b95ecea-7225-4690-9938-2a2c0bad9c99", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "ded", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "ded_rare_process_writing_to_external_device" + }, + { + "name": "Hidden Files and Directories via Hidden Flag", + "description": "Identify activity related where adversaries can add the 'hidden' flag to files to hide them from the user in an attempt to evade detection.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1564", + "name": "Hide Artifacts", + "reference": "https://attack.mitre.org/techniques/T1564/", + "subtechnique": [ + { + "id": "T1564.001", + "name": "Hidden Files and Directories", + "reference": "https://attack.mitre.org/techniques/T1564/001/" + } + ] + } + ] + } + ], + "id": "0cb34fa1-f928-4903-a4c9-8ec4540a924a", + "rule_id": "5124e65f-df97-4471-8dcb-8e3953b3ea97", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where event.type : \"creation\" and process.name : \"chflags\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Execution via Microsoft DotNet ClickOnce Host", + "description": "Identifies the execution of DotNet ClickOnce installer via Dfsvc.exe trampoline. Adversaries may take advantage of ClickOnce to proxy execution of malicious payloads via trusted Microsoft processes.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/" + }, + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.011", + "name": "Rundll32", + "reference": "https://attack.mitre.org/techniques/T1218/011/" + } + ] + } + ] + } + ], + "id": "154dc351-e06c-442c-8720-7c399999a138", + "rule_id": "5297b7f1-bccd-4611-93fa-ea342a01ff84", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by user.id with maxspan=5s\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.name : \"rundll32.exe\" and process.command_line : (\"*dfshim*ShOpenVerbApplication*\", \"*dfshim*#*\")]\n [network where host.os.type == \"windows\" and process.name : \"dfsvc.exe\"]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Windows Installer with Suspicious Properties", + "description": "Identifies the execution of an installer from an archive or with suspicious properties. Adversaries may abuse msiexec.exe to launch local or network accessible MSI files in an attempt to bypass application whitelisting.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://lolbas-project.github.io/lolbas/Binaries/Msiexec/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.007", + "name": "Msiexec", + "reference": "https://attack.mitre.org/techniques/T1218/007/" + } + ] + } + ] + } + ], + "id": "c176a7cf-cfc7-493b-916a-a9f32401d6bd", + "rule_id": "55f07d1b-25bc-4a0f-aa0c-05323c1319d0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.value", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=1m\n [registry where host.os.type == \"windows\" and process.name : \"msiexec.exe\" and\n (\n (registry.value : \"InstallSource\" and\n registry.data.strings : (\"?:\\\\Users\\\\*\\\\Temp\\\\Temp?_*.zip\\\\*\",\n \"?:\\\\Users\\\\*\\\\*.7z\\\\*\",\n \"?:\\\\Users\\\\*\\\\*.rar\\\\*\")) or\n\n (registry.value : (\"DisplayName\", \"ProductName\") and registry.data.strings : \"SetupTest\")\n )]\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.parent.name : \"msiexec.exe\" and\n not process.name : \"msiexec.exe\" and\n not (process.executable : (\"?:\\\\Program Files (x86)\\\\*.exe\", \"?:\\\\Program Files\\\\*.exe\") and process.code_signature.trusted == true)]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual Process Spawned by a Host", + "description": "A machine learning job has detected a suspicious Windows process. This process has been classified as suspicious in two ways. It was predicted to be suspicious by the ProblemChild supervised ML model, and it was found to be an unusual process, on a host that does not commonly manifest malicious activity. Such a process may be an instance of suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Living off the Land Attack Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/problemchild", + "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "c4353ad1-b61e-4b91-b850-18b7efa02584", + "rule_id": "56004189-4e69-4a39-b4a9-195329d226e9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "problemchild", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "problem_child_rare_process_by_host" + }, + { + "name": "Linux Secret Dumping via GDB", + "description": "This rule monitors for potential memory dumping through gdb. Attackers may leverage memory dumping techniques to attempt secret extraction from privileged processes. Tools that display this behavior include \"truffleproc\" and \"bash-memory-dump\". This behavior should not happen by default, and should be investigated thoroughly.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/controlplaneio/truffleproc", + "https://github.com/hajzer/bash-memory-dump" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.007", + "name": "Proc Filesystem", + "reference": "https://attack.mitre.org/techniques/T1003/007/" + } + ] + } + ] + } + ], + "id": "7ff77712-2838-4dc6-aef1-9e373a1cf156", + "rule_id": "66c058f3-99f4-4d18-952b-43348f2577a0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"gdb\" and process.args in (\"--pid\", \"-p\") and \n/* Covered by d4ff2f53-c802-4d2e-9fb9-9ecc08356c3f */\nprocess.args != \"1\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Execution via MSIEXEC", + "description": "Identifies suspicious execution of the built-in Windows Installer, msiexec.exe, to install a package from usual paths or parent process. Adversaries may abuse msiexec.exe to launch malicious local MSI files.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://lolbas-project.github.io/lolbas/Binaries/Msiexec/", + "https://www.guardicore.com/labs/purple-fox-rootkit-now-propagates-as-a-worm/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.007", + "name": "Msiexec", + "reference": "https://attack.mitre.org/techniques/T1218/007/" + } + ] + } + ] + } + ], + "id": "1ccc8ebd-f38b-4c66-9147-afece7d8b082", + "rule_id": "708c9d92-22a3-4fe0-b6b9-1f861c55502d", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.parent.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.parent.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.working_directory", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.action == \"start\" and\n process.name : \"msiexec.exe\" and user.id : (\"S-1-5-21*\", \"S-1-12-*\") and process.parent.executable != null and\n (\n (process.args : \"/i\" and process.args : (\"/q\", \"/quiet\") and process.args_count == 4 and\n process.args : (\"?:\\\\Users\\\\*\", \"?:\\\\ProgramData\\\\*\") and\n not process.parent.executable : (\"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Windows\\\\explorer.exe\",\n \"?:\\\\Users\\\\*\\\\Desktop\\\\*\",\n \"?:\\\\Users\\\\*\\\\Downloads\\\\*\",\n \"?:\\\\programdata\\\\*\")) or\n\n (process.args_count == 1 and not process.parent.executable : (\"?:\\\\Windows\\\\explorer.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\explorer.exe\")) or\n\n (process.args : \"/i\" and process.args : (\"/q\", \"/quiet\") and process.args_count == 4 and\n (process.parent.args : \"Schedule\" or process.parent.name : \"wmiprvse.exe\" or\n process.parent.executable : \"?:\\\\Users\\\\*\\\\AppData\\\\*\" or\n (process.parent.name : (\"powershell.exe\", \"cmd.exe\") and length(process.parent.command_line) >= 200))) or\n\n (process.args : \"/i\" and process.args : (\"/q\", \"/quiet\") and process.args_count == 4 and\n process.working_directory : \"?:\\\\\" and process.parent.name : (\"cmd.exe\", \"powershell.exe\"))\n ) and\n\n /* noisy pattern */\n not (process.parent.executable : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\*\" and process.parent.args_count >= 2 and\n process.args : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\*\\\\*.msi\") and\n\n not process.args : (\"?:\\\\Program Files (x86)\\\\*\", \"?:\\\\Program Files\\\\*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual Discovery Signal Alert with Unusual Process Executable", + "description": "This rule leverages alert data from various Discovery building block rules to alert on signals with unusual unique host.id, user.id and process.executable entries.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: Higher-Order Rule" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [] + } + ], + "id": "c5afa337-009c-439c-ade3-ea3caaf498a8", + "rule_id": "72ed9140-fe9d-4a34-a026-75b50e484b17", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "kibana.alert.rule.rule_id", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type:windows and event.kind:signal and kibana.alert.rule.rule_id:\"1d72d014-e2ab-4707-b056-9b96abe7b511\"\n", + "new_terms_fields": [ + "host.id", + "user.id", + "process.executable" + ], + "history_window_start": "now-14d", + "index": [ + ".alerts-security.*" + ], + "language": "kuery" + }, + { + "name": "Service Disabled via Registry Modification", + "description": "Identifies attempts to modify services start settings using processes other than services.exe. Attackers may attempt to modify security and monitoring services to avoid detection or delay response.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "Impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1489", + "name": "Service Stop", + "reference": "https://attack.mitre.org/techniques/T1489/" + } + ] + } + ], + "id": "87adbb7a-a76a-47dd-897a-d4274e914bb0", + "rule_id": "75dcb176-a575-4e33-a020-4a52aaa1b593", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.data.strings", + "type": "wildcard", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\Start\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\Start\"\n ) and registry.data.strings : (\"3\", \"4\") and\n not \n (\n process.name : \"services.exe\" and user.id : \"S-1-5-18\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "File Compressed or Archived into Common Format", + "description": "Detects files being compressed or archived into common formats. This is a common technique used to obfuscate files to evade detection or to staging data for exfiltration.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Data Source: Elastic Defend", + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "OS: Windows", + "Tactic: Collection", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://en.wikipedia.org/wiki/List_of_file_signatures" + ], + "max_signals": 1000, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1560", + "name": "Archive Collected Data", + "reference": "https://attack.mitre.org/techniques/T1560/", + "subtechnique": [ + { + "id": "T1560.001", + "name": "Archive via Utility", + "reference": "https://attack.mitre.org/techniques/T1560/001/" + } + ] + }, + { + "id": "T1074", + "name": "Data Staged", + "reference": "https://attack.mitre.org/techniques/T1074/", + "subtechnique": [ + { + "id": "T1074.001", + "name": "Local Data Staging", + "reference": "https://attack.mitre.org/techniques/T1074/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1132", + "name": "Data Encoding", + "reference": "https://attack.mitre.org/techniques/T1132/", + "subtechnique": [ + { + "id": "T1132.001", + "name": "Standard Encoding", + "reference": "https://attack.mitre.org/techniques/T1132/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1027", + "name": "Obfuscated Files or Information", + "reference": "https://attack.mitre.org/techniques/T1027/" + } + ] + } + ], + "id": "776ebffc-ef68-4758-9308-46a80b05cfeb", + "rule_id": "79124edf-30a8-4d48-95c4-11522cad94b1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.header_bytes", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "file where event.type in (\"creation\", \"change\") and\n file.Ext.header_bytes : (\n /* compression formats */\n \"1F9D*\", /* tar zip, tar.z (Lempel-Ziv-Welch algorithm) */\n \"1FA0*\", /* tar zip, tar.z (LZH algorithm) */\n \"425A68*\", /* Bzip2 */\n \"524E4301*\", /* Rob Northen Compression */\n \"524E4302*\", /* Rob Northen Compression */\n \"4C5A4950*\", /* LZIP */\n \"504B0*\", /* ZIP */\n \"526172211A07*\", /* RAR compressed */\n \"44434D0150413330*\", /* Windows Update Binary Delta Compression file */\n \"50413330*\", /* Windows Update Binary Delta Compression file */\n \"377ABCAF271C*\", /* 7-Zip */\n \"1F8B*\", /* GZIP */\n \"FD377A585A00*\", /* XZ, tar.xz */\n \"7801*\",\t /* zlib: No Compression (no preset dictionary) */\n \"785E*\",\t /* zlib: Best speed (no preset dictionary) */\n \"789C*\",\t /* zlib: Default Compression (no preset dictionary) */\n \"78DA*\", \t /* zlib: Best Compression (no preset dictionary) */\n \"7820*\",\t /* zlib: No Compression (with preset dictionary) */\n \"787D*\",\t /* zlib: Best speed (with preset dictionary) */\n \"78BB*\",\t /* zlib: Default Compression (with preset dictionary) */\n \"78F9*\",\t /* zlib: Best Compression (with preset dictionary) */\n \"62767832*\", /* LZFSE */\n \"28B52FFD*\", /* Zstandard, zst */\n \"5253564B44415441*\", /* QuickZip rs compressed archive */\n \"2A2A4143452A2A*\", /* ACE */\n\n /* archive formats */\n \"2D686C302D*\", /* lzh */\n \"2D686C352D*\", /* lzh */\n \"303730373037*\", /* cpio */\n \"78617221*\", /* xar */\n \"4F4152*\", /* oar */\n \"49536328*\" /* cab archive */\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Troubleshooting Pack Cabinet Execution", + "description": "Identifies the execution of the Microsoft Diagnostic Wizard to open a diagcab file from a suspicious path and with an unusual parent process. This may indicate an attempt to execute malicious Troubleshooting Pack Cabinet files.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://irsl.medium.com/the-trouble-with-microsofts-troubleshooters-6e32fc80b8bd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "8207a41a-2c5e-4a35-9334-574a4fd61f6b", + "rule_id": "808291d3-e918-4a3a-86cd-73052a0c9bdc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.action == \"start\" and\n (process.name : \"msdt.exe\" or process.pe.original_file_name == \"msdt.exe\") and process.args : \"/cab\" and\n process.parent.name : (\n \"firefox.exe\", \"chrome.exe\", \"msedge.exe\", \"explorer.exe\", \"brave.exe\", \"whale.exe\", \"browser.exe\",\n \"dragon.exe\", \"vivaldi.exe\", \"opera.exe\", \"iexplore\", \"firefox.exe\", \"waterfox.exe\", \"iexplore.exe\",\n \"winrar.exe\", \"winrar.exe\", \"7zFM.exe\", \"outlook.exe\", \"winword.exe\", \"excel.exe\"\n ) and\n process.args : (\n \"?:\\\\Users\\\\*\",\n \"\\\\\\\\*\",\n \"http*\",\n \"ftp://*\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual Remote File Extension", + "description": "An anomaly detection job has detected a remote file transfer with a rare extension, which could indicate potential lateral movement activity on the host.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-90m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "f20564b4-906a-4dc5-9a36-033b9a4ab863", + "rule_id": "814d96c7-2068-42aa-ba8e-fe0ddd565e2e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_rare_file_extension_remote_transfer" + }, + { + "name": "Microsoft Exchange Transport Agent Install Script", + "description": "Identifies the use of Cmdlets and methods related to Microsoft Exchange Transport Agents install. Adversaries may leverage malicious Microsoft Exchange Transport Agents to execute tasks in response to adversary-defined criteria, establishing persistence.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "## Setup", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: PowerShell Logs", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1505", + "name": "Server Software Component", + "reference": "https://attack.mitre.org/techniques/T1505/", + "subtechnique": [ + { + "id": "T1505.002", + "name": "Transport Agent", + "reference": "https://attack.mitre.org/techniques/T1505/002/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "8196148f-93d1-49d7-be8e-0dd5d3db2d89", + "rule_id": "846fe13f-6772-4c83-bd39-9d16d4ad1a81", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\nSteps to implement the logging policy via registry:\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category: \"process\" and host.os.type:windows and\n powershell.file.script_block_text : (\n (\n \"Install-TransportAgent\" or\n \"Enable-TransportAgent\"\n )\n ) and not user.id : \"S-1-5-18\"\n", + "language": "kuery" + }, + { + "name": "Potential Upgrade of Non-interactive Shell", + "description": "Identifies when a non-interactive terminal (tty) is being upgraded to a fully interactive shell. Attackers may upgrade a simple reverse shell to a fully interactive tty after obtaining initial access to a host, in order to obtain a more stable connection.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.004", + "name": "Unix Shell", + "reference": "https://attack.mitre.org/techniques/T1059/004/" + } + ] + } + ] + } + ], + "id": "9f472eb3-77c0-4ee7-9242-9298ada321b1", + "rule_id": "84d1f8db-207f-45ab-a578-921d91c23eb2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args_count", + "type": "long", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and event.type == \"start\" and (\n (process.name == \"stty\" and process.args == \"raw\" and process.args == \"-echo\" and process.args_count >= 3) or\n (process.name == \"script\" and process.args in (\"-qc\", \"-c\") and process.args == \"/dev/null\" and \n process.args_count == 4)\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "File with Suspicious Extension Downloaded", + "description": "Identifies unusual files downloaded from outside the local network that have the potential to be abused for code execution.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://x.com/Laughing_Mantis/status/1518766501385318406", + "https://wikileaks.org/ciav7p1/cms/page_13763375.html" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + }, + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + } + ], + "id": "63e49e0e-cf58-4844-8a80-a3c341ae4f6c", + "rule_id": "8d366588-cbd6-43ba-95b4-0971c3f906e5", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.windows.zone_identifier", + "type": "unknown", + "ecs": false + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n file.extension : (\n \"appinstaller\", \"application\", \"appx\", \"appxbundle\", \"cpl\", \"diagcab\", \"diagpkg\", \"diagcfg\", \"manifest\",\n \"msix\", \"pif\", \"search-ms\", \"searchConnector-ms\", \"settingcontent-ms\", \"symlink\", \"theme\", \"themepack\" \n ) and file.Ext.windows.zone_identifier > 1 and\n not\n (\n file.extension : \"msix\" and file.path : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\WinGet\\\\Microsoft.Winget.Source*\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Outgoing RDP Connection by Unusual Process", + "description": "Adversaries may attempt to connect to a remote system over Windows Remote Desktop Protocol (RDP) to achieve lateral movement. Adversaries may avoid using the Microsoft Terminal Services Client (mstsc.exe) binary to establish an RDP connection to evade detection.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Lateral Movement", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1021", + "name": "Remote Services", + "reference": "https://attack.mitre.org/techniques/T1021/", + "subtechnique": [ + { + "id": "T1021.001", + "name": "Remote Desktop Protocol", + "reference": "https://attack.mitre.org/techniques/T1021/001/" + } + ] + } + ] + } + ], + "id": "5b397d1a-9a8c-4c7a-8bcd-47250f0af0e6", + "rule_id": "8e39f54e-910b-4adb-a87e-494fbba5fb65", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.ip", + "type": "ip", + "ecs": true + }, + { + "name": "destination.port", + "type": "long", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "network where host.os.type == \"windows\" and\n event.action == \"connection_attempted\" and destination.port == 3389 and\n not process.executable : \"?:\\\\Windows\\\\System32\\\\mstsc.exe\" and\n destination.ip != \"::1\" and destination.ip != \"127.0.0.1\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Bitsadmin Activity", + "description": "Windows Background Intelligent Transfer Service (BITS) is a low-bandwidth, asynchronous file transfer mechanism. Adversaries may abuse BITS to persist, download, execute, and even clean up after running malicious code.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Command and Control", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1197", + "name": "BITS Jobs", + "reference": "https://attack.mitre.org/techniques/T1197/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1197", + "name": "BITS Jobs", + "reference": "https://attack.mitre.org/techniques/T1197/" + } + ] + } + ], + "id": "da549e1e-fb7a-4196-9454-24264cf2f7a1", + "rule_id": "8eec4df1-4b4b-4502-b6c3-c788714604c9", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n (process.name : \"bitsadmin.exe\" and process.args : (\n \"*Transfer*\", \"*Create*\", \"AddFile\", \"*SetNotifyFlags*\", \"*SetNotifyCmdLine*\",\n \"*SetMinRetryDelay*\", \"*SetCustomHeaders*\", \"*Resume*\")\n ) or\n (process.name : \"powershell.exe\" and process.args : (\n \"*Start-BitsTransfer*\", \"*Add-BitsFile*\",\n \"*Resume-BitsTransfer*\", \"*Set-BitsTransfer*\", \"*BITS.Manager*\")\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "InstallUtil Activity", + "description": "InstallUtil is a command-line utility that allows for installation and uninstallation of resources by executing specific installer components specified in .NET binaries. Adversaries may use InstallUtil to proxy the execution of code through a trusted Windows utility.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.004", + "name": "InstallUtil", + "reference": "https://attack.mitre.org/techniques/T1218/004/" + } + ] + } + ] + } + ], + "id": "7ffa53fa-f00d-40db-b84b-ab7884e3f438", + "rule_id": "90babaa8-5216-4568-992d-d4a01a105d98", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"installutil.exe\" and not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Creation of Kernel Module", + "description": "Identifies activity related to loading kernel modules on Linux via creation of new ko files in the LKM directory.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.006", + "name": "Kernel Modules and Extensions", + "reference": "https://attack.mitre.org/techniques/T1547/006/" + } + ] + } + ] + } + ], + "id": "961a760e-1529-4906-9e26-92f7301594b1", + "rule_id": "947827c6-9ed6-4dec-903e-c856c86e72f3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where event.type in (\"change\", \"creation\") and host.os.type == \"linux\" and\nfile.path : \"/lib/modules/*\" and file.name : \"*.ko\"\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "Indirect Command Execution via Forfiles/Pcalua", + "description": "Identifies indirect command execution via Program Compatibility Assistant (pcalua.exe) or forfiles.exe.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1202", + "name": "Indirect Command Execution", + "reference": "https://attack.mitre.org/techniques/T1202/" + } + ] + } + ], + "id": "0a528122-7f9e-4bcc-b66d-e8d22cc89866", + "rule_id": "98843d35-645e-4e66-9d6a-5049acd96ce1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"pcalua.exe\", \"forfiles.exe\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Machine Learning Detected a Suspicious Windows Event with a High Malicious Probability Score", + "description": "A supervised machine learning model (ProblemChild) has identified a suspicious Windows process event with high probability of it being malicious activity. Alternatively, the model's blocklist identified the event as being malicious.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "OS: Windows", + "Data Source: Elastic Endgame", + "Use Case: Living off the Land Attack Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-10m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/problemchild", + "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.004", + "name": "Masquerade Task or Service", + "reference": "https://attack.mitre.org/techniques/T1036/004/" + } + ] + } + ] + } + ], + "id": "afdb8333-977b-4c3b-847c-96fae1c39fd9", + "rule_id": "994e40aa-8c85-43de-825e-15f665375ee8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "problemchild", + "version": "^2.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "blocklist_label", + "type": "unknown", + "ecs": false + }, + { + "name": "problemchild.prediction", + "type": "unknown", + "ecs": false + }, + { + "name": "problemchild.prediction_probability", + "type": "unknown", + "ecs": false + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + } + ], + "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "eql", + "query": "process where ((problemchild.prediction == 1 and problemchild.prediction_probability > 0.98) or\nblocklist_label == 1) and not process.args : (\"*C:\\\\WINDOWS\\\\temp\\\\nessus_*.txt*\", \"*C:\\\\WINDOWS\\\\temp\\\\nessus_*.tmp*\")\n", + "language": "eql", + "index": [ + "endgame-*", + "logs-endpoint.events.process-*", + "winlogbeat-*" + ] + }, + { + "name": "Unsigned BITS Service Client Process", + "description": "Identifies an unsigned Windows Background Intelligent Transfer Service (BITS) client process. Attackers may abuse BITS functionality to download or upload data using the BITS service.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://web.archive.org/web/20230531215706/https://blog.menasec.net/2021/05/hunting-for-suspicious-usage-of.html", + "https://www.elastic.co/blog/hunting-for-persistence-using-elastic-security-part-2" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1197", + "name": "BITS Jobs", + "reference": "https://attack.mitre.org/techniques/T1197/" + }, + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + } + ] + } + ] + } + ], + "id": "605a4b26-6364-48d0-9000-d47875fb993b", + "rule_id": "9a3884d0-282d-45ea-86ce-b9c81100f026", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "library where dll.name : \"Bitsproxy.dll\" and process.executable != null and\nnot process.code_signature.trusted == true\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "GitHub Owner Role Granted To User", + "description": "This rule detects when a member is granted the organization owner role of a GitHub organization. This role provides admin level privileges. Any new owner role should be investigated to determine its validity. Unauthorized owner roles could indicate compromise within your organization and provide unlimited access to data and settings.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Cloud", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Github" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1098", + "name": "Account Manipulation", + "reference": "https://attack.mitre.org/techniques/T1098/", + "subtechnique": [ + { + "id": "T1098.003", + "name": "Additional Cloud Roles", + "reference": "https://attack.mitre.org/techniques/T1098/003/" + } + ] + } + ] + } + ], + "id": "6b084809-9c1d-42d2-8f59-f00210939ed6", + "rule_id": "9b343b62-d173-4cfd-bd8b-e6379f964ca4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "github", + "version": "^1.0.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.dataset", + "type": "keyword", + "ecs": true + }, + { + "name": "github.permission", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "eql", + "query": "iam where event.dataset == \"github.audit\" and event.action == \"org.update_member\" and github.permission == \"admin\"\n", + "language": "eql", + "index": [ + "logs-github.audit-*" + ] + }, + { + "name": "Potential Privilege Escalation via Python cap_setuid", + "description": "This detection rule monitors for the execution of a system command with setuid or setgid capabilities via Python, followed by a uid or gid change to the root user. This sequence of events may indicate successful privilege escalation. Setuid (Set User ID) and setgid (Set Group ID) are Unix-like OS features that enable processes to run with elevated privileges, based on the file owner or group. Threat actors can exploit these attributes to escalate privileges to the privileges that are set on the binary that is being executed.", + "risk_score": 47, + "severity": "medium", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1068", + "name": "Exploitation for Privilege Escalation", + "reference": "https://attack.mitre.org/techniques/T1068/" + }, + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.001", + "name": "Setuid and Setgid", + "reference": "https://attack.mitre.org/techniques/T1548/001/" + } + ] + } + ] + } + ], + "id": "434623e1-a5e6-41a3-b075-47a1105044af", + "rule_id": "a0ddb77b-0318-41f0-91e4-8c1b5528834f", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "group.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.args : \"import os;os.set?id(0);os.system(*)\" and process.args : \"*python*\" and user.id != \"0\"]\n [process where host.os.type == \"linux\" and event.action in (\"uid_change\", \"gid_change\") and event.type == \"change\" and \n (user.id == \"0\" or group.id == \"0\")]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "High Mean of RDP Session Duration", + "description": "A machine learning job has detected unusually high mean of RDP session duration. Long RDP sessions can be used to evade detection mechanisms via session persistence, and might be used to perform tasks such as lateral movement, that might require uninterrupted access to a compromised machine.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-12h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "915a2906-e431-4fb2-8d23-e471fc13dcb4", + "rule_id": "a74c60cb-70ee-4629-a127-608ead14ebf1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_high_mean_rdp_session_duration" + }, + { + "name": "Potential Malicious File Downloaded from Google Drive", + "description": "Identifies potential malicious file download and execution from Google Drive. The rule checks for download activity from Google Drive URL, followed by the creation of files commonly leveraged by or for malware. This could indicate an attempt to run malicious scripts, executables or payloads.", + "risk_score": 73, + "severity": "high", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: Windows", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Command and Control" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [ + "Approved third-party applications that use Google Drive download URLs.", + "Legitimate publicly shared files from Google Drive." + ], + "references": [ + "https://intelligence.abnormalsecurity.com/blog/google-drive-matanbuchus-malware" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1105", + "name": "Ingress Tool Transfer", + "reference": "https://attack.mitre.org/techniques/T1105/" + } + ] + } + ], + "id": "9eaccf00-6a06-40e4-87c2-8283439ca7aa", + "rule_id": "a8afdce2-0ec1-11ee-b843-f661ea17fbcd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "destination.as.organization.name", + "type": "keyword", + "ecs": true + }, + { + "name": "dns.question.name", + "type": "keyword", + "ecs": true + }, + { + "name": "dns.question.type", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by host.id, process.entity_id with maxspan=30s\n[any where\n\n /* Look for processes started or libraries loaded from untrusted or unsigned Windows, Linux or macOS binaries */\n (event.action in (\"exec\", \"fork\", \"start\", \"load\")) or\n\n /* Look for Google Drive download URL with AV flag skipping */\n (process.args : \"*drive.google.com*\" and process.args : \"*export=download*\" and process.args : \"*confirm=no_antivirus*\")\n]\n\n[network where\n /* Look for DNS requests for Google Drive */\n (dns.question.name : \"drive.google.com\" and dns.question.type : \"A\") or\n\n /* Look for connection attempts to address that resolves to Google */\n (destination.as.organization.name : \"GOOGLE\" and event.action == \"connection_attempted\")\n\n /* NOTE: Add LoLBins if tuning is required\n process.name : (\n \"cmd.exe\", \"bitsadmin.exe\", \"certutil.exe\", \"esentutl.exe\", \"wmic.exe\", \"PowerShell.exe\",\n \"homedrive.exe\",\"regsvr32.exe\", \"mshta.exe\", \"rundll32.exe\", \"cscript.exe\", \"wscript.exe\",\n \"curl\", \"wget\", \"scp\", \"ftp\", \"python\", \"perl\", \"ruby\"))] */\n]\n\n/* Identify the creation of files following Google Drive connection with extensions commonly used for executables or libraries */\n[file where event.action == \"creation\" and file.extension : (\n \"exe\", \"dll\", \"scr\", \"jar\", \"pif\", \"app\", \"dmg\", \"pkg\", \"elf\", \"so\", \"bin\", \"deb\", \"rpm\",\"sh\",\"hta\",\"lnk\"\n )\n]\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint*" + ] + }, + { + "name": "High Variance in RDP Session Duration", + "description": "A machine learning job has detected unusually high variance of RDP session duration. Long RDP sessions can be used to evade detection mechanisms via session persistence, and might be used to perform tasks such as lateral movement, that might require uninterrupted access to a compromised machine.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-12h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "a4e7770c-624b-408b-aae9-27ebbe899ea3", + "rule_id": "a8d35ca0-ad8d-48a9-9f6c-553622dca61a", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_high_var_rdp_session_duration" + }, + { + "name": "Netsh Helper DLL", + "description": "Identifies the addition of a Netsh Helper DLL, netsh.exe supports the addition of these DLLs to extend its functionality. Attackers may abuse this mechanism to execute malicious payloads every time the utility is executed, which can be done by administrators or a scheduled task.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.007", + "name": "Netsh Helper DLL", + "reference": "https://attack.mitre.org/techniques/T1546/007/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + } + ], + "id": "7900e16c-a55e-440e-812c-bcc9b456a1eb", + "rule_id": "b0638186-4f12-48ac-83d2-47e686d08e82", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\Software\\\\Microsoft\\\\netsh\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\netsh\\\\*\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Discovery of Domain Groups", + "description": "Identifies the execution of Linux built-in commands related to account or group enumeration. Adversaries may use account and group information to orient themselves before deciding how to act.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [ + { + "id": "T1069", + "name": "Permission Groups Discovery", + "reference": "https://attack.mitre.org/techniques/T1069/" + } + ] + } + ], + "id": "5a92e362-ba56-45b9-80fc-5690051de0f2", + "rule_id": "b92d5eae-70bb-4b66-be27-f98ba9d0ccdc", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type : (\"start\", \"process_started\") and host.os.type == \"linux\" and\n ( process.name : (\"ldapsearch\", \"dscacheutil\") or\n (process.name : \"dscl\" and process.args : \"*-list*\")\n )\n", + "language": "eql", + "index": [ + "auditbeat-*", + "logs-endpoint.events.*" + ] + }, + { + "name": "File and Directory Permissions Modification", + "description": "Identifies the change of permissions/ownership of files/folders through built-in Windows utilities. Threat actors may require permission modification of files/folders to change, modify or delete them.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1222", + "name": "File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/", + "subtechnique": [ + { + "id": "T1222.001", + "name": "Windows File and Directory Permissions Modification", + "reference": "https://attack.mitre.org/techniques/T1222/001/" + } + ] + } + ] + } + ], + "id": "9e547a8d-cecb-4940-97d1-ba4ef539d611", + "rule_id": "bc9e4f5a-e263-4213-a2ac-1edf9b417ada", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and host.os.type == \"windows\" and\n(\n ((process.name: \"icacls.exe\" or process.pe.original_file_name == \"iCACLS.EXE\") and process.args: (\"*:F\", \"/reset\", \"/setowner\", \"*grant*\")) or\n ((process.name: \"cacls.exe\" or process.pe.original_file_name == \"CACLS.EXE\") and process.args: (\"/g\", \"*:f\")) or\n ((process.name: \"takeown.exe\" or process.pe.original_file_name == \"takeown.exe\") and process.args: (\"/F\")) or\n ((process.name: \"attrib.exe\" or process.pe.original_file_name== \"ATTRIB.EXE\") and process.args: \"-r\")\n) and not user.id : \"S-1-5-18\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Machine Learning Detected DGA activity using a known SUNBURST DNS domain", + "description": "A supervised machine learning model has identified a DNS question name that used by the SUNBURST malware and is predicted to be the result of a Domain Generation Algorithm.", + "risk_score": 99, + "severity": "critical", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Domain: Network", + "Domain: Endpoint", + "Data Source: Elastic Defend", + "Use Case: Domain Generation Algorithm Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Command and Control" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-10m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/dga" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1568", + "name": "Dynamic Resolution", + "reference": "https://attack.mitre.org/techniques/T1568/", + "subtechnique": [ + { + "id": "T1568.002", + "name": "Domain Generation Algorithms", + "reference": "https://attack.mitre.org/techniques/T1568/002/" + } + ] + } + ] + } + ], + "id": "e3064b33-060a-4d56-8d25-7cb35395630e", + "rule_id": "bcaa15ce-2d41-44d7-a322-918f9db77766", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "dga", + "version": "^2.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "dns.question.registered_domain", + "type": "keyword", + "ecs": true + }, + { + "name": "ml_is_dga.malicious_prediction", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Domain Generation Algorithm (DGA) integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "query", + "index": [ + "logs-endpoint.events.*", + "logs-network_traffic.*" + ], + "query": "ml_is_dga.malicious_prediction:1 and dns.question.registered_domain:avsvmcloud.com\n", + "language": "kuery" + }, + { + "name": "Potential Defense Evasion via CMSTP.exe", + "description": "The Microsoft Connection Manager Profile Installer (CMSTP.exe) is a command-line program to install Connection Manager service profiles, which accept installation information file (INF) files. Adversaries may abuse CMSTP to proxy the execution of malicious code by supplying INF files that contain malicious commands.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://attack.mitre.org/techniques/T1218/003/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.003", + "name": "CMSTP", + "reference": "https://attack.mitre.org/techniques/T1218/003/" + } + ] + } + ] + } + ], + "id": "1986d4cc-047c-4646-b85a-ce33e3c0b918", + "rule_id": "bd3d058d-5405-4cee-b890-337f09366ba2", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"cmstp.exe\" and process.args == \"/s\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Windows Process Cluster Spawned by a Host", + "description": "A machine learning job combination has detected a set of one or more suspicious Windows processes with unusually high scores for malicious probability. These process(es) have been classified as malicious in several ways. The process(es) were predicted to be malicious by the ProblemChild supervised ML model. If the anomaly contains a cluster of suspicious processes, each process has the same host name, and the aggregate score of the event cluster was calculated to be unusually high by an unsupervised ML model. Such a cluster often contains suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Living off the Land Attack Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/problemchild", + "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + } + ], + "id": "64540d13-8ae3-4c5b-aa1d-0d1913ceebf0", + "rule_id": "bdfebe11-e169-42e3-b344-c5d2015533d3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "problemchild", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "problem_child_high_sum_by_host" + }, + { + "name": "Unusual Remote File Directory", + "description": "An anomaly detection job has detected a remote file transfer on an unusual directory indicating a potential lateral movement activity on the host. Many Security solutions monitor well-known directories for suspicious activities, so attackers might use less common directories to bypass monitoring.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-90m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "36f85ab8-5b94-47d5-b27a-8f47398e5d31", + "rule_id": "be4c5aed-90f5-4221-8bd5-7ab3a4334751", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_rare_file_path_remote_transfer" + }, + { + "name": "Potential Data Exfiltration Activity to an Unusual Region", + "description": "A machine learning job has detected data exfiltration to a particular geo-location (by region name). Data transfers to geo-locations that are outside the normal traffic patterns of an organization could indicate exfiltration over command and control channels.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Data Exfiltration Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-6h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/ded" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1041", + "name": "Exfiltration Over C2 Channel", + "reference": "https://attack.mitre.org/techniques/T1041/" + } + ] + } + ], + "id": "22ed8d49-c712-4e49-bfbc-3eeca1845d7b", + "rule_id": "bfba5158-1fd6-4937-a205-77d96213b341", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "ded", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "ded_high_sent_bytes_destination_region_name" + }, + { + "name": "Memory Dump File with Unusual Extension", + "description": "Identifies the creation of a memory dump file with an unusual extension, which can indicate an attempt to disguise a memory dump as another file type to bypass security defenses.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.008", + "name": "Masquerade File Type", + "reference": "https://attack.mitre.org/techniques/T1036/008/" + } + ] + } + ] + } + ], + "id": "9a4b53fa-1712-44bd-b137-0ab493947180", + "rule_id": "c0b9dc99-c696-4779-b086-0d37dc2b3778", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.header_bytes", + "type": "unknown", + "ecs": false + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n\n /* MDMP header */\n file.Ext.header_bytes : \"4d444d50*\" and\n not file.extension : (\"dmp\", \"mdmp\", \"hdmp\", \"edmp\", \"full\", \"tdref\", \"cg\", \"tmp\", \"dat\") and\n not \n (\n process.executable : \"?:\\\\Program Files\\\\Endgame\\\\esensor.exe\" and\n process.code_signature.trusted == true and length(file.extension) == 0\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Attempted Private Key Access", + "description": "Attackers may try to access private keys, e.g. ssh, in order to gain further authenticated access to the environment.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.004", + "name": "Private Keys", + "reference": "https://attack.mitre.org/techniques/T1552/004/" + } + ] + } + ] + } + ], + "id": "15808ca8-19ec-4bb8-ad35-d0c8ba4e95fe", + "rule_id": "c55badd3-3e61-4292-836f-56209dc8a601", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.args : (\"*.pem*\", \"*.id_rsa*\") and\n not process.executable : (\n \"?:\\\\ProgramData\\\\Logishrd\\\\LogiOptions\\\\Software\\\\*\\\\LogiLuUpdater.exe\",\n \"?:\\\\Program Files\\\\Logi\\\\LogiBolt\\\\LogiBoltUpdater.exe\",\n \"?:\\\\Windows\\\\system32\\\\icacls.exe\",\n \"?:\\\\Program Files\\\\Splunk\\\\bin\\\\openssl.exe\",\n \"?:\\\\Program Files\\\\Elastic\\\\Agent\\\\data\\\\*\\\\components\\\\osqueryd.exe\",\n \"?:\\\\Windows\\\\System32\\\\OpenSSH\\\\*\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Service Path Modification via sc.exe", + "description": "Identifies attempts to modify a service path setting using sc.exe. Attackers may attempt to modify existing services for persistence or privilege escalation.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + } + ], + "id": "30a15bcf-0ac6-4101-843e-5fc4a420dbc4", + "rule_id": "c5677997-f75b-4cda-b830-a75920514096", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type == \"start\" and\n process.name : \"sc.exe\" and process.args : \"*binPath*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Potential Data Exfiltration Activity to an Unusual IP Address", + "description": "A machine learning job has detected data exfiltration to a particular geo-location (by IP address). Data transfers to geo-locations that are outside the normal traffic patterns of an organization could indicate exfiltration over command and control channels.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Data Exfiltration Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-6h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/ded" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1041", + "name": "Exfiltration Over C2 Channel", + "reference": "https://attack.mitre.org/techniques/T1041/" + } + ] + } + ], + "id": "de813576-c028-44e3-8db7-a5915e94901b", + "rule_id": "cc653d77-ddd2-45b1-9197-c75ad19df66c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "ded", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "ded_high_sent_bytes_destination_ip" + }, + { + "name": "Downloaded URL Files", + "description": "Identifies .url shortcut files downloaded from outside the local network. These shortcut files are commonly used in phishing campaigns.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1204", + "name": "User Execution", + "reference": "https://attack.mitre.org/techniques/T1204/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "technique": [ + { + "id": "T1566", + "name": "Phishing", + "reference": "https://attack.mitre.org/techniques/T1566/", + "subtechnique": [ + { + "id": "T1566.001", + "name": "Spearphishing Attachment", + "reference": "https://attack.mitre.org/techniques/T1566/001/" + }, + { + "id": "T1566.002", + "name": "Spearphishing Link", + "reference": "https://attack.mitre.org/techniques/T1566/002/" + } + ] + } + ] + } + ], + "id": "9df50635-1d58-4f5d-9766-ac45c4278e19", + "rule_id": "cd82e3d6-1346-4afd-8f22-38388bbf34cb", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.windows.zone_identifier", + "type": "unknown", + "ecs": false + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and file.extension == \"url\"\n and file.Ext.windows.zone_identifier > 1 and not process.name : \"explorer.exe\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Unusual Discovery Activity by User", + "description": "This rule leverages alert data from various Discovery building block rules to alert on signals with unusual unique host.id and user.id entries.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Discovery", + "Rule Type: Higher-Order Rule" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "technique": [] + } + ], + "id": "6d042959-8cee-457b-8110-fa2a7c92909c", + "rule_id": "cf575427-0839-4c69-a9e6-99fde02606f3", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [], + "required_fields": [ + { + "name": "event.kind", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "kibana.alert.rule.rule_id", + "type": "unknown", + "ecs": false + } + ], + "setup": "", + "type": "new_terms", + "query": "host.os.type:windows and event.kind:signal and kibana.alert.rule.rule_id:(\n \"d68e95ad-1c82-4074-a12a-125fe10ac8ba\" or \"7b8bfc26-81d2-435e-965c-d722ee397ef1\" or\n \"0635c542-1b96-4335-9b47-126582d2c19a\" or \"6ea55c81-e2ba-42f2-a134-bccf857ba922\" or\n \"e0881d20-54ac-457f-8733-fe0bc5d44c55\" or \"06568a02-af29-4f20-929c-f3af281e41aa\" or\n \"c4e9ed3e-55a2-4309-a012-bc3c78dad10a\" or \"51176ed2-2d90-49f2-9f3d-17196428b169\" or\n \"1d72d014-e2ab-4707-b056-9b96abe7b511\"\n)\n", + "new_terms_fields": [ + "host.id", + "user.id" + ], + "history_window_start": "now-14d", + "index": [ + ".alerts-security.*" + ], + "language": "kuery" + }, + { + "name": "Trap Signals Execution", + "description": "Identify activity related where adversaries can include a trap command which then allows programs and shells to specify commands that will be executed upon receiving interrupt signals.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "OS: macOS", + "Use Case: Threat Detection", + "Tactic: Privilege Escalation", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1546", + "name": "Event Triggered Execution", + "reference": "https://attack.mitre.org/techniques/T1546/", + "subtechnique": [ + { + "id": "T1546.005", + "name": "Trap", + "reference": "https://attack.mitre.org/techniques/T1546/005/" + } + ] + } + ] + } + ], + "id": "5dcd52d7-66b5-4841-a7e9-da9265ae9e81", + "rule_id": "cf6995ec-32a9-4b2d-9340-f8e61acf3f4e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.type : (\"start\", \"process_started\") and process.name : \"trap\" and process.args : \"SIG*\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Archive File with Unusual Extension", + "description": "Identifies the creation of an archive file with an unusual extension. Attackers may attempt to evade detection by masquerading files using the file extension values used by image, audio, or document file types.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.008", + "name": "Masquerade File Type", + "reference": "https://attack.mitre.org/techniques/T1036/008/" + } + ] + } + ] + } + ], + "id": "ec2710fa-6c4f-4065-b9ab-98bb12e783d8", + "rule_id": "cffbaf47-9391-4e09-a83c-1f27d7474826", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.header_bytes", + "type": "unknown", + "ecs": false + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.action != \"deletion\" and\n\n /* common archive file headers - Rar, 7z, GZIP, MSCF, XZ, ZIP */\n file.Ext.header_bytes : (\"52617221*\", \"377ABCAF271C*\", \"1F8B*\", \"4d534346*\", \"FD377A585A00*\", \"504B0304*\", \"504B0708*\") and\n\n (\n /* common image file extensions */\n file.extension : (\"jpg\", \"jpeg\", \"emf\", \"tiff\", \"gif\", \"png\", \"bmp\", \"ico\", \"fpx\", \"eps\", \"inf\") or\n\n /* common audio and video file extensions */\n file.extension : (\"mp3\", \"wav\", \"avi\", \"mpeg\", \"flv\", \"wma\", \"wmv\", \"mov\", \"mp4\", \"3gp\") or\n\n /* common document file extensions */\n (file.extension : (\"doc\", \"docx\", \"rtf\", \"ppt\", \"pptx\", \"xls\", \"xlsx\") and\n\n /* exclude ZIP file header values for OPENXML documents */\n not file.Ext.header_bytes : (\"504B0304*\", \"504B0708*\"))\n ) and\n\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\w3wp.exe\" and file.path : \"?:\\\\inetpub\\\\temp\\\\IIS Temporary Compressed Files\\\\*\")\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "AWS Credentials Searched For Inside A Container", + "description": "This rule detects the use of system search utilities like grep and find to search for AWS credentials inside a container. Unauthorized access to these sensitive files could lead to further compromise of the container environment or facilitate a container breakout to the underlying cloud environment.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Data Source: Elastic Defend for Containers", + "Domain: Container", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Credential Access" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-6m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://sysdig.com/blog/threat-detection-aws-cloud-containers/" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1552", + "name": "Unsecured Credentials", + "reference": "https://attack.mitre.org/techniques/T1552/", + "subtechnique": [ + { + "id": "T1552.001", + "name": "Credentials In Files", + "reference": "https://attack.mitre.org/techniques/T1552/001/" + } + ] + } + ] + } + ], + "id": "c55cafd5-673d-405d-be14-6a1e01d0128f", + "rule_id": "d0b0f3ed-0b37-44bf-adee-e8cb7de92767", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "cloud_defend", + "version": "^1.0.5" + } + ], + "required_fields": [ + { + "name": "event.module", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where event.module == \"cloud_defend\" and \n event.type == \"start\" and\n \n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/\n(process.name : (\"grep\", \"egrep\", \"fgrep\", \"find\", \"locate\", \"mlocate\") or process.args : (\"grep\", \"egrep\", \"fgrep\", \"find\", \"locate\", \"mlocate\")) and \nprocess.args : (\"*aws_access_key_id*\", \"*aws_secret_access_key*\", \"*aws_session_token*\", \"*accesskeyid*\", \"*secretaccesskey*\", \"*access_key*\", \"*.aws/credentials*\")\n", + "language": "eql", + "index": [ + "logs-cloud_defend*" + ] + }, + { + "name": "WMI WBEMTEST Utility Execution", + "description": "Adversaries may abuse the WMI diagnostic tool, wbemtest.exe, to enumerate WMI object instances or invoke methods against local or remote endpoints.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1047", + "name": "Windows Management Instrumentation", + "reference": "https://attack.mitre.org/techniques/T1047/" + } + ] + } + ], + "id": "7b27db74-10bf-4616-bf8d-bd48354df628", + "rule_id": "d3551433-782f-4e22-bbea-c816af2d41c6", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"wbemtest.exe\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Machine Learning Detected a DNS Request With a High DGA Probability Score", + "description": "A supervised machine learning model has identified a DNS question name with a high probability of sourcing from a Domain Generation Algorithm (DGA), which could indicate command and control network activity.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Domain: Network", + "Domain: Endpoint", + "Data Source: Elastic Defend", + "Use Case: Domain Generation Algorithm Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Command and Control" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-10m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/dga" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1568", + "name": "Dynamic Resolution", + "reference": "https://attack.mitre.org/techniques/T1568/", + "subtechnique": [ + { + "id": "T1568.002", + "name": "Domain Generation Algorithms", + "reference": "https://attack.mitre.org/techniques/T1568/002/" + } + ] + } + ] + } + ], + "id": "de3d8273-cec6-4904-95c1-3a25dcd820bd", + "rule_id": "da7f5803-1cd4-42fd-a890-0173ae80ac69", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "dga", + "version": "^2.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "ml_is_dga.malicious_probability", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Domain Generation Algorithm (DGA) integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "query", + "index": [ + "logs-endpoint.events.*", + "logs-network_traffic.*" + ], + "query": "ml_is_dga.malicious_probability > 0.98\n", + "language": "kuery" + }, + { + "name": "Delayed Execution via Ping", + "description": "Identifies the execution of commonly abused Windows utilities via a delayed Ping execution. This behavior is often observed during malware installation and is consistent with an attacker attempting to evade detection.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Execution", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.005", + "name": "Visual Basic", + "reference": "https://attack.mitre.org/techniques/T1059/005/" + }, + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1497", + "name": "Virtualization/Sandbox Evasion", + "reference": "https://attack.mitre.org/techniques/T1497/", + "subtechnique": [ + { + "id": "T1497.003", + "name": "Time Based Evasion", + "reference": "https://attack.mitre.org/techniques/T1497/003/" + } + ] + }, + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/", + "subtechnique": [ + { + "id": "T1218.003", + "name": "CMSTP", + "reference": "https://attack.mitre.org/techniques/T1218/003/" + }, + { + "id": "T1218.004", + "name": "InstallUtil", + "reference": "https://attack.mitre.org/techniques/T1218/004/" + }, + { + "id": "T1218.005", + "name": "Mshta", + "reference": "https://attack.mitre.org/techniques/T1218/005/" + }, + { + "id": "T1218.009", + "name": "Regsvcs/Regasm", + "reference": "https://attack.mitre.org/techniques/T1218/009/" + }, + { + "id": "T1218.010", + "name": "Regsvr32", + "reference": "https://attack.mitre.org/techniques/T1218/010/" + }, + { + "id": "T1218.011", + "name": "Rundll32", + "reference": "https://attack.mitre.org/techniques/T1218/011/" + } + ] + }, + { + "id": "T1216", + "name": "System Script Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1216/" + }, + { + "id": "T1220", + "name": "XSL Script Processing", + "reference": "https://attack.mitre.org/techniques/T1220/" + } + ] + } + ], + "id": "f35c4305-39fc-465b-8a0c-fb1b981d1951", + "rule_id": "e00b8d49-632f-4dc6-94a5-76153a481915", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pe.original_file_name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.working_directory", + "type": "keyword", + "ecs": true + }, + { + "name": "user.id", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence by process.parent.entity_id with maxspan=1m\n [process where host.os.type == \"windows\" and event.action == \"start\" and process.name : \"ping.exe\" and\n process.args : \"-n\" and process.parent.name : \"cmd.exe\" and not user.id : \"S-1-5-18\"]\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.parent.name : \"cmd.exe\" and\n (\n process.name : (\n \"rundll32.exe\", \"powershell.exe\",\n \"mshta.exe\", \"msbuild.exe\",\n \"certutil.exe\", \"regsvr32.exe\",\n \"powershell.exe\", \"cscript.exe\",\n \"wscript.exe\", \"wmic.exe\",\n \"installutil.exe\", \"msxsl.exe\",\n \"Microsoft.Workflow.Compiler.exe\",\n \"ieexec.exe\", \"iexpress.exe\",\n \"RegAsm.exe\", \"installutil.exe\",\n \"RegSvcs.exe\", \"RegAsm.exe\"\n ) or\n (process.executable : \"?:\\\\Users\\\\*\\\\AppData\\\\*.exe\" and not process.code_signature.trusted == true)\n ) and\n\n not process.args : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\") and\n not (process.name : (\"openssl.exe\", \"httpcfg.exe\", \"certutil.exe\") and process.parent.command_line : \"*ScreenConnectConfigurator.cmd*\") and\n not (process.pe.original_file_name : \"DPInst.exe\" and process.command_line : \"driver\\\\DPInst_x64 /f \") and\n not (process.name : \"powershell.exe\" and process.args : \"Write-Host ======*\") and\n not (process.name : \"wscript.exe\" and process.args : \"launchquiet_args.vbs\" and process.parent.args : \"?:\\\\Windows\\\\TempInst\\\\7z*\") and\n not (process.name : \"regsvr32.exe\" and process.args : (\"?:\\\\windows\\\\syswow64\\\\msxml?.dll\", \"msxml?.dll\", \"?:\\\\Windows\\\\SysWOW64\\\\mschrt20.ocx\")) and \n not (process.name : \"wscript.exe\" and\n process.working_directory :\n (\"?:\\\\Windows\\\\TempInst\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\BackupBootstrapper\\\\Logs\\\\\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\QBTools\\\\\"))\n ]\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potentially Suspicious Process Started via tmux or screen", + "description": "This rule monitors for the execution of suspicious commands via screen and tmux. When launching a command and detaching directly, the commands will be executed in the background via its parent process. Attackers may leverage screen or tmux to execute commands while attempting to evade detection.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1218", + "name": "System Binary Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1218/" + } + ] + } + ], + "id": "796fa4bb-6d75-4f27-b6ce-58bfa4205ec9", + "rule_id": "e0cc3807-e108-483c-bf66-5a4fbe0d7e89", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.parent.name in (\"screen\", \"tmux\") and process.name : (\n \"nmap\", \"nc\", \"ncat\", \"netcat\", \"socat\", \"nc.openbsd\", \"ngrok\", \"ping\", \"java\", \"python*\", \"php*\", \"perl\", \"ruby\",\n \"lua*\", \"openssl\", \"telnet\", \"awk\", \"wget\", \"curl\", \"whoami\", \"id\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential Data Exfiltration Activity to an Unusual ISO Code", + "description": "A machine learning job has detected data exfiltration to a particular geo-location (by region name). Data transfers to geo-locations that are outside the normal traffic patterns of an organization could indicate exfiltration over command and control channels.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Data Exfiltration Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-6h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/ded" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1041", + "name": "Exfiltration Over C2 Channel", + "reference": "https://attack.mitre.org/techniques/T1041/" + } + ] + } + ], + "id": "b1df930f-386d-44d6-be3d-eb3e0e99ecd9", + "rule_id": "e1db8899-97c1-4851-8993-3a3265353601", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "ded", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "ded_high_sent_bytes_destination_geo_country_iso_code" + }, + { + "name": "Potential Credential Access via Memory Dump File Creation", + "description": "Identifies the creation or modification of a medium size memory dump file which can indicate an attempt to access credentials from a process memory.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/", + "subtechnique": [ + { + "id": "T1003.001", + "name": "LSASS Memory", + "reference": "https://attack.mitre.org/techniques/T1003/001/" + } + ] + } + ] + } + ], + "id": "689f0cfc-e040-421c-ab9a-c3eded7ca71f", + "rule_id": "e707a7be-cc52-41ac-8ab3-d34b38c20005", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.header_bytes", + "type": "unknown", + "ecs": false + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "file.size", + "type": "long", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.trusted", + "type": "boolean", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n\n /* MDMP header */\n file.Ext.header_bytes : \"4d444d50*\" and file.size >= 30000 and\n not\n\n (\n (\n process.executable : (\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\Wermgr.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\Wermgr.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\System32\\\\WUDFHost.exe\",\n \"?:\\\\Windows\\\\System32\\\\Taskmgr.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\Taskmgr.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\SystemApps\\\\*.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Zoom\\\\bin\\\\zCrashReport64.exe\"\n ) and process.code_signature.trusted == true\n ) or\n (\n file.path : (\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\WER\\\\*\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\WDF\\\\*\",\n \"?:\\\\ProgramData\\\\Alteryx\\\\ErrorLogs\\\\*\",\n \"?:\\\\ProgramData\\\\Goodix\\\\*\",\n \"?:\\\\Windows\\\\system32\\\\config\\\\systemprofile\\\\AppData\\\\Local\\\\CrashDumps\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Zoom\\\\logs\\\\zoomcrash*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\*\\\\Crashpad\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\*\\\\crashpaddb\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\*\\\\HungReports\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\*\\\\CrashDumps\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\*\\\\NativeCrashReporting\\\\*\"\n ) and (process.code_signature.trusted == true or process.executable == null)\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Spike in Bytes Sent to an External Device via Airdrop", + "description": "A machine learning job has detected high bytes of data written to an external device via Airdrop. In a typical operational setting, there is usually a predictable pattern or a certain range of data that is written to external devices. An unusually large amount of data being written is anomalous and can signal illicit data copying or transfer activities.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Data Exfiltration Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-2h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/ded" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1011", + "name": "Exfiltration Over Other Network Medium", + "reference": "https://attack.mitre.org/techniques/T1011/" + } + ] + } + ], + "id": "b63dfbcc-5b6e-4f3c-a3f4-14c1de65d4aa", + "rule_id": "e92c99b6-c547-4bb6-b244-2f27394bc849", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "ded", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "ded_high_bytes_written_to_external_device_airdrop" + }, + { + "name": "Spike in Remote File Transfers", + "description": "A machine learning job has detected an abnormal volume of remote files shared on the host indicating potential lateral movement activity. One of the primary goals of attackers after gaining access to a network is to locate and exfiltrate valuable information. Attackers might perform multiple small transfers to match normal egress activity in the network, to evade detection.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Lateral Movement Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Lateral Movement" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-90m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/lmd" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "technique": [ + { + "id": "T1210", + "name": "Exploitation of Remote Services", + "reference": "https://attack.mitre.org/techniques/T1210/" + } + ] + } + ], + "id": "41a45493-eb49-4010-bd8f-41aaeecd510e", + "rule_id": "e9b0902b-c515-413b-b80b-a8dcebc81a66", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "lmd", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "lmd_high_count_remote_file_transfer" + }, + { + "name": "Unusual Process Spawned by a Parent Process", + "description": "A machine learning job has detected a suspicious Windows process. This process has been classified as malicious in two ways. It was predicted to be malicious by the ProblemChild supervised ML model, and it was found to be an unusual child process name, for the parent process, by an unsupervised ML model. Such a process may be an instance of suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Living off the Land Attack Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/problemchild", + "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + } + ], + "id": "9ad03ccc-7663-41f5-b3ed-b8edc89bd9de", + "rule_id": "ea09ff26-3902-4c53-bb8e-24b7a5d029dd", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "problemchild", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "problem_child_rare_process_by_parent" + }, + { + "name": "PowerShell Script with Webcam Video Capture Capabilities", + "description": "Detects PowerShell scripts that can be used to record webcam video. Attackers can capture this information to extort or spy on victims.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Collection", + "Data Source: PowerShell Logs", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/EmpireProject/Empire/blob/master/lib/modules/powershell/collection/WebcamRecorder.py" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0009", + "name": "Collection", + "reference": "https://attack.mitre.org/tactics/TA0009/" + }, + "technique": [ + { + "id": "T1125", + "name": "Video Capture", + "reference": "https://attack.mitre.org/techniques/T1125/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "49000a6c-7ef3-4207-b6f7-f6fa2882e686", + "rule_id": "eb44611f-62a8-4036-a5ef-587098be6c43", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"NewFrameEventHandler\" or\n \"VideoCaptureDevice\" or\n \"DirectX.Capture.Filters\" or\n \"VideoCompressors\" or\n \"Start-WebcamRecorder\" or\n (\n (\"capCreateCaptureWindowA\" or\n \"capCreateCaptureWindow\" or\n \"capGetDriverDescription\") and\n (\"avicap32.dll\" or \"avicap32\")\n )\n )\n", + "language": "kuery" + }, + { + "name": "Executable File with Unusual Extension", + "description": "Identifies the creation or modification of an executable file with an unexpected file extension. Attackers may attempt to evade detection by masquerading files using the file extension values used by image, audio, or document file types.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.008", + "name": "Masquerade File Type", + "reference": "https://attack.mitre.org/techniques/T1036/008/" + } + ] + } + ] + } + ], + "id": "2ac8763c-fce6-4fe4-8c25-9c4db446a4d2", + "rule_id": "ecd4857b-5bac-455e-a7c9-a88b66e56a9e", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.Ext.header_bytes", + "type": "unknown", + "ecs": false + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.pid", + "type": "long", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.action != \"deletion\" and\n\n /* MZ header or its common base64 equivalent TVqQ */\n file.Ext.header_bytes : (\"4d5a*\", \"54567151*\") and\n\n (\n /* common image file extensions */\n file.extension : (\"jpg\", \"jpeg\", \"emf\", \"tiff\", \"gif\", \"png\", \"bmp\", \"fpx\", \"eps\", \"svg\", \"inf\") or\n\n /* common audio and video file extensions */\n file.extension : (\"mp3\", \"wav\", \"avi\", \"mpeg\", \"flv\", \"wma\", \"wmv\", \"mov\", \"mp4\", \"3gp\") or\n\n /* common document file extensions */\n file.extension : (\"txt\", \"pdf\", \"doc\", \"docx\", \"rtf\", \"ppt\", \"pptx\", \"xls\", \"xlsx\", \"hwp\", \"html\")\n ) and\n not process.pid == 4 and\n not process.executable : \"?:\\\\Program Files (x86)\\\\Trend Micro\\\\Client Server Security Agent\\\\Ntrtscan.exe\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Shortcut File Written or Modified on Startup Folder", + "description": "Identifies shortcut files written to or modified in the startup folder. Adversaries may use this technique to maintain persistence.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1547", + "name": "Boot or Logon Autostart Execution", + "reference": "https://attack.mitre.org/techniques/T1547/", + "subtechnique": [ + { + "id": "T1547.001", + "name": "Registry Run Keys / Startup Folder", + "reference": "https://attack.mitre.org/techniques/T1547/001/" + }, + { + "id": "T1547.009", + "name": "Shortcut Modification", + "reference": "https://attack.mitre.org/techniques/T1547/009/" + } + ] + } + ] + } + ], + "id": "7ca3d158-0d5e-4579-9ea2-a7d9704e53f9", + "rule_id": "ee53d67a-5f0c-423c-a53c-8084ae562b5c", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "file.extension", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and file.extension == \"lnk\" and\n file.path : (\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\*\",\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\StartUp\\\\*\"\n ) and\n not (\n (process.name : \"ONENOTE.EXE\" and process.code_signature.status: \"trusted\" and file.name : \"Send to OneNote.lnk\") or\n (process.name: \"OktaVerifySetup.exe\" and process.code_signature.status: \"trusted\" and file.name : \"Okta Verify.lnk\")\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Potential Data Exfiltration Activity to an Unusual Destination Port", + "description": "A machine learning job has detected data exfiltration to a particular destination port. Data transfer patterns that are outside the normal traffic patterns of an organization could indicate exfiltration over command and control channels.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Data Exfiltration Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Exfiltration" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-6h", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/ded" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0010/" + }, + "technique": [ + { + "id": "T1041", + "name": "Exfiltration Over C2 Channel", + "reference": "https://attack.mitre.org/techniques/T1041/" + } + ] + } + ], + "id": "20772cac-2102-4499-8f9b-c93322c36ff6", + "rule_id": "ef8cc01c-fc49-4954-a175-98569c646740", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "ded", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "ded_high_sent_bytes_destination_port" + }, + { + "name": "Service Path Modification", + "description": "Identifies attempts to modify a service path by an unusual process. Attackers may attempt to modify existing services for persistence or privilege escalation.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Data Source: Elastic Endgame", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1112", + "name": "Modify Registry", + "reference": "https://attack.mitre.org/techniques/T1112/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1543", + "name": "Create or Modify System Process", + "reference": "https://attack.mitre.org/techniques/T1543/", + "subtechnique": [ + { + "id": "T1543.003", + "name": "Windows Service", + "reference": "https://attack.mitre.org/techniques/T1543/003/" + } + ] + } + ] + } + ], + "id": "aa09f6c3-6c0c-4f54-a6b9-df77f6856adf", + "rule_id": "f243fe39-83a4-46f3-a3b6-707557a102df", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "registry.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ImagePath\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ImagePath\"\n ) and not (\n process.executable : (\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\services.exe\",\n \"?:\\\\Windows\\\\WinSxS\\\\*\"\n )\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*", + "endgame-*" + ] + }, + { + "name": "Machine Learning Detected a DNS Request Predicted to be a DGA Domain", + "description": "A supervised machine learning model has identified a DNS question name that is predicted to be the result of a Domain Generation Algorithm (DGA), which could indicate command and control network activity.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Domain: Network", + "Domain: Endpoint", + "Data Source: Elastic Defend", + "Use Case: Domain Generation Algorithm Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Command and Control" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-10m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/dga" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1568", + "name": "Dynamic Resolution", + "reference": "https://attack.mitre.org/techniques/T1568/", + "subtechnique": [ + { + "id": "T1568.002", + "name": "Domain Generation Algorithms", + "reference": "https://attack.mitre.org/techniques/T1568/002/" + } + ] + } + ] + } + ], + "id": "1c747962-1b5e-45c1-894c-04a0d048807a", + "rule_id": "f3403393-1fd9-4686-8f6e-596c58bc00b4", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "dga", + "version": "^2.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [ + { + "name": "dns.question.registered_domain", + "type": "keyword", + "ecs": true + }, + { + "name": "ml_is_dga.malicious_prediction", + "type": "unknown", + "ecs": false + } + ], + "setup": "The Domain Generation Algorithm (DGA) integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "query", + "index": [ + "logs-endpoint.events.*", + "logs-network_traffic.*" + ], + "query": "ml_is_dga.malicious_prediction:1 and not dns.question.registered_domain:avsvmcloud.com\n", + "language": "kuery" + }, + { + "name": "Setcap setuid/setgid Capability Set", + "description": "This rule monitors for the addition of the cap_setuid+ep or cap_setgid+ep capabilities via setcap. Setuid (Set User ID) and setgid (Set Group ID) are Unix-like OS features that enable processes to run with elevated privileges, based on the file owner or group. Threat actors can exploit these attributes to achieve persistence by creating malicious binaries, allowing them to maintain control over a compromised system with elevated permissions.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Linux", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0004", + "name": "Privilege Escalation", + "reference": "https://attack.mitre.org/tactics/TA0004/" + }, + "technique": [ + { + "id": "T1548", + "name": "Abuse Elevation Control Mechanism", + "reference": "https://attack.mitre.org/techniques/T1548/", + "subtechnique": [ + { + "id": "T1548.001", + "name": "Setuid and Setgid", + "reference": "https://attack.mitre.org/techniques/T1548/001/" + } + ] + } + ] + } + ], + "id": "1e73f88b-2f0a-4229-9b4e-f3f7fe8d24bd", + "rule_id": "f5c005d3-4e17-48b0-9cd7-444d48857f97", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "event.type", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"setcap\" and process.args : \"cap_set?id+ep\"\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Suspicious Windows Process Cluster Spawned by a Parent Process", + "description": "A machine learning job combination has detected a set of one or more suspicious Windows processes with unusually high scores for malicious probability. These process(es) have been classified as malicious in several ways. The process(es) were predicted to be malicious by the ProblemChild supervised ML model. If the anomaly contains a cluster of suspicious processes, each process has the same parent process name, and the aggregate score of the event cluster was calculated to be unusually high by an unsupervised ML model. Such a cluster often contains suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Living off the Land Attack Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Defense Evasion" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/problemchild", + "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/" + } + ] + } + ], + "id": "0af5753d-3f32-4e53-abfa-a9f9cd975dbf", + "rule_id": "f5d9d36d-7c30-4cdb-a856-9f653c13d4e0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "problemchild", + "version": "^2.0.0" + } + ], + "required_fields": [], + "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 75, + "machine_learning_job_id": "problem_child_high_sum_by_parent" + }, + { + "name": "Browser Extension Install", + "description": "Identifies the install of browser extensions. Malicious browser extensions can be installed via app store downloads masquerading as legitimate extensions, social engineering, or by an adversary that has already compromised a system.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Persistence", + "Data Source: Elastic Defend", + "Rule Type: BBR" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0003", + "name": "Persistence", + "reference": "https://attack.mitre.org/tactics/TA0003/" + }, + "technique": [ + { + "id": "T1176", + "name": "Browser Extensions", + "reference": "https://attack.mitre.org/techniques/T1176/" + } + ] + } + ], + "id": "d33d7c5f-6750-4800-b6da-24cf7430ef31", + "rule_id": "f97504ac-1053-498f-aeaa-c6d01e76b379", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "file.name", + "type": "keyword", + "ecs": true + }, + { + "name": "file.path", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "file where event.action : \"creation\" and \n(\n /* Firefox-Based Browsers */\n (\n file.name : \"*.xpi\" and\n file.path : \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\*\\\\Profiles\\\\*\\\\Extensions\\\\*.xpi\"\n ) or\n /* Chromium-Based Browsers */\n (\n file.name : \"*.crx\" and\n file.path : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\*\\\\*\\\\User Data\\\\Webstore Downloads\\\\*\"\n )\n)\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Image Loaded with Invalid Signature", + "description": "Identifies binaries that are loaded and with an invalid code signature. This may indicate an attempt to masquerade as a signed binary.", + "risk_score": 21, + "severity": "low", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1036", + "name": "Masquerading", + "reference": "https://attack.mitre.org/techniques/T1036/", + "subtechnique": [ + { + "id": "T1036.001", + "name": "Invalid Code Signature", + "reference": "https://attack.mitre.org/techniques/T1036/001/" + } + ] + } + ] + } + ], + "id": "d4a8f949-65af-4559-a667-46f732e31a68", + "rule_id": "fd9484f2-1c56-44ae-8b28-dc1354e3a0e8", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "dll.Ext.relative_file_creation_time", + "type": "unknown", + "ecs": false + }, + { + "name": "dll.Ext.relative_file_name_modify_time", + "type": "unknown", + "ecs": false + }, + { + "name": "dll.code_signature.status", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.name", + "type": "keyword", + "ecs": true + }, + { + "name": "dll.path", + "type": "keyword", + "ecs": true + }, + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "library where host.os.type == \"windows\" and event.action == \"load\" and\n dll.code_signature.status : (\"errorUntrustedRoot\", \"errorBadDigest\", \"errorUntrustedRoot\") and\n (dll.Ext.relative_file_creation_time <= 500 or dll.Ext.relative_file_name_modify_time <= 500) and\n not startswith~(dll.name, process.name) and\n not dll.path : (\n \"?:\\\\Windows\\\\System32\\\\DriverStore\\\\FileRepository\\\\*\"\n )\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "PowerShell Kerberos Ticket Dump", + "description": "Detects PowerShell scripts that have the capability of dumping Kerberos tickets from LSA, which potentially indicates an attacker's attempt to acquire credentials for lateral movement.", + "risk_score": 47, + "severity": "medium", + "timestamp_override": "event.ingested", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Credential Access", + "Data Source: PowerShell Logs" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "5m", + "from": "now-9m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://github.com/MzHmO/PowershellKerberos/blob/main/dumper.ps1" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "technique": [ + { + "id": "T1003", + "name": "OS Credential Dumping", + "reference": "https://attack.mitre.org/techniques/T1003/" + }, + { + "id": "T1558", + "name": "Steal or Forge Kerberos Tickets", + "reference": "https://attack.mitre.org/techniques/T1558/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [ + { + "id": "T1059", + "name": "Command and Scripting Interpreter", + "reference": "https://attack.mitre.org/techniques/T1059/", + "subtechnique": [ + { + "id": "T1059.001", + "name": "PowerShell", + "reference": "https://attack.mitre.org/techniques/T1059/001/" + } + ] + } + ] + } + ], + "id": "0aeff3ef-6511-4b09-818e-0edac4a604e1", + "rule_id": "fddff193-48a3-484d-8d35-90bb3d323a56", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "windows", + "version": "^1.5.0" + } + ], + "required_fields": [ + { + "name": "event.category", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "powershell.file.script_block_text", + "type": "unknown", + "ecs": false + } + ], + "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", + "type": "query", + "index": [ + "winlogbeat-*", + "logs-windows.*" + ], + "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"LsaCallAuthenticationPackage\" and\n (\n \"KerbRetrieveEncodedTicketMessage\" or\n \"KerbQueryTicketCacheMessage\" or\n \"KerbQueryTicketCacheExMessage\" or\n \"KerbQueryTicketCacheEx2Message\" or\n \"KerbRetrieveTicketMessage\" or\n \"KerbDecryptDataMessage\"\n )\n )\n", + "language": "kuery" + }, + { + "name": "Execution via MS VisualStudio Pre/Post Build Events", + "description": "Identifies the execution of a command via Microsoft Visual Studio Pre or Post build events. Adversaries may backdoor a trusted visual studio project to execute a malicious command during the project build process.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "building_block_type": "default", + "version": 1, + "tags": [ + "Domain: Endpoint", + "OS: Windows", + "Use Case: Threat Detection", + "Tactic: Defense Evasion", + "Tactic: Execution", + "Rule Type: BBR", + "Data Source: Elastic Defend" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "60m", + "from": "now-119m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://docs.microsoft.com/en-us/visualstudio/ide/reference/pre-build-event-post-build-event-command-line-dialog-box?view=vs-2022", + "https://www.pwc.com/gx/en/issues/cybersecurity/cyber-threat-intelligence/threat-actor-of-in-tur-est.html", + "https://blog.google/threat-analysis-group/new-campaign-targeting-security-researchers/", + "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Execution/execution_evasion_visual_studio_prebuild_event.evtx" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0005", + "name": "Defense Evasion", + "reference": "https://attack.mitre.org/tactics/TA0005/" + }, + "technique": [ + { + "id": "T1127", + "name": "Trusted Developer Utilities Proxy Execution", + "reference": "https://attack.mitre.org/techniques/T1127/", + "subtechnique": [ + { + "id": "T1127.001", + "name": "MSBuild", + "reference": "https://attack.mitre.org/techniques/T1127/001/" + } + ] + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0002", + "name": "Execution", + "reference": "https://attack.mitre.org/tactics/TA0002/" + }, + "technique": [] + } + ], + "id": "6c2be321-b075-4062-8b6c-5191cc19ed25", + "rule_id": "fec7ccb7-6ed9-4f98-93ab-d6b366b063a0", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "endpoint", + "version": "^8.2.0" + } + ], + "required_fields": [ + { + "name": "event.action", + "type": "keyword", + "ecs": true + }, + { + "name": "host.os.type", + "type": "keyword", + "ecs": true + }, + { + "name": "process.args", + "type": "keyword", + "ecs": true + }, + { + "name": "process.command_line", + "type": "wildcard", + "ecs": true + }, + { + "name": "process.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.executable", + "type": "keyword", + "ecs": true + }, + { + "name": "process.name", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.entity_id", + "type": "keyword", + "ecs": true + }, + { + "name": "process.parent.name", + "type": "keyword", + "ecs": true + } + ], + "setup": "", + "type": "eql", + "query": "sequence with maxspan=1m\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.name : \"cmd.exe\" and process.parent.name : \"MSBuild.exe\" and\n process.args : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\tmp*.exec.cmd\"] by process.entity_id\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.name : (\n \"cmd.exe\", \"powershell.exe\",\n \"MSHTA.EXE\", \"CertUtil.exe\",\n \"CertReq.exe\", \"rundll32.exe\",\n \"regsvr32.exe\", \"MSbuild.exe\",\n \"cscript.exe\", \"wscript.exe\",\n \"installutil.exe\"\n ) and\n not \n (\n process.name : (\"cmd.exe\", \"powershell.exe\") and\n process.args : (\n \"*\\\\vcpkg\\\\scripts\\\\buildsystems\\\\msbuild\\\\applocal.ps1\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\VisualStudio\\\\SxS\\\\VS?\",\n \"process.versions.node*\",\n \"?:\\\\Program Files\\\\nodejs\\\\node.exe\",\n \"HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\MSBuild\\\\ToolsVersions\\\\*\",\n \"*Get-ChildItem*Tipasplus.css*\",\n \"Build\\\\GenerateResourceScripts.ps1\",\n \"Shared\\\\Common\\\\..\\\\..\\\\BuildTools\\\\ConfigBuilder.ps1\\\"\",\n \"?:\\\\Projets\\\\*\\\\PostBuild\\\\MediaCache.ps1\"\n )\n ) and\n not process.executable : \"?:\\\\Program Files*\\\\Microsoft Visual Studio\\\\*\\\\MSBuild.exe\" and\n not (process.name : \"cmd.exe\" and\n process.command_line :\n (\"*vswhere.exe -property catalog_productSemanticVersion*\",\n \"*git log --pretty=format*\", \"*\\\\.nuget\\\\packages\\\\vswhere\\\\*\",\n \"*Common\\\\..\\\\..\\\\BuildTools\\\\*\"))\n ] by process.parent.entity_id\n", + "language": "eql", + "index": [ + "logs-endpoint.events.*" + ] + }, + { + "name": "Potential DGA Activity", + "description": "A population analysis machine learning job detected potential DGA (domain generation algorithm) activity. Such activity is often used by malware command and control (C2) channels. This machine learning job looks for a source IP address making DNS requests that have an aggregate high probability of being DGA activity.", + "risk_score": 21, + "severity": "low", + "license": "Elastic License v2", + "note": "", + "version": 1, + "tags": [ + "Use Case: Domain Generation Algorithm Detection", + "Rule Type: ML", + "Rule Type: Machine Learning", + "Tactic: Command and Control" + ], + "enabled": false, + "risk_score_mapping": [], + "severity_mapping": [], + "interval": "15m", + "from": "now-45m", + "to": "now", + "actions": [], + "exceptions_list": [], + "author": [ + "Elastic" + ], + "false_positives": [], + "references": [ + "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", + "https://docs.elastic.co/en/integrations/dga" + ], + "max_signals": 100, + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "technique": [ + { + "id": "T1568", + "name": "Dynamic Resolution", + "reference": "https://attack.mitre.org/techniques/T1568/" + } + ] + } + ], + "id": "1b1b2bab-de71-4842-95ac-50c1138e0aac", + "rule_id": "ff0d807d-869b-4a0d-a493-52bc46d2f1b1", + "immutable": true, + "updated_at": "1970-01-01T00:00:00.000Z", + "updated_by": "", + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + "revision": 1, + "related_integrations": [ + { + "package": "dga", + "version": "^2.0.0" + }, + { + "package": "endpoint", + "version": "^8.2.0" + }, + { + "package": "network_traffic", + "version": "^1.1.0" + } + ], + "required_fields": [], + "setup": "The Domain Generation Algorithm (DGA) integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", + "type": "machine_learning", + "anomaly_threshold": 70, + "machine_learning_job_id": "dga_high_sum_probability" + } + ] +} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx index 37bd449fa3392..6b3b6d05ba004 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx @@ -6,7 +6,7 @@ */ import React, { useMemo } from 'react'; -// import { Change, diffChars, diffLines, diffWords } from 'diff'; +import { Change, diffLines } from 'diff'; import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; import { EuiSpacer, useEuiBackgroundColor, tint } from '@elastic/eui'; @@ -44,14 +44,10 @@ const DiffSegment = ({ change, diffMode, showDiffDecorations, -}: // matchCss, -// diffCss, -{ +}: { change: Change; diffMode: 'lines' | undefined; showDiffDecorations: boolean | undefined; - // matchCss: ReturnType; - // diffCss: ReturnType; }) => { const matchBackgroundColor = useEuiBackgroundColor('success'); const diffBackgroundColor = useEuiBackgroundColor('danger'); @@ -123,37 +119,11 @@ interface RuleDiffTabProps { } export const RuleDiffTab = ({ fields }: RuleDiffTabProps) => { - // console.log(fields, diffLines); - - const matchBackgroundColor = useEuiBackgroundColor('success'); - const diffBackgroundColor = useEuiBackgroundColor('danger'); - - if (!fields.references) { - return null; - } - - const matchCss = css` - background-color: ${matchBackgroundColor}; - color: ${euiThemeVars.euiColorSuccessText}; - `; - const diffCss = css` - background-color: ${diffBackgroundColor}; - color: ${euiThemeVars.euiColorDangerText}; - `; - - // console.log( - // 'DIFIF', - // JSON.stringify(fields.references.current_version), - // JSON.stringify(fields.references.merged_version) - // ); - - // const diff = diffLines( - // JSON.stringify(fields.references.current_version, null, 2), - // JSON.stringify(fields.references.merged_version, null, 2), - // { ignoreWhitespace: false } - // ); - - // console.log('!!!DIFF', diff); + const diff = diffLines( + JSON.stringify(fields.references.current_version, null, 2), + JSON.stringify(fields.references.merged_version, null, 2), + { ignoreWhitespace: false } + ); return ( <> @@ -164,8 +134,6 @@ export const RuleDiffTab = ({ fields }: RuleDiffTabProps) => { change={change} diffMode={'lines'} showDiffDecorations={true} - matchCss={matchCss} - diffCss={diffCss} /> ))} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_1.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_1.tsx new file mode 100644 index 0000000000000..e579b3401077e --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_1.tsx @@ -0,0 +1,313 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState, useMemo } from 'react'; +import { Change, diffLines } from 'diff'; +import { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { + EuiSpacer, + EuiAccordion, + EuiTitle, + EuiFlexGroup, + EuiHorizontalRule, + useGeneratedHtmlId, + useEuiBackgroundColor, + tint, +} from '@elastic/eui'; +import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; + +import * as i18n from './translations'; + +const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; + +const FIELD_CONFIG_BY_NAME = { + eql_query: { + label: 'EQL query', + compareMethod: 'diffWordsWithSpace', + }, + name: { + label: 'Name', + compareMethod: 'diffWordsWithSpace', + }, + note: { + label: 'Investigation guide', + compareMethod: 'diffWordsWithSpace', + }, + references: { + label: i18n.REFERENCES_FIELD_LABEL, + compareMethod: 'diffJson', + }, + risk_score: { + // JSON.stringify(fields.risk_score.current_version) + label: i18n.RISK_SCORE_FIELD_LABEL, + compareMethod: 'diffJson', + }, + threat: { + label: 'THREAT', + compareMethod: 'diffJson', + }, + severity: { + label: 'Severity_', + compareMethod: 'diffWords', + }, +}; + +const indicatorCss = css` + position: absolute; + width: ${euiThemeVars.euiSizeS}; + height: 100%; + margin-left: calc(-${euiThemeVars.euiSizeS} - calc(${euiThemeVars.euiSizeXS} / 2)); + text-align: center; + line-height: ${euiThemeVars.euiFontSizeM}; + font-weight: ${euiThemeVars.euiFontWeightMedium}; +`; + +const matchIndicatorCss = css` + &:before { + content: '+'; + ${indicatorCss} + background-color: ${euiThemeVars.euiColorSuccess}; + color: ${euiThemeVars.euiColorLightestShade}; + } +`; + +const diffIndicatorCss = css` + &:before { + content: '-'; + ${indicatorCss} + background-color: ${tint(euiThemeVars.euiColorDanger, 0.25)}; + color: ${euiThemeVars.euiColorLightestShade}; + } +`; + +const DiffSegment = ({ + change, + diffMode, + showDiffDecorations, +}: { + change: Change; + diffMode: 'lines' | undefined; + showDiffDecorations: boolean | undefined; +}) => { + const matchBackgroundColor = useEuiBackgroundColor('success'); + const diffBackgroundColor = useEuiBackgroundColor('danger'); + + const matchCss = { + backgroundColor: matchBackgroundColor, + color: euiThemeVars.euiColorSuccessText, + }; + + const diffCss = { + backgroundColor: diffBackgroundColor, + color: euiThemeVars.euiColorDangerText, + }; + + const highlightCss = change.added ? matchCss : change.removed ? diffCss : undefined; + + const paddingCss = useMemo(() => { + if (diffMode === 'lines') { + return css` + padding-left: calc(${euiThemeVars.euiSizeXS} / 2); + `; + } + }, [diffMode]); + + const decorationCss = useMemo(() => { + if (!showDiffDecorations) { + return undefined; + } + + if (diffMode === 'lines') { + if (change.added) { + return matchIndicatorCss; + } else if (change.removed) { + return diffIndicatorCss; + } + } else { + if (change.added) { + return css` + text-decoration: underline; + `; + } else if (change.removed) { + return css` + text-decoration: line-through; + `; + } + } + }, [change.added, change.removed, diffMode, showDiffDecorations]); + + return ( +
+ {change.value} +
+ ); +}; + +interface FieldsProps { + fields: Partial; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { + const visibleFields = Object.keys(fields).filter( + (fieldName) => !HIDDEN_FIELDS.includes(fieldName) + ); + + // return ( + // <> + // {visibleFields.map((fieldName) => ( + //
+ // {fieldName} {typeof fields[fieldName]?.current_version} + //
+ // ))} + // + // ); + + return ( + <> + {visibleFields.map((fieldName) => { + const diff = diffLines( + typeof fields[fieldName].current_version === 'string' + ? fields[fieldName].current_version + : JSON.stringify(fields[fieldName].current_version, null, 2), + typeof fields[fieldName].merged_version === 'string' + ? fields[fieldName].merged_version + : JSON.stringify(fields[fieldName].merged_version, null, 2), + { ignoreWhitespace: false } + ); + + return ( + <> + { + toggleSection(fieldName); + }} + > + <> + + {diff.map((change, i) => ( + + ))} + + + + + ); + })} + + ); +}; + +interface ExpandableSectionProps { + title: string; + isOpen: boolean; + toggle: () => void; + children: React.ReactNode; +} + +const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { + const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); + + return ( + +

{title}

+ + } + initialIsOpen={true} + > + + + {children} + +
+ ); +}; + +const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }) => { + const diff = diffLines(JSON.stringify(currentRule), JSON.stringify(mergedRule), { + ignoreWhitespace: false, + }); + + return ( + <> + { + toggleSection('whole'); + }} + > + <> + + {diff.map((change, i) => ( + + ))} + + + + + ); +}; + +interface RuleDiffTabProps { + fields: Partial; +} + +export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProps) => { + const [openSections, setOpenSections] = useState>( + Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) + ); + + const toggleSection = (sectionName: string) => { + setOpenSections((prevOpenSections) => ({ + ...prevOpenSections, + [sectionName]: !prevOpenSections[sectionName], + })); + }; + + return ( + <> + + + + + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx index c91f90015e4e5..3318b32b89d1e 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx @@ -6,7 +6,6 @@ */ import React, { useState } from 'react'; -// import ReactDiffViewer from 'react-diff-viewer'; import ReactDiffViewer from 'react-diff-viewer-continued'; import { EuiSpacer, @@ -20,6 +19,95 @@ import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/ import * as i18n from './translations'; +const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; + +const FIELD_CONFIG_BY_NAME = { + eql_query: { + label: 'EQL query', + compareMethod: 'diffWordsWithSpace', + }, + kql_query: { + label: 'KQL query', + compareMethod: 'diffWordsWithSpace', + }, + description: { + label: 'Description', + compareMethod: 'diffWordsWithSpace', + }, + name: { + label: 'Name', + compareMethod: 'diffWordsWithSpace', + }, + note: { + label: 'Investigation guide', + compareMethod: 'diffWordsWithSpace', + }, + references: { + label: i18n.REFERENCES_FIELD_LABEL, + compareMethod: 'diffJson', + }, + risk_score: { + // JSON.stringify(fields.risk_score.current_version) + label: i18n.RISK_SCORE_FIELD_LABEL, + compareMethod: 'diffJson', + }, + threat: { + label: 'THREAT', + compareMethod: 'diffJson', + }, + severity: { + label: 'Severity', + compareMethod: 'diffWords', + }, +}; + +interface FieldsProps { + fields: Partial; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { + const visibleFields = Object.keys(fields).filter( + (fieldName) => !HIDDEN_FIELDS.includes(fieldName) + ); + + return ( + <> + {visibleFields.map((fieldName) => { + return ( + <> + { + toggleSection(fieldName); + }} + > + + + + + ); + })} + + ); +}; + interface ExpandableSectionProps { title: string; isOpen: boolean; @@ -51,11 +139,34 @@ const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectio ); }; +const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }) => { + return ( + <> + { + toggleSection('whole'); + }} + > + + + + + ); +}; + interface RuleDiffTabProps { fields: Partial; } -export const RuleDiffTab = ({ fields }: RuleDiffTabProps) => { +export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProps) => { const [openSections, setOpenSections] = useState>( Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) ); @@ -67,58 +178,16 @@ export const RuleDiffTab = ({ fields }: RuleDiffTabProps) => { })); }; - if (!fields.references && !fields.risk_score) { - return null; - } - return ( <> - { - toggleSection('eql_query'); - }} - > - - - - { - toggleSection('references'); - }} - > - - - - { - toggleSection('risk_score'); - }} - > - - + + ); }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_3.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_3.tsx new file mode 100644 index 0000000000000..ae8c49a03483f --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_3.tsx @@ -0,0 +1,625 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState, useCallback, useMemo } from 'react'; +import type { ReactElement } from 'react'; +import { uniqueId } from 'lodash'; +import { + Diff, + Hunk, + useSourceExpansion, + useMinCollapsedLines, + HunkData, + MarkEditsType, + DiffType, + GutterOptions, + Decoration, + DecorationProps, + getCollapsedLinesCountBetween, + parseDiff, + tokenize, + markEdits, + markWord, +} from 'react-diff-view'; +import { formatLines, diffLines } from 'unidiff'; +import { Global, css } from '@emotion/react'; +// import 'react-diff-view/styles/index.css'; +import { + EuiSpacer, + EuiAccordion, + EuiTitle, + EuiFlexGroup, + EuiHorizontalRule, + useGeneratedHtmlId, +} from '@elastic/eui'; +import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; + +import * as i18n from './translations'; + +const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; + +const FIELD_CONFIG_BY_NAME = { + eql_query: { + label: 'EQL query', + compareMethod: 'diffWordsWithSpace', + }, + name: { + label: 'Name', + compareMethod: 'diffWordsWithSpace', + }, + note: { + label: 'Investigation guide', + compareMethod: 'diffWordsWithSpace', + }, + references: { + label: i18n.REFERENCES_FIELD_LABEL, + compareMethod: 'diffJson', + }, + risk_score: { + // JSON.stringify(fields.risk_score.current_version) + label: i18n.RISK_SCORE_FIELD_LABEL, + compareMethod: 'diffJson', + }, + threat: { + label: 'THREAT', + compareMethod: 'diffJson', + }, + severity: { + label: 'Severity_', + compareMethod: 'diffWords', + }, +}; + +const tokenizeFn = (hunks) => { + console.log('hunks', hunks); + if (!hunks) { + return undefined; + } + + const options = { + highlight: false, + enhancers: [markEdits(hunks, { type: 'block' }), markWord('description', 'description_id')], + }; + + try { + return tokenize(hunks, options); + } catch (ex) { + return undefined; + } +}; + +function fakeIndex() { + return uniqueId().slice(0, 9); +} + +function appendGitDiffHeaderIfNeeded(diffText: string) { + console.log('appendGitDiffHeaderIfNeeded INPUT', diffText); + if (diffText.startsWith('diff --git')) { + return diffText; + } + + const segments = ['diff --git a/a b/b', `index ${fakeIndex()}..${fakeIndex()} 100644`, diffText]; + return segments.join('\n'); +} + +interface HunkInfoProps extends Omit { + hunk: HunkData; +} + +function HunkInfo({ hunk, ...props }: HunkInfoProps) { + return ( + + {null} + {hunk.content} + + ); +} + +interface UnfoldProps extends Omit { + start: number; + end: number; + direction: 'up' | 'down' | 'none'; + onExpand: (start: number, end: number) => void; +} + +function Unfold({ start, end, direction, onExpand, ...props }: UnfoldProps) { + const expand = useCallback(() => onExpand(start, end), [onExpand, start, end]); + + const lines = end - start; + + return ( + +
 Expand hidden {lines} lines
+
+ ); +} + +interface UnfoldCollapsedProps { + previousHunk: HunkData; + currentHunk?: HunkData; + linesCount: number; + onExpand: (start: number, end: number) => void; +} + +function UnfoldCollapsed({ + previousHunk, + currentHunk, + linesCount, + onExpand, +}: UnfoldCollapsedProps) { + if (!currentHunk) { + // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + const nextStart = previousHunk.oldStart + previousHunk.oldLines; + const collapsedLines = linesCount - nextStart + 1; + + if (collapsedLines <= 0) { + return null; + } + + return ( + <> + {collapsedLines > 10 && ( + + )} + + + ); + } + + const collapsedLines = getCollapsedLinesCountBetween(previousHunk, currentHunk); + + if (!previousHunk) { + if (!collapsedLines) { + return null; + } + + const start = Math.max(currentHunk.oldStart - 10, 1); + + return ( + <> + + {collapsedLines > 10 && ( + + )} + + ); + } + + // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + const collapsedStart = previousHunk.oldStart + previousHunk.oldLines; + const collapsedEnd = currentHunk.oldStart; + + if (collapsedLines < 10) { + return ( + + ); + } + + return ( + <> + {/* eslint-disable-next-line @typescript-eslint/restrict-plus-operands */} + + + + + ); +} + +interface EnhanceOptions { + language: string; + editsType: MarkEditsType; +} + +function useEnhance( + hunks: HunkData[], + oldSource: string | null, + { language, editsType }: EnhanceOptions +) { + const [hunksWithSourceExpanded, expandRange] = useSourceExpansion(hunks, oldSource); // Operates on hunks to allow "expansion" behaviour - substitutes two hunks with one hunk including data from two hunks and everything in between + const hunksWithMinLinesCollapsed = useMinCollapsedLines(0, hunksWithSourceExpanded, oldSource); + + return { + expandRange, + hunks: hunksWithMinLinesCollapsed, + }; +} + +const renderToken = (token, defaultRender, i) => { + switch (token.type) { + case 'space': + console.log(token); + return ( + + {token.children && token.children.map((token, i) => renderToken(token, defaultRender, i))} + + ); + default: + return defaultRender(token, i); + } +}; + +interface Props { + oldSource: string | null; + type: DiffType; + hunks: HunkData[]; +} + +function DiffView(props: Props) { + const { oldSource, type } = props; + const configuration = { + viewType: 'split', + editsType: 'block', + showGutter: true, + language: 'text', + } as const; + + const { expandRange, hunks } = useEnhance(props.hunks, oldSource, configuration); + + const { viewType, showGutter } = configuration; + const renderGutter = useCallback( + ({ change, side, inHoverState, renderDefault, wrapInAnchor }: GutterOptions) => { + return wrapInAnchor(renderDefault()); + }, + [] + ); + + const linesCount = oldSource ? oldSource.split('\n').length : 0; + // eslint-disable-next-line @typescript-eslint/no-shadow + const renderHunk = (children: ReactElement[], hunk: HunkData, i: number, hunks: HunkData[]) => { + const previousElement = children[children.length - 1]; + const decorationElement = oldSource ? ( + + ) : ( + + ); + children.push(decorationElement); + + const hunkElement = ; + children.push(hunkElement); + + if (i === hunks.length - 1 && oldSource) { + const unfoldTailElement = ( + + ); + children.push(unfoldTailElement); + } + + return children; + }; + + return ( + + {(hunks) => hunks.reduce(renderHunk, [])} + + ); +} + +interface FieldsProps { + fields: Partial; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { + const visibleFields = Object.keys(fields).filter( + (fieldName) => !HIDDEN_FIELDS.includes(fieldName) + ); + + return ( + <> + {visibleFields.map((fieldName) => { + const oldSource = JSON.stringify(fields[fieldName]?.current_version, null, 2); + const newSource = JSON.stringify(fields[fieldName]?.merged_version, null, 2); + + const diff = formatLines(diffLines(oldSource, newSource), { context: 3 }); + + const [file] = parseDiff(appendGitDiffHeaderIfNeeded(diff), { + nearbySequences: 'zip', + }); + + return ( + <> + { + toggleSection(fieldName); + }} + > + + + + + ); + })} + + ); +}; + +interface ExpandableSectionProps { + title: string; + isOpen: boolean; + toggle: () => void; + children: React.ReactNode; +} + +const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { + const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); + + return ( + +

{title}

+ + } + initialIsOpen={true} + > + + + {children} + +
+ ); +}; + +const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }) => { + const oldSource = JSON.stringify(currentRule, Object.keys(currentRule).sort(), 2); + const newSource = JSON.stringify(mergedRule, Object.keys(mergedRule).sort(), 2); + + const diff = formatLines(diffLines(oldSource, newSource), { context: 3 }); + + const [file] = parseDiff(appendGitDiffHeaderIfNeeded(diff), { + nearbySequences: 'zip', + }); + + const tokens = useMemo(() => tokenizeFn(file.hunks), [file.hunks]); + + return ( + <> + { + toggleSection('whole'); + }} + > + + + + + ); +}; + +interface RuleDiffTabProps { + fields: Partial; +} + +export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProps) => { + const [openSections, setOpenSections] = useState>( + Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) + ); + + const toggleSection = (sectionName: string) => { + setOpenSections((prevOpenSections) => ({ + ...prevOpenSections, + [sectionName]: !prevOpenSections[sectionName], + })); + }; + + /* + export declare enum DiffMethod { + CHARS = "diffChars", + WORDS = "diffWords", + WORDS_WITH_SPACE = "diffWordsWithSpace", + LINES = "diffLines", + TRIMMED_LINES = "diffTrimmedLines", + SENTENCES = "diffSentences", + CSS = "diffCss", + JSON = "diffJson" +} + */ + + return ( + <> + + + + a { + color: inherit; + display: block; + } + + .diff-gutter { + padding: 0 1ch; + text-align: right; + cursor: pointer; + user-select: none; + } + + .diff-gutter-insert { + background-color: var(--diff-gutter-insert-background-color); + color: var(--diff-gutter-insert-text-color); + } + + .diff-gutter-delete { + background-color: var(--diff-gutter-delete-background-color); + color: var(--diff-gutter-delete-text-color); + } + + .diff-gutter-omit { + cursor: default; + } + + .diff-gutter-selected { + background-color: var(--diff-gutter-selected-background-color); + color: var(--diff-gutter-selected-text-color); + } + + .diff-code { + white-space: pre-wrap; + word-wrap: break-word; + word-break: break-all; + padding: 0 0 0 0.5em; + } + + .diff-code-edit { + color: inherit; + } + + .diff-code-insert { + background-color: var(--diff-code-insert-background-color); + color: var(--diff-code-insert-text-color); + } + + .diff-code-insert .diff-code-edit { + background-color: var(--diff-code-insert-edit-background-color); + color: var(--diff-code-insert-edit-text-color); + } + + .diff-code-delete { + background-color: var(--diff-code-delete-background-color); + color: var(--diff-code-delete-text-color); + } + + .diff-code-delete .diff-code-edit { + background-color: var(--diff-code-delete-edit-background-color); + color: var(--diff-code-delete-edit-text-color); + } + + .diff-code-selected { + background-color: var(--diff-code-selected-background-color); + color: var(--diff-code-selected-text-color); + } + + .diff-widget-content { + vertical-align: top; + } + + .diff-gutter-col { + width: 7ch; + } + + .diff-gutter-omit { + height: 0; + } + + .diff-gutter-omit:before { + content: ' '; + display: block; + white-space: pre; + width: 2px; + height: 100%; + margin-left: 4.6ch; + overflow: hidden; + background-color: var(--diff-omit-gutter-line-color); + } + + .diff-decoration { + line-height: 1.5; + user-select: none; + } + + .diff-decoration-content { + font-family: var(--diff-font-family); + padding: 0; + } + `} + /> + + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_4.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_4.tsx new file mode 100644 index 0000000000000..875825ca0c05a --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_4.tsx @@ -0,0 +1,251 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; +import { CodeEditorField } from '@kbn/kibana-react-plugin/public'; +import { XJsonLang } from '@kbn/monaco'; +import { + EuiSpacer, + EuiAccordion, + EuiTitle, + EuiFlexGroup, + EuiHorizontalRule, + useGeneratedHtmlId, +} from '@elastic/eui'; +import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; + +import * as i18n from './translations'; + +const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; + +const FIELD_CONFIG_BY_NAME = { + eql_query: { + label: 'EQL query', + compareMethod: 'diffWordsWithSpace', + }, + name: { + label: 'Name', + compareMethod: 'diffWordsWithSpace', + }, + note: { + label: 'Investigation guide', + compareMethod: 'diffWordsWithSpace', + }, + references: { + label: i18n.REFERENCES_FIELD_LABEL, + compareMethod: 'diffJson', + }, + risk_score: { + // JSON.stringify(fields.risk_score.current_version) + label: i18n.RISK_SCORE_FIELD_LABEL, + compareMethod: 'diffJson', + }, + threat: { + label: 'THREAT', + compareMethod: 'diffJson', + }, + severity: { + label: 'Severity_', + compareMethod: 'diffWords', + }, +}; + +const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }) => { + return ( + <> + { + toggleSection('whole'); + }} + > + + + + + ); +}; + +interface FieldsProps { + fields: Partial; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { + const visibleFields = Object.keys(fields).filter( + (fieldName) => !HIDDEN_FIELDS.includes(fieldName) + ); + + return ( + <> + {visibleFields.map((fieldName) => { + return ( + <> + { + toggleSection(fieldName); + }} + > + + + + + ); + })} + + ); +}; + +interface ExpandableSectionProps { + title: string; + isOpen: boolean; + toggle: () => void; + children: React.ReactNode; +} + +const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { + const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); + + return ( + +

{title}

+ + } + initialIsOpen={true} + > + + + {children} + +
+ ); +}; + +interface RuleDiffTabProps { + fields: Partial; +} + +export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProps) => { + const [openSections, setOpenSections] = useState>( + Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) + ); + + const toggleSection = (sectionName: string) => { + setOpenSections((prevOpenSections) => ({ + ...prevOpenSections, + [sectionName]: !prevOpenSections[sectionName], + })); + }; + + /* + export declare enum DiffMethod { + CHARS = "diffChars", + WORDS = "diffWords", + WORDS_WITH_SPACE = "diffWordsWithSpace", + LINES = "diffLines", + TRIMMED_LINES = "diffTrimmedLines", + SENTENCES = "diffSentences", + CSS = "diffCss", + JSON = "diffJson" +} + */ + + return ( + <> + + + + + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_5.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_5.tsx new file mode 100644 index 0000000000000..53fc173cb0869 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_5.tsx @@ -0,0 +1,240 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState } from 'react'; +import * as Diff2Html from 'diff2html'; +import { formatLines, diffLines } from 'unidiff'; +import 'diff2html/bundles/css/diff2html.min.css'; +import { + EuiSpacer, + EuiAccordion, + EuiTitle, + EuiFlexGroup, + EuiHorizontalRule, + useGeneratedHtmlId, +} from '@elastic/eui'; +import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; + +import * as i18n from './translations'; + +const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; + +const FIELD_CONFIG_BY_NAME = { + eql_query: { + label: 'EQL query', + compareMethod: 'diffWordsWithSpace', + }, + name: { + label: 'Name', + compareMethod: 'diffWordsWithSpace', + }, + note: { + label: 'Investigation guide', + compareMethod: 'diffWordsWithSpace', + }, + references: { + label: i18n.REFERENCES_FIELD_LABEL, + compareMethod: 'diffJson', + }, + risk_score: { + // JSON.stringify(fields.risk_score.current_version) + label: i18n.RISK_SCORE_FIELD_LABEL, + compareMethod: 'diffJson', + }, + threat: { + label: 'THREAT', + compareMethod: 'diffJson', + }, + severity: { + label: 'Severity_', + compareMethod: 'diffWords', + }, +}; + +interface FieldsProps { + fields: Partial; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { + const visibleFields = Object.keys(fields).filter( + (fieldName) => !HIDDEN_FIELDS.includes(fieldName) + ); + + // return ( + // <> + // {visibleFields.map((fieldName) => ( + //
+ // {fieldName} {typeof fields[fieldName]?.current_version} + //
+ // ))} + // + // ); + + return ( + <> + {visibleFields.map((fieldName) => { + const unifiedDiffString = formatLines( + diffLines( + typeof fields[fieldName].current_version === 'string' + ? fields[fieldName].current_version + : JSON.stringify(fields[fieldName].current_version, null, 2), + typeof fields[fieldName].merged_version === 'string' + ? fields[fieldName].merged_version + : JSON.stringify(fields[fieldName].merged_version, null, 2) + ), + { context: 3 } + ); + + console.log('unifiedDiffString', unifiedDiffString); + + const diffHtml = Diff2Html.html(unifiedDiffString, { + inputFormat: 'json', + drawFileList: false, + fileListToggle: false, + fileListStartVisible: false, + fileContentToggle: false, + matching: 'lines', // "lines" or "words" + diffStyle: 'word', // "word" or "char" + outputFormat: 'side-by-side', + synchronisedScroll: true, + highlight: true, + renderNothingWhenEmpty: false, + }); + + return ( + <> + { + toggleSection(fieldName); + }} + > +
+
+ + + ); + })} + + ); +}; + +interface ExpandableSectionProps { + title: string; + isOpen: boolean; + toggle: () => void; + children: React.ReactNode; +} + +const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { + const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); + + return ( + +

{title}

+ + } + initialIsOpen={true} + > + + + {children} + +
+ ); +}; + +const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }) => { + const unifiedDiffString = formatLines( + diffLines( + JSON.stringify(currentRule, Object.keys(currentRule).sort(), 2), + JSON.stringify(mergedRule, Object.keys(mergedRule).sort(), 2) + ), + { context: 3 } + ); + + const diffHtml = Diff2Html.html(unifiedDiffString, { + inputFormat: 'json', + drawFileList: false, + fileListToggle: false, + fileListStartVisible: false, + fileContentToggle: false, + matching: 'lines', // "lines" or "words" + diffStyle: 'word', // "word" or "char" + outputFormat: 'side-by-side', + synchronisedScroll: true, + highlight: true, + renderNothingWhenEmpty: false, + }); + + return ( + <> + { + toggleSection('whole'); + }} + > +
+
+ + + ); +}; + +interface RuleDiffTabProps { + fields: Partial; +} + +export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProps) => { + const [openSections, setOpenSections] = useState>( + Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) + ); + + const toggleSection = (sectionName: string) => { + setOpenSections((prevOpenSections) => ({ + ...prevOpenSections, + [sectionName]: !prevOpenSections[sectionName], + })); + }; + + /* + export declare enum DiffMethod { + CHARS = "diffChars", + WORDS = "diffWords", + WORDS_WITH_SPACE = "diffWordsWithSpace", + LINES = "diffLines", + TRIMMED_LINES = "diffTrimmedLines", + SENTENCES = "diffSentences", + CSS = "diffCss", + JSON = "diffJson" +} + */ + + return ( + <> + + + + + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx index 238201c2440f0..ba3ddc9866070 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx @@ -33,7 +33,11 @@ import * as i18n from './translations'; import { MlJobUpgradeModal } from '../../../../../detections/components/modals/ml_job_upgrade_modal'; // import { RuleDiffTab } from '../../../../rule_management/components/rule_details/rule_diff_tab'; -import { RuleDiffTab } from '../../../../rule_management/components/rule_details/rule_diff_tab_2'; +import { RuleDiffTab as RuleDiffTab1 } from '../../../../rule_management/components/rule_details/rule_diff_tab_1'; +import { RuleDiffTab as RuleDiffTab2 } from '../../../../rule_management/components/rule_details/rule_diff_tab_2'; +import { RuleDiffTab as RuleDiffTab3 } from '../../../../rule_management/components/rule_details/rule_diff_tab_3'; +import { RuleDiffTab as RuleDiffTab4 } from '../../../../rule_management/components/rule_details/rule_diff_tab_4'; +import { RuleDiffTab as RuleDiffTab5 } from '../../../../rule_management/components/rule_details/rule_diff_tab_5'; // import * as ruleDetailsI18n from '../../../../rule_management/components/rule_details/translations.ts'; export interface UpgradePrebuiltRulesTableState { @@ -296,23 +300,84 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ } getRuleTabs={(rule, defaultTabs) => { - const diff = filteredRules.find(({ id }) => rule.id)?.diff; + const activeRule = filteredRules.find(({ id }) => rule.id); + const diff = activeRule?.diff; if (!diff) { return defaultTabs; } - const diffTab = { - id: 'diff', - name: 'ruleDetailsI18n.DIFF_TAB_LABEL', + const diffTab1 = { + id: 'diff1', + name: 'elastic-poc', content: ( - + ), }; - return [diffTab, ...defaultTabs]; + const diffTab2 = { + id: 'diff2', + name: 'react-diff-viewer-continued', + content: ( + + + + ), + }; + + const diffTab3 = { + id: 'diff3', + name: 'react-diff-view', + content: ( + + + + ), + }; + + const diffTab4 = { + id: 'diff4', + name: 'monaco', + content: ( + + + + ), + }; + + const diffTab5 = { + id: 'diff5', + name: 'diff2html', + content: ( + + + + ), + }; + + return [diffTab2, diffTab3, diffTab4, diffTab5, diffTab1, ...defaultTabs]; }} /> )} diff --git a/yarn.lock b/yarn.lock index b1ccf99cdb77d..a427e8dfe311c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14909,11 +14909,26 @@ diff-sequences@^29.4.3: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2" integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== +diff2html@^3.1.6, diff2html@^3.4.45: + version "3.4.45" + resolved "https://registry.yarnpkg.com/diff2html/-/diff2html-3.4.45.tgz#6b8cc7af9bb18359635527e5128f40cf3d34ef94" + integrity sha512-1SxsjYZYbxX0GGMYJJM7gM0SpMSHqzvvG0UJVROCDpz4tylH2T+EGiinm2boDmTrMlLueVxGfKNxGNLZ9zDlkQ== + dependencies: + diff "5.1.0" + hogan.js "3.0.2" + optionalDependencies: + highlight.js "11.8.0" + diff@5.0.0, diff@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== +diff@5.1.0, diff@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" + integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== + diff@^1.3.2: version "1.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" @@ -14929,11 +14944,6 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -diff@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" - integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== - diffie-hellman@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" @@ -14943,6 +14953,13 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +difflib@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" + integrity sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w== + dependencies: + heap ">= 0.2.0" + digest-fetch@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/digest-fetch/-/digest-fetch-1.3.0.tgz#898e69264d00012a23cf26e8a3e40320143fc661" @@ -18243,6 +18260,11 @@ he@1.2.0, he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +"heap@>= 0.2.0": + version "0.2.7" + resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" + integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== + heap@^0.2.6: version "0.2.6" resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" @@ -18253,6 +18275,11 @@ hexoid@^1.0.0: resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-1.0.0.tgz#ad10c6573fb907de23d9ec63a711267d9dc9bc18" integrity sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g== +highlight.js@11.8.0: + version "11.8.0" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.8.0.tgz#966518ea83257bae2e7c9a48596231856555bb65" + integrity sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg== + highlight.js@^10.1.1, highlight.js@~10.4.0: version "10.4.1" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.4.1.tgz#d48fbcf4a9971c4361b3f95f302747afe19dbad0" @@ -18291,6 +18318,14 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +hogan.js@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/hogan.js/-/hogan.js-3.0.2.tgz#4cd9e1abd4294146e7679e41d7898732b02c7bfd" + integrity sha512-RqGs4wavGYJWE07t35JQccByczmNUXQT0E12ZYV1VKYu5UiAU9lsos/yBAcf840+zrUQQxgVduCR5/B8nNtibg== + dependencies: + mkdirp "0.3.0" + nopt "1.0.10" + hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.5, hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" @@ -22322,6 +22357,11 @@ mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== +mkdirp@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" + integrity sha512-OHsdUcVAQ6pOtg5JYWpCBo9W/GySVuwvP9hueRMW7UqshC0tbfzLv8wjySTPm3tfUZ/21CE9E1pJagOA91Pxew== + "mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" @@ -23013,6 +23053,13 @@ nodemailer@^6.6.2: resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.6.2.tgz#e184c9ed5bee245a3e0bcabc7255866385757114" integrity sha512-YSzu7TLbI+bsjCis/TZlAXBoM4y93HhlIgo0P5oiA2ua9Z4k+E2Fod//ybIzdJxOlXGRcHIh/WaeCBehvxZb/Q== +nopt@1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" + integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== + dependencies: + abbrev "1" + nopt@^4.0.1, nopt@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" @@ -25497,6 +25544,16 @@ react-focus-on@^3.9.1: use-callback-ref "^1.3.0" use-sidecar "^1.1.2" +react-gh-like-diff@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/react-gh-like-diff/-/react-gh-like-diff-2.0.2.tgz#9a0f91511d7af20407666e5950d2056db0600d62" + integrity sha512-Cd5Kjijx74kz0POQNCSRvFnpfvY4E28NxWea8z0UPZ1J6b2RThRkMBfoD/FwaFvrT/7XeYk5SrQ8qtc0e8iRoA== + dependencies: + diff2html "^3.1.6" + difflib "^0.2.4" + prop-types "^15.7.2" + recompose "^0.30.0" + react-grid-layout@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/react-grid-layout/-/react-grid-layout-1.3.4.tgz#4fa819be24a1ba9268aa11b82d63afc4762a32ff" @@ -29559,6 +29616,13 @@ unicode-trie@^2.0.0: pako "^0.2.5" tiny-inflate "^1.0.0" +unidiff@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unidiff/-/unidiff-1.0.4.tgz#45096a898285821c51e22e84be4215c05d6511cd" + integrity sha512-ynU0vsAXw0ir8roa+xPCUHmnJ5goc5BTM2Kuc3IJd8UwgaeRs7VSD5+eeaQL+xp1JtB92hu/Zy/Lgy7RZcr1pQ== + dependencies: + diff "^5.1.0" + unified@9.2.0: version "9.2.0" resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.0.tgz#67a62c627c40589edebbf60f53edfd4d822027f8" From 48e2a9e940521cea6d7d38a2dada05672081c123 Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Mon, 27 Nov 2023 12:23:48 +0100 Subject: [PATCH 3/9] Add comments --- package.json | 7 +- .../rule_details/mark_edits_by_word.tsx | 189 ++++++ .../rule_details/rule_diff_tab_2.tsx | 193 ------ .../rule_details/rule_diff_tab_3.tsx | 625 ------------------ ...rule_diff_tab_app_experience_team_poc.tsx} | 96 +-- ..._tab_5.tsx => rule_diff_tab_diff2html.tsx} | 111 +--- ...iff_tab_4.tsx => rule_diff_tab_monaco.tsx} | 106 +-- .../rule_diff_tab_react_diff_view.tsx | 572 ++++++++++++++++ ...e_diff_tab_react_diff_viewer_continued.tsx | 285 ++++++++ .../components/rule_details/unidiff.d.ts | 16 + .../upgrade_prebuilt_rules_table_context.tsx | 79 ++- yarn.lock | 18 +- 12 files changed, 1227 insertions(+), 1070 deletions(-) create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/mark_edits_by_word.tsx delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_3.tsx rename x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/{rule_diff_tab_1.tsx => rule_diff_tab_app_experience_team_poc.tsx} (77%) rename x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/{rule_diff_tab_5.tsx => rule_diff_tab_diff2html.tsx} (65%) rename x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/{rule_diff_tab_4.tsx => rule_diff_tab_monaco.tsx} (70%) create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/unidiff.d.ts diff --git a/package.json b/package.json index 5fec36e5c13c3..273efb69af50d 100644 --- a/package.json +++ b/package.json @@ -910,6 +910,8 @@ "deep-freeze-strict": "^1.1.1", "deepmerge": "^4.2.2", "del": "^6.1.0", + "diff-match-patch": "^1.0.5", + "diff-match-patch-line-and-word": "^0.1.3", "diff2html": "^3.4.45", "elastic-apm-node": "^4.1.0", "email-addresses": "^5.0.0", @@ -1018,7 +1020,7 @@ "react": "^17.0.2", "react-ace": "^7.0.5", "react-color": "^2.13.8", - "react-diff-view": "^3.1.0", + "react-diff-view": "^3.2.0", "react-diff-viewer": "^3.1.1", "react-diff-viewer-continued": "^3.3.1", "react-dom": "^17.0.2", @@ -1338,6 +1340,7 @@ "@types/dedent": "^0.7.0", "@types/deep-freeze-strict": "^1.1.0", "@types/delete-empty": "^2.0.0", + "@types/diff": "^5.0.8", "@types/ejs": "^3.0.6", "@types/enzyme": "^3.10.12", "@types/eslint": "^8.44.2", @@ -1645,4 +1648,4 @@ "yargs": "^15.4.1", "yarn-deduplicate": "^6.0.2" } -} \ No newline at end of file +} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/mark_edits_by_word.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/mark_edits_by_word.tsx new file mode 100644 index 0000000000000..80f9b3c205705 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/mark_edits_by_word.tsx @@ -0,0 +1,189 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { findIndex, flatMap, flatten } from 'lodash'; +import DiffMatchPatch, { Diff } from 'diff-match-patch'; +import 'diff-match-patch-line-and-word'; +import { isDelete, isInsert, isNormal, pickRanges } from 'react-diff-view'; +import type { ChangeData, HunkData, RangeTokenNode, TokenizeEnhancer } from 'react-diff-view'; + +const { DIFF_EQUAL, DIFF_DELETE, DIFF_INSERT } = DiffMatchPatch; + +function findChangeBlocks(changes: ChangeData[]): ChangeData[][] { + const start = findIndex(changes, (change) => !isNormal(change)); + + if (start === -1) { + return []; + } + + const end = findIndex(changes, (change) => !!isNormal(change), start); + + if (end === -1) { + return [changes.slice(start)]; + } + + return [changes.slice(start, end), ...findChangeBlocks(changes.slice(end))]; +} + +function groupDiffs(diffs: Diff[]): [Diff[], Diff[]] { + return diffs.reduce<[Diff[], Diff[]]>( + ([oldDiffs, newDiffs], diff) => { + const [type] = diff; + + switch (type) { + case DIFF_INSERT: + newDiffs.push(diff); + break; + case DIFF_DELETE: + oldDiffs.push(diff); + break; + default: + oldDiffs.push(diff); + newDiffs.push(diff); + break; + } + + return [oldDiffs, newDiffs]; + }, + [[], []] + ); +} + +function splitDiffToLines(diffs: Diff[]): Diff[][] { + return diffs.reduce( + (lines, [type, value]) => { + const currentLines = value.split('\n'); + + const [currentLineRemaining, ...nextLines] = currentLines.map( + (line: string): Diff => [type, line] + ); + const next: Diff[][] = [ + ...lines.slice(0, -1), + [...lines[lines.length - 1], currentLineRemaining], + ...nextLines.map((line: string) => [line]), + ]; + return next; + }, + [[]] + ); +} + +function diffsToEdits(diffs: Diff[], lineNumber: number): RangeTokenNode[] { + const output = diffs.reduce<[RangeTokenNode[], number]>( + // eslint-disable-next-line @typescript-eslint/no-shadow + (output, diff) => { + const [edits, start] = output; + const [type, value] = diff; + if (type !== DIFF_EQUAL) { + const edit: RangeTokenNode = { + type: 'edit', + lineNumber, + start, + length: value.length, + }; + edits.push(edit); + } + + return [edits, start + value.length]; + }, + [[], 0] + ); + + return output[0]; +} + +function convertToLinesOfEdits(linesOfDiffs: Diff[][], startLineNumber: number) { + return flatMap(linesOfDiffs, (diffs, i) => diffsToEdits(diffs, startLineNumber + i)); +} + +function diffByWord(x: string, y: string): [Diff[], Diff[]] { + /* + This is a modified version of "diffText" from react-diff-view. + Original: https://github.com/otakustay/react-diff-view/blob/49cebd0958ef323c830395c1a1da601560a71781/src/tokenize/markEdits.ts#L96 + */ + const dmp = new DiffMatchPatch(); + /* + "diff_wordMode" comes from "diff-match-patch-line-and-word". + "diff-match-patch-line-and-word" adds word-level diffing to Google's "diff-match-patch" lib by + adding a new method "diff_wordMode" to the prototype of DiffMatchPatch. + There's an instruction how to do it in the "diff-match-patch" docs and somebody just made it into a package. + https://github.com/google/diff-match-patch/wiki/Line-or-Word-Diffs#word-mode + */ + const diffs = dmp.diff_wordMode(x, y); + + if (diffs.length <= 1) { + return [[], []]; + } + + return groupDiffs(diffs); +} + +function diffChangeBlock(changes: ChangeData[]): [RangeTokenNode[], RangeTokenNode[]] { + /* Convert ChangeData array to two strings representing old source and new source of a change block, like + + "created_at": "2023-11-20T16:47:52.801Z", + "created_by": "elastic", + ... + + and + + "created_at": "1970-01-01T00:00:00.000Z", + "created_by": "", + ... + */ + const [oldSource, newSource] = changes.reduce( + // eslint-disable-next-line @typescript-eslint/no-shadow + ([oldSource, newSource], change) => + isDelete(change) + ? [oldSource + (oldSource ? '\n' : '') + change.content, newSource] + : [oldSource, newSource + (newSource ? '\n' : '') + change.content], + ['', ''] + ); + + const [oldDiffs, newDiffs] = diffByWord(oldSource, newSource); // <-- That's basically the only change I made to allow word-level diffing + + if (oldDiffs.length === 0 && newDiffs.length === 0) { + return [[], []]; + } + + const getLineNumber = (change: ChangeData | undefined) => { + if (!change || isNormal(change)) { + return undefined; + } + + return change.lineNumber; + }; + const oldStartLineNumber = getLineNumber(changes.find(isDelete)); + const newStartLineNumber = getLineNumber(changes.find(isInsert)); + + if (oldStartLineNumber === undefined || newStartLineNumber === undefined) { + throw new Error('Could not find start line number for edit'); + } + + const oldEdits = convertToLinesOfEdits(splitDiffToLines(oldDiffs), oldStartLineNumber); + const newEdits = convertToLinesOfEdits(splitDiffToLines(newDiffs), newStartLineNumber); + + return [oldEdits, newEdits]; +} + +export function markEditsByWord(hunks: HunkData[]): TokenizeEnhancer { + const changeBlocks = flatMap( + hunks.map((hunk) => hunk.changes), + findChangeBlocks + ); + + const [oldEdits, newEdits] = changeBlocks.map(diffChangeBlock).reduce( + // eslint-disable-next-line @typescript-eslint/no-shadow + ([oldEdits, newEdits], [currentOld, currentNew]) => [ + oldEdits.concat(currentOld), + newEdits.concat(currentNew), + ], + [[], []] + ); + + return pickRanges(flatten(oldEdits), flatten(newEdits)); +} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx deleted file mode 100644 index 3318b32b89d1e..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_2.tsx +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useState } from 'react'; -import ReactDiffViewer from 'react-diff-viewer-continued'; -import { - EuiSpacer, - EuiAccordion, - EuiTitle, - EuiFlexGroup, - EuiHorizontalRule, - useGeneratedHtmlId, -} from '@elastic/eui'; -import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; - -import * as i18n from './translations'; - -const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; - -const FIELD_CONFIG_BY_NAME = { - eql_query: { - label: 'EQL query', - compareMethod: 'diffWordsWithSpace', - }, - kql_query: { - label: 'KQL query', - compareMethod: 'diffWordsWithSpace', - }, - description: { - label: 'Description', - compareMethod: 'diffWordsWithSpace', - }, - name: { - label: 'Name', - compareMethod: 'diffWordsWithSpace', - }, - note: { - label: 'Investigation guide', - compareMethod: 'diffWordsWithSpace', - }, - references: { - label: i18n.REFERENCES_FIELD_LABEL, - compareMethod: 'diffJson', - }, - risk_score: { - // JSON.stringify(fields.risk_score.current_version) - label: i18n.RISK_SCORE_FIELD_LABEL, - compareMethod: 'diffJson', - }, - threat: { - label: 'THREAT', - compareMethod: 'diffJson', - }, - severity: { - label: 'Severity', - compareMethod: 'diffWords', - }, -}; - -interface FieldsProps { - fields: Partial; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { - const visibleFields = Object.keys(fields).filter( - (fieldName) => !HIDDEN_FIELDS.includes(fieldName) - ); - - return ( - <> - {visibleFields.map((fieldName) => { - return ( - <> - { - toggleSection(fieldName); - }} - > - - - - - ); - })} - - ); -}; - -interface ExpandableSectionProps { - title: string; - isOpen: boolean; - toggle: () => void; - children: React.ReactNode; -} - -const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { - const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); - - return ( - -

{title}

- - } - initialIsOpen={true} - > - - - {children} - -
- ); -}; - -const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }) => { - return ( - <> - { - toggleSection('whole'); - }} - > - - - - - ); -}; - -interface RuleDiffTabProps { - fields: Partial; -} - -export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProps) => { - const [openSections, setOpenSections] = useState>( - Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) - ); - - const toggleSection = (sectionName: string) => { - setOpenSections((prevOpenSections) => ({ - ...prevOpenSections, - [sectionName]: !prevOpenSections[sectionName], - })); - }; - - return ( - <> - - - - - ); -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_3.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_3.tsx deleted file mode 100644 index ae8c49a03483f..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_3.tsx +++ /dev/null @@ -1,625 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useState, useCallback, useMemo } from 'react'; -import type { ReactElement } from 'react'; -import { uniqueId } from 'lodash'; -import { - Diff, - Hunk, - useSourceExpansion, - useMinCollapsedLines, - HunkData, - MarkEditsType, - DiffType, - GutterOptions, - Decoration, - DecorationProps, - getCollapsedLinesCountBetween, - parseDiff, - tokenize, - markEdits, - markWord, -} from 'react-diff-view'; -import { formatLines, diffLines } from 'unidiff'; -import { Global, css } from '@emotion/react'; -// import 'react-diff-view/styles/index.css'; -import { - EuiSpacer, - EuiAccordion, - EuiTitle, - EuiFlexGroup, - EuiHorizontalRule, - useGeneratedHtmlId, -} from '@elastic/eui'; -import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; - -import * as i18n from './translations'; - -const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; - -const FIELD_CONFIG_BY_NAME = { - eql_query: { - label: 'EQL query', - compareMethod: 'diffWordsWithSpace', - }, - name: { - label: 'Name', - compareMethod: 'diffWordsWithSpace', - }, - note: { - label: 'Investigation guide', - compareMethod: 'diffWordsWithSpace', - }, - references: { - label: i18n.REFERENCES_FIELD_LABEL, - compareMethod: 'diffJson', - }, - risk_score: { - // JSON.stringify(fields.risk_score.current_version) - label: i18n.RISK_SCORE_FIELD_LABEL, - compareMethod: 'diffJson', - }, - threat: { - label: 'THREAT', - compareMethod: 'diffJson', - }, - severity: { - label: 'Severity_', - compareMethod: 'diffWords', - }, -}; - -const tokenizeFn = (hunks) => { - console.log('hunks', hunks); - if (!hunks) { - return undefined; - } - - const options = { - highlight: false, - enhancers: [markEdits(hunks, { type: 'block' }), markWord('description', 'description_id')], - }; - - try { - return tokenize(hunks, options); - } catch (ex) { - return undefined; - } -}; - -function fakeIndex() { - return uniqueId().slice(0, 9); -} - -function appendGitDiffHeaderIfNeeded(diffText: string) { - console.log('appendGitDiffHeaderIfNeeded INPUT', diffText); - if (diffText.startsWith('diff --git')) { - return diffText; - } - - const segments = ['diff --git a/a b/b', `index ${fakeIndex()}..${fakeIndex()} 100644`, diffText]; - return segments.join('\n'); -} - -interface HunkInfoProps extends Omit { - hunk: HunkData; -} - -function HunkInfo({ hunk, ...props }: HunkInfoProps) { - return ( - - {null} - {hunk.content} - - ); -} - -interface UnfoldProps extends Omit { - start: number; - end: number; - direction: 'up' | 'down' | 'none'; - onExpand: (start: number, end: number) => void; -} - -function Unfold({ start, end, direction, onExpand, ...props }: UnfoldProps) { - const expand = useCallback(() => onExpand(start, end), [onExpand, start, end]); - - const lines = end - start; - - return ( - -
 Expand hidden {lines} lines
-
- ); -} - -interface UnfoldCollapsedProps { - previousHunk: HunkData; - currentHunk?: HunkData; - linesCount: number; - onExpand: (start: number, end: number) => void; -} - -function UnfoldCollapsed({ - previousHunk, - currentHunk, - linesCount, - onExpand, -}: UnfoldCollapsedProps) { - if (!currentHunk) { - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - const nextStart = previousHunk.oldStart + previousHunk.oldLines; - const collapsedLines = linesCount - nextStart + 1; - - if (collapsedLines <= 0) { - return null; - } - - return ( - <> - {collapsedLines > 10 && ( - - )} - - - ); - } - - const collapsedLines = getCollapsedLinesCountBetween(previousHunk, currentHunk); - - if (!previousHunk) { - if (!collapsedLines) { - return null; - } - - const start = Math.max(currentHunk.oldStart - 10, 1); - - return ( - <> - - {collapsedLines > 10 && ( - - )} - - ); - } - - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - const collapsedStart = previousHunk.oldStart + previousHunk.oldLines; - const collapsedEnd = currentHunk.oldStart; - - if (collapsedLines < 10) { - return ( - - ); - } - - return ( - <> - {/* eslint-disable-next-line @typescript-eslint/restrict-plus-operands */} - - - - - ); -} - -interface EnhanceOptions { - language: string; - editsType: MarkEditsType; -} - -function useEnhance( - hunks: HunkData[], - oldSource: string | null, - { language, editsType }: EnhanceOptions -) { - const [hunksWithSourceExpanded, expandRange] = useSourceExpansion(hunks, oldSource); // Operates on hunks to allow "expansion" behaviour - substitutes two hunks with one hunk including data from two hunks and everything in between - const hunksWithMinLinesCollapsed = useMinCollapsedLines(0, hunksWithSourceExpanded, oldSource); - - return { - expandRange, - hunks: hunksWithMinLinesCollapsed, - }; -} - -const renderToken = (token, defaultRender, i) => { - switch (token.type) { - case 'space': - console.log(token); - return ( - - {token.children && token.children.map((token, i) => renderToken(token, defaultRender, i))} - - ); - default: - return defaultRender(token, i); - } -}; - -interface Props { - oldSource: string | null; - type: DiffType; - hunks: HunkData[]; -} - -function DiffView(props: Props) { - const { oldSource, type } = props; - const configuration = { - viewType: 'split', - editsType: 'block', - showGutter: true, - language: 'text', - } as const; - - const { expandRange, hunks } = useEnhance(props.hunks, oldSource, configuration); - - const { viewType, showGutter } = configuration; - const renderGutter = useCallback( - ({ change, side, inHoverState, renderDefault, wrapInAnchor }: GutterOptions) => { - return wrapInAnchor(renderDefault()); - }, - [] - ); - - const linesCount = oldSource ? oldSource.split('\n').length : 0; - // eslint-disable-next-line @typescript-eslint/no-shadow - const renderHunk = (children: ReactElement[], hunk: HunkData, i: number, hunks: HunkData[]) => { - const previousElement = children[children.length - 1]; - const decorationElement = oldSource ? ( - - ) : ( - - ); - children.push(decorationElement); - - const hunkElement = ; - children.push(hunkElement); - - if (i === hunks.length - 1 && oldSource) { - const unfoldTailElement = ( - - ); - children.push(unfoldTailElement); - } - - return children; - }; - - return ( - - {(hunks) => hunks.reduce(renderHunk, [])} - - ); -} - -interface FieldsProps { - fields: Partial; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { - const visibleFields = Object.keys(fields).filter( - (fieldName) => !HIDDEN_FIELDS.includes(fieldName) - ); - - return ( - <> - {visibleFields.map((fieldName) => { - const oldSource = JSON.stringify(fields[fieldName]?.current_version, null, 2); - const newSource = JSON.stringify(fields[fieldName]?.merged_version, null, 2); - - const diff = formatLines(diffLines(oldSource, newSource), { context: 3 }); - - const [file] = parseDiff(appendGitDiffHeaderIfNeeded(diff), { - nearbySequences: 'zip', - }); - - return ( - <> - { - toggleSection(fieldName); - }} - > - - - - - ); - })} - - ); -}; - -interface ExpandableSectionProps { - title: string; - isOpen: boolean; - toggle: () => void; - children: React.ReactNode; -} - -const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { - const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); - - return ( - -

{title}

- - } - initialIsOpen={true} - > - - - {children} - -
- ); -}; - -const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }) => { - const oldSource = JSON.stringify(currentRule, Object.keys(currentRule).sort(), 2); - const newSource = JSON.stringify(mergedRule, Object.keys(mergedRule).sort(), 2); - - const diff = formatLines(diffLines(oldSource, newSource), { context: 3 }); - - const [file] = parseDiff(appendGitDiffHeaderIfNeeded(diff), { - nearbySequences: 'zip', - }); - - const tokens = useMemo(() => tokenizeFn(file.hunks), [file.hunks]); - - return ( - <> - { - toggleSection('whole'); - }} - > - - - - - ); -}; - -interface RuleDiffTabProps { - fields: Partial; -} - -export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProps) => { - const [openSections, setOpenSections] = useState>( - Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) - ); - - const toggleSection = (sectionName: string) => { - setOpenSections((prevOpenSections) => ({ - ...prevOpenSections, - [sectionName]: !prevOpenSections[sectionName], - })); - }; - - /* - export declare enum DiffMethod { - CHARS = "diffChars", - WORDS = "diffWords", - WORDS_WITH_SPACE = "diffWordsWithSpace", - LINES = "diffLines", - TRIMMED_LINES = "diffTrimmedLines", - SENTENCES = "diffSentences", - CSS = "diffCss", - JSON = "diffJson" -} - */ - - return ( - <> - - - - a { - color: inherit; - display: block; - } - - .diff-gutter { - padding: 0 1ch; - text-align: right; - cursor: pointer; - user-select: none; - } - - .diff-gutter-insert { - background-color: var(--diff-gutter-insert-background-color); - color: var(--diff-gutter-insert-text-color); - } - - .diff-gutter-delete { - background-color: var(--diff-gutter-delete-background-color); - color: var(--diff-gutter-delete-text-color); - } - - .diff-gutter-omit { - cursor: default; - } - - .diff-gutter-selected { - background-color: var(--diff-gutter-selected-background-color); - color: var(--diff-gutter-selected-text-color); - } - - .diff-code { - white-space: pre-wrap; - word-wrap: break-word; - word-break: break-all; - padding: 0 0 0 0.5em; - } - - .diff-code-edit { - color: inherit; - } - - .diff-code-insert { - background-color: var(--diff-code-insert-background-color); - color: var(--diff-code-insert-text-color); - } - - .diff-code-insert .diff-code-edit { - background-color: var(--diff-code-insert-edit-background-color); - color: var(--diff-code-insert-edit-text-color); - } - - .diff-code-delete { - background-color: var(--diff-code-delete-background-color); - color: var(--diff-code-delete-text-color); - } - - .diff-code-delete .diff-code-edit { - background-color: var(--diff-code-delete-edit-background-color); - color: var(--diff-code-delete-edit-text-color); - } - - .diff-code-selected { - background-color: var(--diff-code-selected-background-color); - color: var(--diff-code-selected-text-color); - } - - .diff-widget-content { - vertical-align: top; - } - - .diff-gutter-col { - width: 7ch; - } - - .diff-gutter-omit { - height: 0; - } - - .diff-gutter-omit:before { - content: ' '; - display: block; - white-space: pre; - width: 2px; - height: 100%; - margin-left: 4.6ch; - overflow: hidden; - background-color: var(--diff-omit-gutter-line-color); - } - - .diff-decoration { - line-height: 1.5; - user-select: none; - } - - .diff-decoration-content { - font-family: var(--diff-font-family); - padding: 0; - } - `} - /> - - ); -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_1.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx similarity index 77% rename from x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_1.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx index e579b3401077e..f92ebd24a1ca0 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_1.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx @@ -6,9 +6,10 @@ */ import React, { useState, useMemo } from 'react'; -import { Change, diffLines } from 'diff'; import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; +import { get } from 'lodash'; +import { Change, diffLines } from 'diff'; import { EuiSpacer, EuiAccordion, @@ -20,43 +21,10 @@ import { tint, } from '@elastic/eui'; import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; - -import * as i18n from './translations'; +import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; -const FIELD_CONFIG_BY_NAME = { - eql_query: { - label: 'EQL query', - compareMethod: 'diffWordsWithSpace', - }, - name: { - label: 'Name', - compareMethod: 'diffWordsWithSpace', - }, - note: { - label: 'Investigation guide', - compareMethod: 'diffWordsWithSpace', - }, - references: { - label: i18n.REFERENCES_FIELD_LABEL, - compareMethod: 'diffJson', - }, - risk_score: { - // JSON.stringify(fields.risk_score.current_version) - label: i18n.RISK_SCORE_FIELD_LABEL, - compareMethod: 'diffJson', - }, - threat: { - label: 'THREAT', - compareMethod: 'diffJson', - }, - severity: { - label: 'Severity_', - compareMethod: 'diffWords', - }, -}; - const indicatorCss = css` position: absolute; width: ${euiThemeVars.euiSizeS}; @@ -168,33 +136,21 @@ const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { (fieldName) => !HIDDEN_FIELDS.includes(fieldName) ); - // return ( - // <> - // {visibleFields.map((fieldName) => ( - //
- // {fieldName} {typeof fields[fieldName]?.current_version} - //
- // ))} - // - // ); - return ( <> {visibleFields.map((fieldName) => { - const diff = diffLines( - typeof fields[fieldName].current_version === 'string' - ? fields[fieldName].current_version - : JSON.stringify(fields[fieldName].current_version, null, 2), - typeof fields[fieldName].merged_version === 'string' - ? fields[fieldName].merged_version - : JSON.stringify(fields[fieldName].merged_version, null, 2), - { ignoreWhitespace: false } - ); + const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); + const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); + + const oldSource = JSON.stringify(currentVersion, null, 2); + const newSource = JSON.stringify(mergedVersion, null, 2); + + const diff = diffLines(oldSource, newSource, { ignoreWhitespace: false }); return ( <> { toggleSection(fieldName); @@ -251,8 +207,26 @@ const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectio ); }; -const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }) => { - const diff = diffLines(JSON.stringify(currentRule), JSON.stringify(mergedRule), { +const sortAndStringifyJson = (jsObject: Record): string => + JSON.stringify(jsObject, Object.keys(jsObject).sort(), 2); + +interface WholeObjectDiffProps { + oldRule: RuleResponse; + newRule: RuleResponse; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const WholeObjectDiff = ({ + oldRule, + newRule, + openSections, + toggleSection, +}: WholeObjectDiffProps) => { + const oldSource = sortAndStringifyJson(oldRule); + const newSource = sortAndStringifyJson(newRule); + + const diff = diffLines(JSON.stringify(oldSource), JSON.stringify(newSource), { ignoreWhitespace: false, }); @@ -283,10 +257,12 @@ const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }; interface RuleDiffTabProps { + oldRule: RuleResponse; + newRule: RuleResponse; fields: Partial; } -export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProps) => { +export const RuleDiffTabAppExperienceTeamPoc = ({ fields, oldRule, newRule }: RuleDiffTabProps) => { const [openSections, setOpenSections] = useState>( Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) ); @@ -302,8 +278,8 @@ export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProp <> diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_5.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx similarity index 65% rename from x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_5.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx index 53fc173cb0869..3b996215371ce 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_5.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx @@ -7,6 +7,7 @@ import React, { useState } from 'react'; import * as Diff2Html from 'diff2html'; +import { get } from 'lodash'; import { formatLines, diffLines } from 'unidiff'; import 'diff2html/bundles/css/diff2html.min.css'; import { @@ -18,43 +19,10 @@ import { useGeneratedHtmlId, } from '@elastic/eui'; import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; - -import * as i18n from './translations'; +import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; -const FIELD_CONFIG_BY_NAME = { - eql_query: { - label: 'EQL query', - compareMethod: 'diffWordsWithSpace', - }, - name: { - label: 'Name', - compareMethod: 'diffWordsWithSpace', - }, - note: { - label: 'Investigation guide', - compareMethod: 'diffWordsWithSpace', - }, - references: { - label: i18n.REFERENCES_FIELD_LABEL, - compareMethod: 'diffJson', - }, - risk_score: { - // JSON.stringify(fields.risk_score.current_version) - label: i18n.RISK_SCORE_FIELD_LABEL, - compareMethod: 'diffJson', - }, - threat: { - label: 'THREAT', - compareMethod: 'diffJson', - }, - severity: { - label: 'Severity_', - compareMethod: 'diffWords', - }, -}; - interface FieldsProps { fields: Partial; openSections: Record; @@ -66,32 +34,16 @@ const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { (fieldName) => !HIDDEN_FIELDS.includes(fieldName) ); - // return ( - // <> - // {visibleFields.map((fieldName) => ( - //
- // {fieldName} {typeof fields[fieldName]?.current_version} - //
- // ))} - // - // ); - return ( <> {visibleFields.map((fieldName) => { - const unifiedDiffString = formatLines( - diffLines( - typeof fields[fieldName].current_version === 'string' - ? fields[fieldName].current_version - : JSON.stringify(fields[fieldName].current_version, null, 2), - typeof fields[fieldName].merged_version === 'string' - ? fields[fieldName].merged_version - : JSON.stringify(fields[fieldName].merged_version, null, 2) - ), - { context: 3 } - ); + const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); + const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); + + const oldSource = JSON.stringify(currentVersion, null, 2); + const newSource = JSON.stringify(mergedVersion, null, 2); - console.log('unifiedDiffString', unifiedDiffString); + const unifiedDiffString = formatLines(diffLines(oldSource, newSource), { context: 3 }); const diffHtml = Diff2Html.html(unifiedDiffString, { inputFormat: 'json', @@ -110,13 +62,13 @@ const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { return ( <> { toggleSection(fieldName); }} > -
+
@@ -157,12 +109,24 @@ const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectio ); }; -const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }) => { +const sortAndStringifyJson = (jsObject: Record): string => + JSON.stringify(jsObject, Object.keys(jsObject).sort(), 2); + +interface WholeObjectDiffProps { + oldRule: RuleResponse; + newRule: RuleResponse; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const WholeObjectDiff = ({ + oldRule, + newRule, + openSections, + toggleSection, +}: WholeObjectDiffProps) => { const unifiedDiffString = formatLines( - diffLines( - JSON.stringify(currentRule, Object.keys(currentRule).sort(), 2), - JSON.stringify(mergedRule, Object.keys(mergedRule).sort(), 2) - ), + diffLines(sortAndStringifyJson(oldRule), sortAndStringifyJson(newRule)), { context: 3 } ); @@ -197,10 +161,12 @@ const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }; interface RuleDiffTabProps { + oldRule: RuleResponse; + newRule: RuleResponse; fields: Partial; } -export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProps) => { +export const RuleDiffTabDiff2Html = ({ fields, oldRule, newRule }: RuleDiffTabProps) => { const [openSections, setOpenSections] = useState>( Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) ); @@ -212,25 +178,12 @@ export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProp })); }; - /* - export declare enum DiffMethod { - CHARS = "diffChars", - WORDS = "diffWords", - WORDS_WITH_SPACE = "diffWordsWithSpace", - LINES = "diffLines", - TRIMMED_LINES = "diffTrimmedLines", - SENTENCES = "diffSentences", - CSS = "diffCss", - JSON = "diffJson" -} - */ - return ( <> diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_4.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx similarity index 70% rename from x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_4.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx index 875825ca0c05a..f32a9287d3a31 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_4.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx @@ -8,6 +8,7 @@ import React, { useState } from 'react'; import { CodeEditorField } from '@kbn/kibana-react-plugin/public'; import { XJsonLang } from '@kbn/monaco'; +import { get } from 'lodash'; import { EuiSpacer, EuiAccordion, @@ -17,44 +18,26 @@ import { useGeneratedHtmlId, } from '@elastic/eui'; import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; - -import * as i18n from './translations'; +import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; -const FIELD_CONFIG_BY_NAME = { - eql_query: { - label: 'EQL query', - compareMethod: 'diffWordsWithSpace', - }, - name: { - label: 'Name', - compareMethod: 'diffWordsWithSpace', - }, - note: { - label: 'Investigation guide', - compareMethod: 'diffWordsWithSpace', - }, - references: { - label: i18n.REFERENCES_FIELD_LABEL, - compareMethod: 'diffJson', - }, - risk_score: { - // JSON.stringify(fields.risk_score.current_version) - label: i18n.RISK_SCORE_FIELD_LABEL, - compareMethod: 'diffJson', - }, - threat: { - label: 'THREAT', - compareMethod: 'diffJson', - }, - severity: { - label: 'Severity_', - compareMethod: 'diffWords', - }, -}; +const sortAndStringifyJson = (jsObject: Record): string => + JSON.stringify(jsObject, Object.keys(jsObject).sort(), 2); -const WholeObjectDiff = ({ currentRule, mergedRule, openSections, toggleSection }) => { +interface WholeObjectDiffProps { + oldRule: RuleResponse; + newRule: RuleResponse; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const WholeObjectDiff = ({ + oldRule, + newRule, + openSections, + toggleSection, +}: WholeObjectDiffProps) => { return ( <> @@ -116,10 +94,16 @@ const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { return ( <> {visibleFields.map((fieldName) => { + const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); + const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); + + const oldSource = JSON.stringify(currentVersion, null, 2); + const newSource = JSON.stringify(mergedVersion, null, 2); + return ( <> { toggleSection(fieldName); @@ -128,16 +112,8 @@ const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { { domReadOnly: true, // ToDo: there does not appear to be a way to disable the read-only tooltip // Fortunately this only gets displayed when the 'delete' key is pressed. - renderSideBySide: true, useInlineViewWhenSpaceIsLimited: true, renderSideBySideInlineBreakpoint: 100, @@ -208,10 +183,12 @@ const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectio }; interface RuleDiffTabProps { + oldRule: RuleResponse; + newRule: RuleResponse; fields: Partial; } -export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProps) => { +export const RuleDiffTabMonaco = ({ fields, oldRule, newRule }: RuleDiffTabProps) => { const [openSections, setOpenSections] = useState>( Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) ); @@ -223,25 +200,12 @@ export const RuleDiffTab = ({ fields, currentRule, mergedRule }: RuleDiffTabProp })); }; - /* - export declare enum DiffMethod { - CHARS = "diffChars", - WORDS = "diffWords", - WORDS_WITH_SPACE = "diffWordsWithSpace", - LINES = "diffLines", - TRIMMED_LINES = "diffTrimmedLines", - SENTENCES = "diffSentences", - CSS = "diffCss", - JSON = "diffJson" -} - */ - return ( <> diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx new file mode 100644 index 0000000000000..cff29e75c5389 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx @@ -0,0 +1,572 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState, useMemo, useContext, useCallback } from 'react'; +import type { ReactElement } from 'react'; +import { css, Global } from '@emotion/react'; +import { + Diff, + Hunk, + useSourceExpansion, + useMinCollapsedLines, + Decoration, + getCollapsedLinesCountBetween, + parseDiff, + tokenize, + markEdits, +} from 'react-diff-view'; +import 'react-diff-view/style/index.css'; +import type { RenderGutter, HunkData, DecorationProps, TokenizeOptions } from 'react-diff-view'; +import unidiff from 'unidiff'; +import { get } from 'lodash'; +import { + EuiSpacer, + EuiAccordion, + EuiIcon, + EuiLink, + EuiTitle, + EuiFlexGroup, + EuiHorizontalRule, + useGeneratedHtmlId, + useEuiTheme, + EuiSwitch, +} from '@elastic/eui'; +import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; +import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; +import { markEditsByWord } from './mark_edits_by_word'; + +const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; + +const DiffByWordEnabledContext = React.createContext(false); + +interface UnfoldProps extends Omit { + start: number; + end: number; + direction: 'up' | 'down' | 'none'; + onExpand: (start: number, end: number) => void; +} + +function Unfold({ start, end, direction, onExpand, ...props }: UnfoldProps) { + const expand = useCallback(() => onExpand(start, end), [onExpand, start, end]); + + const linesCount = end - start; + + const iconType = { + up: 'sortUp', + down: 'sortDown', + none: 'sortable', + }; + + return ( + + + + {`Expand ${linesCount}${direction !== 'none' ? ' more' : ''} hidden line${ + linesCount > 1 ? 's' : '' + }`} + + + ); +} + +interface UnfoldCollapsedProps { + previousHunk: HunkData; + currentHunk?: HunkData; + linesCount: number; + onExpand: (start: number, end: number) => void; +} + +function UnfoldCollapsed({ + previousHunk, + currentHunk, + linesCount, + onExpand, +}: UnfoldCollapsedProps) { + if (!currentHunk) { + const nextStart = previousHunk.oldStart + previousHunk.oldLines; + const collapsedLines = linesCount - nextStart + 1; + + if (collapsedLines <= 0) { + return null; + } + + return ( + <> + {collapsedLines > 10 && ( + + )} + + + ); + } + + const collapsedLines = getCollapsedLinesCountBetween(previousHunk, currentHunk); + + if (!previousHunk) { + if (!collapsedLines) { + return null; + } + + const start = Math.max(currentHunk.oldStart - 10, 1); + + return ( + <> + + {collapsedLines > 10 && ( + + )} + + ); + } + + const collapsedStart = previousHunk.oldStart + previousHunk.oldLines; + const collapsedEnd = currentHunk.oldStart; + + if (collapsedLines < 10) { + return ( + + ); + } + + return ( + <> + + + + + ); +} + +const useExpand = (hunks: HunkData[], oldSource: string, newSource: string) => { + // useMemo(() => {}, [oldSource, newSource]); + const [hunksWithSourceExpanded, expandRange] = useSourceExpansion(hunks, oldSource); // Operates on hunks to allow "expansion" behaviour - substitutes two hunks with one hunk including data from two hunks and everything in between + const hunksWithMinLinesCollapsed = useMinCollapsedLines(0, hunksWithSourceExpanded, oldSource); + + return { + expandRange, + hunks: hunksWithMinLinesCollapsed, + }; +}; + +const useTokens = ( + hunks: HunkData[], + tokenizeChangesBy: 'chars' | 'words' = 'chars', + oldSource: string +) => { + if (!hunks) { + return undefined; + } + + const options: TokenizeOptions = { + oldSource, + highlight: false, + enhancers: [ + /* + "markEditsByWord" is a slightly modified version of "markEdits" enhancer from react-diff-view + to enable word-level highlighting. + */ + tokenizeChangesBy === 'words' ? markEditsByWord(hunks) : markEdits(hunks, { type: 'block' }), + ], + }; + + try { + /* + Synchroniously applies all the enhancers to the hunks and returns an array of tokens. + There's also a way to use a web worker to tokenize in a separate thread. + Example can be found here: https://github.com/otakustay/react-diff-view/blob/49cebd0958ef323c830395c1a1da601560a71781/site/components/DiffView/index.tsx#L43 + It didn't work for me right away, but theoretically the possibility is there. + */ + return tokenize(hunks, options); + } catch (ex) { + return undefined; + } +}; + +const convertToDiffFile = (oldSource: string, newSource: string) => { + /* + "diffLines" call below converts two strings of text into an array of Change objects. + Change objects look like this: + [ + ... + { + "count": 2, + "removed": true, + "value": "\"from\": \"now-540s\"" + }, + { + "count": 1, + "added": true, + "value": "\"from\": \"now-9m\"" + }, + ... + ] + + "formatLines" takes an array of Change objects and turns it into one big "unified Git diff" string. + Unified Git diff is a string with Git markers added. Looks something like this: + ` + @@ -3,16 +3,15 @@ + "author": ["Elastic"], + - "from": "now-540s", + + "from": "now-9m", + "history_window_start": "now-14d", + ` + */ + + const unifiedDiff: string = unidiff.formatLines(unidiff.diffLines(oldSource, newSource), { + context: 3, + }); + + /* + "parseDiff" converts a unified diff string into a JSDiff File object. + */ + const [diffFile] = parseDiff(unifiedDiff, { + nearbySequences: 'zip', + }); + /* + File object contains some metadata and the "hunks" property - an array of Hunk objects. + At this stage Hunks represent changed lines of code plus a few unchanged lines above and below for context. + Hunk objects look like this: + [ + ... + { + content: ' "from": "now-9m",' + isInsert: true, + lineNumber: 14, + type: "insert" + }, + { + content: ' "from": "now-540s",' + isDelete: true, + lineNumber: 15, + type: "delete" + }, + ... + ] + */ + + return diffFile; +}; + +interface DiffViewProps { + oldSource: string; + newSource: string; +} + +interface HunksProps { + hunks: HunkData[]; + oldSource: string; + expandRange: (start: number, end: number) => void; +} + +const Hunks = ({ hunks, oldSource, expandRange }: HunksProps) => { + const linesCount = oldSource.split('\n').length; + + const hunkElements = hunks.reduce((children: ReactElement[], hunk: HunkData, index: number) => { + const previousElement = children[children.length - 1]; + + children.push( + + ); + + children.push(); + + const isLastHunk = index === hunks.length - 1; + if (isLastHunk && oldSource) { + children.push( + + ); + } + + return children; + }, []); + + return <>{hunkElements}; +}; + +const CODE_CLASS_NAME = 'rule-update-diff-code'; +const GUTTER_CLASS_NAME = 'rule-update-diff-gutter'; + +interface CustomStylesProps { + children: React.ReactNode; +} + +const CustomStyles = ({ children }: CustomStylesProps) => { + const { euiTheme } = useEuiTheme(); + const [enabled, setEnabled] = useState(false); + + const customCss = css` + .${CODE_CLASS_NAME}.diff-code, .${GUTTER_CLASS_NAME}.diff-gutter { + background: transparent; + } + + .${CODE_CLASS_NAME}.diff-code-delete .diff-code-edit, + .${CODE_CLASS_NAME}.diff-code-insert .diff-code-edit { + text-decoration: line-through; + background: transparent; + } + + .${CODE_CLASS_NAME}.diff-code-delete .diff-code-edit { + color: ${euiTheme.colors.dangerText}; + } + + .${CODE_CLASS_NAME}.diff-code-insert .diff-code-edit { + color: ${euiTheme.colors.successText}; + } + `; + + return ( + <> + {enabled && } + { + setEnabled(!enabled); + }} + /> + + {children} + + ); +}; + +function DiffView({ oldSource, newSource }: DiffViewProps) { + const diffByWordEnabled = useContext(DiffByWordEnabledContext); + /* + "react-diff-view" components consume diffs not as a strings, but as something they call "hunks". + So we first need to convert our "before" and "after" strings into these "hunks". + "hunks" are objects describing changed sections of code plus a few unchanged lines above and below for context. + */ + + /* + "diffFile" is essentially an object containing "hunks" and some metadata. + */ + const diffFile = useMemo(() => convertToDiffFile(oldSource, newSource), [oldSource, newSource]); + + /* + Sections of diff without changes are hidden by default, because they are not present in the "hunks" array. + + "useExpand" allows to show these hidden sections when user clicks on "Expand hidden lines" button. + + "expandRange" basically merges two hunks into one: takes first hunk, appends all the lines between it and the second hunk and finally appends the second hunk. + + returned "hunks" is the resulting array of hunks with hidden section expanded. + */ + const { expandRange, hunks } = useExpand(diffFile.hunks, oldSource, newSource); + + /* + Here we go over each hunk and extract tokens from it. For example, splitting strings into words, + so we can later highlight changes on a word-by-word basis vs line-by-line. + */ + const tokens = useTokens(hunks, diffByWordEnabled ? 'words' : 'chars', oldSource); + + return ( + + {/* eslint-disable-next-line @typescript-eslint/no-shadow */} + {(hunks) => } + + ); +} + +interface FieldsProps { + fields: Partial; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { + const visibleFields = Object.keys(fields).filter( + (fieldName) => !HIDDEN_FIELDS.includes(fieldName) + ); + + return ( + <> + {visibleFields.map((fieldName) => { + const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); + const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); + + const oldSource = JSON.stringify(currentVersion, null, 2); + const newSource = JSON.stringify(mergedVersion, null, 2); + + return ( + <> + { + toggleSection(fieldName); + }} + > + + + + + ); + })} + + ); +}; + +interface ExpandableSectionProps { + title: string; + isOpen: boolean; + toggle: () => void; + children: React.ReactNode; +} + +const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { + const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); + + return ( + +

{title}

+ + } + initialIsOpen={true} + > + + + {children} + +
+ ); +}; + +const renderGutter: RenderGutter = ({ change }) => { + /* + Custom gutter (a column where you normally see line numbers). + Here's I am returning "+" or "-" so the diff is more readable by colorblind people. + */ + if (change.type === 'insert') { + return '+'; + } + + if (change.type === 'delete') { + return '-'; + } + + if (change.type === 'normal') { + return null; + } +}; + +const sortAndStringifyJson = (jsObject: Record): string => + JSON.stringify(jsObject, Object.keys(jsObject).sort(), 2); + +interface WholeObjectDiffProps { + oldRule: RuleResponse; + newRule: RuleResponse; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const WholeObjectDiff = ({ + oldRule, + newRule, + openSections, + toggleSection, +}: WholeObjectDiffProps) => { + const oldSource = sortAndStringifyJson(oldRule); + const newSource = sortAndStringifyJson(newRule); + + return ( + <> + { + toggleSection('whole'); + }} + > + + + + + ); +}; + +interface RuleDiffTabProps { + oldRule: RuleResponse; + newRule: RuleResponse; + fields: Partial; +} + +export const RuleDiffTabReactDiffView = ({ fields, oldRule, newRule }: RuleDiffTabProps) => { + const [openSections, setOpenSections] = useState>( + Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) + ); + + const toggleSection = (sectionName: string) => { + setOpenSections((prevOpenSections) => ({ + ...prevOpenSections, + [sectionName]: !prevOpenSections[sectionName], + })); + }; + + const [diffByWordEnabled, setDiffByWordEnabled] = useState(false); + + return ( + <> + + + { + setDiffByWordEnabled(!diffByWordEnabled); + }} + /> + + + + + + + + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx new file mode 100644 index 0000000000000..5e0ea4018a38c --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx @@ -0,0 +1,285 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState, useContext } from 'react'; +import ReactDiffViewer, { DiffMethod } from 'react-diff-viewer-continued'; +import { get } from 'lodash'; +import { + EuiSpacer, + EuiAccordion, + EuiTitle, + EuiFlexGroup, + EuiSwitch, + EuiHorizontalRule, + EuiRadioGroup, + useGeneratedHtmlId, + useEuiTheme, +} from '@elastic/eui'; +import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; +import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; + +const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; + +const CustomStylesContext = React.createContext({}); +const CompareMethodContext = React.createContext(DiffMethod.CHARS); + +interface FieldsProps { + fields: Partial; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { + const styles = useContext(CustomStylesContext); + const compareMethod = useContext(CompareMethodContext); + + const visibleFields = Object.keys(fields).filter( + (fieldName) => !HIDDEN_FIELDS.includes(fieldName) + ); + + return ( + <> + {visibleFields.map((fieldName) => { + const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); + const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); + + const oldSource = JSON.stringify(currentVersion, null, 2); + const newSource = JSON.stringify(mergedVersion, null, 2); + + return ( + <> + { + toggleSection(fieldName); + }} + > + + + + + ); + })} + + ); +}; + +interface ExpandableSectionProps { + title: string; + isOpen: boolean; + toggle: () => void; + children: React.ReactNode; +} + +const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { + const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); + + return ( + +

{title}

+ + } + initialIsOpen={true} + > + + + {children} + +
+ ); +}; + +const sortAndStringifyJson = (jsObject: Record): string => + JSON.stringify(jsObject, Object.keys(jsObject).sort(), 2); + +interface CustomStylesProps { + children: React.ReactNode; +} + +const CustomStyles = ({ children }: CustomStylesProps) => { + const { euiTheme } = useEuiTheme(); + const [enabled, setEnabled] = useState(false); + + const customStyles = { + variables: { + light: { + addedBackground: 'transparent', + removedBackground: 'transparent', + }, + }, + wordAdded: { + background: 'transparent', + color: euiTheme.colors.successText, + }, + wordRemoved: { + background: 'transparent', + color: euiTheme.colors.dangerText, + textDecoration: 'line-through', + }, + }; + + return ( + + { + setEnabled(!enabled); + }} + /> + + {children} + + ); +}; + +interface WholeObjectDiffProps { + oldRule: RuleResponse; + newRule: RuleResponse; + openSections: Record; + toggleSection: (sectionName: string) => void; +} + +const WholeObjectDiff = ({ + oldRule, + newRule, + openSections, + toggleSection, +}: WholeObjectDiffProps) => { + const oldSource = sortAndStringifyJson(oldRule); + const newSource = sortAndStringifyJson(newRule); + + const styles = useContext(CustomStylesContext); + const compareMethod = useContext(CompareMethodContext); + + return ( + <> + { + toggleSection('whole'); + }} + > + + + + + ); +}; + +interface RuleDiffTabProps { + oldRule: RuleResponse; + newRule: RuleResponse; + fields: Partial; +} + +export const RuleDiffTabReactDiffViewerContinued = ({ + fields, + oldRule, + newRule, +}: RuleDiffTabProps) => { + const [openSections, setOpenSections] = useState>( + Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) + ); + + const toggleSection = (sectionName: string) => { + setOpenSections((prevOpenSections) => ({ + ...prevOpenSections, + [sectionName]: !prevOpenSections[sectionName], + })); + }; + + const options = [ + { + id: DiffMethod.CHARS, + label: 'Chars', + }, + { + id: DiffMethod.WORDS, + label: 'Words', + }, + { + id: DiffMethod.LINES, + label: 'Lines', + }, + { + id: DiffMethod.SENTENCES, + label: 'Sentences', + }, + { + id: DiffMethod.JSON, + label: 'JSON', + }, + ]; + + const [compareMethod, setCompareMethod] = useState(DiffMethod.CHARS); + + return ( + <> + + { + setCompareMethod(optionId as DiffMethod); + }} + legend={{ + children: {'Diffing algorthm'}, + }} + /> + + + + + + + + + ); +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/unidiff.d.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/unidiff.d.ts new file mode 100644 index 0000000000000..0ae55f9542bcb --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/unidiff.d.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +declare module 'unidiff' { + export interface FormatOptions { + context?: number; + } + + export function diffLines(x: string, y: string): string[]; + + export function formatLines(line: string[], options?: FormatOptions): string; +} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx index ba3ddc9866070..06ec74fb30c95 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx @@ -33,11 +33,11 @@ import * as i18n from './translations'; import { MlJobUpgradeModal } from '../../../../../detections/components/modals/ml_job_upgrade_modal'; // import { RuleDiffTab } from '../../../../rule_management/components/rule_details/rule_diff_tab'; -import { RuleDiffTab as RuleDiffTab1 } from '../../../../rule_management/components/rule_details/rule_diff_tab_1'; -import { RuleDiffTab as RuleDiffTab2 } from '../../../../rule_management/components/rule_details/rule_diff_tab_2'; -import { RuleDiffTab as RuleDiffTab3 } from '../../../../rule_management/components/rule_details/rule_diff_tab_3'; -import { RuleDiffTab as RuleDiffTab4 } from '../../../../rule_management/components/rule_details/rule_diff_tab_4'; -import { RuleDiffTab as RuleDiffTab5 } from '../../../../rule_management/components/rule_details/rule_diff_tab_5'; +import { RuleDiffTabAppExperienceTeamPoc } from '../../../../rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc'; +import { RuleDiffTabReactDiffViewerContinued } from '../../../../rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued'; +import { RuleDiffTabReactDiffView } from '../../../../rule_management/components/rule_details/rule_diff_tab_react_diff_view'; +import { RuleDiffTabMonaco } from '../../../../rule_management/components/rule_details/rule_diff_tab_monaco'; +import { RuleDiffTabDiff2Html } from '../../../../rule_management/components/rule_details/rule_diff_tab_diff2html'; // import * as ruleDetailsI18n from '../../../../rule_management/components/rule_details/translations.ts'; export interface UpgradePrebuiltRulesTableState { @@ -307,77 +307,84 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ return defaultTabs; } - const diffTab1 = { - id: 'diff1', - name: 'elastic-poc', + const diffTabReactDiffViewerContinued = { + id: 'react-diff-viewer-continued', + name: 'react-diff-viewer-continued', content: ( - ), }; - const diffTab2 = { - id: 'diff2', - name: 'react-diff-viewer-continued', + const diffTabReactDiffView = { + id: 'react-diff-view', + name: 'react-diff-view', content: ( - ), }; - const diffTab3 = { - id: 'diff3', - name: 'react-diff-view', + const diffTabMonaco = { + id: 'monaco', + name: 'monaco', content: ( - ), }; - const diffTab4 = { - id: 'diff4', - name: 'monaco', + const diffTabDiff2Html = { + id: 'diff2html', + name: 'diff2html', content: ( - ), }; - const diffTab5 = { - id: 'diff5', - name: 'diff2html', + const diffTabAppExperienceTeamPoc = { + id: 'app-experience-team-poc', + name: 'app-experience-team-poc', content: ( - ), }; - return [diffTab2, diffTab3, diffTab4, diffTab5, diffTab1, ...defaultTabs]; + return [ + diffTabReactDiffViewerContinued, + diffTabReactDiffView, + diffTabMonaco, + diffTabDiff2Html, + diffTabAppExperienceTeamPoc, + ...defaultTabs, + ]; }} /> )} diff --git a/yarn.lock b/yarn.lock index a427e8dfe311c..b639e0bd2063c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8975,6 +8975,11 @@ resolved "https://registry.yarnpkg.com/@types/delete-empty/-/delete-empty-2.0.0.tgz#1647ae9e68f708a6ba778531af667ec55bc61964" integrity sha512-sq+kwx8zA9BSugT9N+Jr8/uWjbHMZ+N/meJEzRyT3gmLq/WMtx/iSIpvdpmBUi/cvXl6Kzpvve8G2ESkabFwmg== +"@types/diff@^5.0.8": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@types/diff/-/diff-5.0.8.tgz#28dc501cc3e7c62d4c5d096afe20755170acf276" + integrity sha512-kR0gRf0wMwpxQq6ME5s+tWk9zVCfJUl98eRkD05HWWRbhPB/eu4V1IbyZAsvzC1Gn4znBJ0HN01M4DGXdBEV8Q== + "@types/ejs@^3.0.6": version "3.0.6" resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.0.6.tgz#aca442289df623bfa8e47c23961f0357847b83fe" @@ -14889,6 +14894,11 @@ diacritics@^1.3.0: resolved "https://registry.yarnpkg.com/diacritics/-/diacritics-1.3.0.tgz#3efa87323ebb863e6696cebb0082d48ff3d6f7a1" integrity sha1-PvqHMj67hj5mls67AILUj/PW96E= +diff-match-patch-line-and-word@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/diff-match-patch-line-and-word/-/diff-match-patch-line-and-word-0.1.3.tgz#0f267c26ab7840785667cccd8c9dc1fb8b288964" + integrity sha512-CR+842NECOQO9qOvlyOf/9IAXMEW8km1Em9YrH8J4wVaeICXtEVJ8H9AZ5Xa0QBTSZUe4DFijGM5dZD5Dl3bEg== + diff-match-patch@^1.0.0, diff-match-patch@^1.0.4, diff-match-patch@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37" @@ -25396,10 +25406,10 @@ react-colorful@^5.1.2: resolved "https://registry.yarnpkg.com/react-colorful/-/react-colorful-5.5.1.tgz#29d9c4e496f2ca784dd2bb5053a3a4340cfaf784" integrity sha512-M1TJH2X3RXEt12sWkpa6hLc/bbYS0H6F4rIqjQZ+RxNBstpY67d9TrFXtqdZwhpmBXcCwEi7stKqFue3ZRkiOg== -react-diff-view@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/react-diff-view/-/react-diff-view-3.1.0.tgz#d8c6eb2108179c7bf99c202ba70dcc9ec673c0e2" - integrity sha512-xIouC5F8gSXJ4DNlZWjyGyqRT9HVQ6v6Fo2ko+XDQpRmsJjYcd32YiQnCV1kwXOjoWPfhTCouyFT3dgyOZpRgA== +react-diff-view@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/react-diff-view/-/react-diff-view-3.2.0.tgz#8fbf04782d78423903a59202ce7533f6312c1cc3" + integrity sha512-p58XoqMxgt71ujpiDQTs9Za3nqTawt1E4bTzKsYSqr8I8br6cjQj1b66HxGnV8Yrc6MD6iQPqS1aZiFoGqEw+g== dependencies: classnames "^2.3.2" diff-match-patch "^1.0.5" From f9898129efa76affa2b0dee2ee0c2e54816c346f Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Mon, 27 Nov 2023 17:12:44 +0100 Subject: [PATCH 4/9] Fix styling issue with highlighting changes --- .../components/rule_details/rule_diff_tab_react_diff_view.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx index cff29e75c5389..539d2da6ceb51 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx @@ -321,12 +321,12 @@ const CustomStyles = ({ children }: CustomStylesProps) => { .${CODE_CLASS_NAME}.diff-code-delete .diff-code-edit, .${CODE_CLASS_NAME}.diff-code-insert .diff-code-edit { - text-decoration: line-through; background: transparent; } .${CODE_CLASS_NAME}.diff-code-delete .diff-code-edit { color: ${euiTheme.colors.dangerText}; + text-decoration: line-through; } .${CODE_CLASS_NAME}.diff-code-insert .diff-code-edit { From 4a696942ba2b8db26a65c16da8f9419a3babb73a Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Mon, 27 Nov 2023 19:04:09 +0100 Subject: [PATCH 5/9] Found a way to use more diffing algos --- .../rule_details/mark_edits_by_word.tsx | 76 ++++++++++++++++--- .../rule_diff_tab_react_diff_view.tsx | 70 +++++++++++------ ...e_diff_tab_react_diff_viewer_continued.tsx | 25 ++++-- 3 files changed, 132 insertions(+), 39 deletions(-) diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/mark_edits_by_word.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/mark_edits_by_word.tsx index 80f9b3c205705..a348ca46d9ad5 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/mark_edits_by_word.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/mark_edits_by_word.tsx @@ -6,11 +6,39 @@ */ import { findIndex, flatMap, flatten } from 'lodash'; -import DiffMatchPatch, { Diff } from 'diff-match-patch'; +import DiffMatchPatch from 'diff-match-patch'; +import type { Diff } from 'diff-match-patch'; import 'diff-match-patch-line-and-word'; +import * as diff from 'diff'; +import type { Change } from 'diff'; import { isDelete, isInsert, isNormal, pickRanges } from 'react-diff-view'; import type { ChangeData, HunkData, RangeTokenNode, TokenizeEnhancer } from 'react-diff-view'; +interface JsDiff { + diffChars: (oldStr: string, newStr: string) => Change[]; + diffWords: (oldStr: string, newStr: string) => Change[]; + diffWordsWithSpace: (oldStr: string, newStr: string) => Change[]; + diffLines: (oldStr: string, newStr: string) => Change[]; + diffTrimmedLines: (oldStr: string, newStr: string) => Change[]; + diffSentences: (oldStr: string, newStr: string) => Change[]; + diffCss: (oldStr: string, newStr: string) => Change[]; + diffJson: (oldObject: Record, newObject: Record) => Change[]; +} + +const jsDiff: JsDiff = diff; + +export enum DiffMethod { + CHARS = 'diffChars', + WORDS = 'diffWords', + WORDS_WITH_SPACE = 'diffWordsWithSpace', + LINES = 'diffLines', + TRIMMED_LINES = 'diffTrimmedLines', + SENTENCES = 'diffSentences', + CSS = 'diffCss', + JSON = 'diffJson', + WORDS_CUSTOM_USING_DMP = 'diffWordsCustomUsingDmp', +} + const { DIFF_EQUAL, DIFF_DELETE, DIFF_INSERT } = DiffMatchPatch; function findChangeBlocks(changes: ChangeData[]): ChangeData[][] { @@ -31,6 +59,7 @@ function findChangeBlocks(changes: ChangeData[]): ChangeData[][] { function groupDiffs(diffs: Diff[]): [Diff[], Diff[]] { return diffs.reduce<[Diff[], Diff[]]>( + // eslint-disable-next-line @typescript-eslint/no-shadow ([oldDiffs, newDiffs], diff) => { const [type] = diff; @@ -100,6 +129,10 @@ function convertToLinesOfEdits(linesOfDiffs: Diff[][], startLineNumber: number) return flatMap(linesOfDiffs, (diffs, i) => diffsToEdits(diffs, startLineNumber + i)); } +/* + UPDATE: I figured that there's a way to do it without relying on "diff-match-patch-line-and-word". + See a new function "diffBy" below. Leaving this function here for comparison. +*/ function diffByWord(x: string, y: string): [Diff[], Diff[]] { /* This is a modified version of "diffText" from react-diff-view. @@ -122,7 +155,21 @@ function diffByWord(x: string, y: string): [Diff[], Diff[]] { return groupDiffs(diffs); } -function diffChangeBlock(changes: ChangeData[]): [RangeTokenNode[], RangeTokenNode[]] { +function diffBy(diffMethod: DiffMethod, x: string, y: string): [Diff[], Diff[]] { + const jsDiffChanges: Change[] = jsDiff[diffMethod](x, y); + const diffs: Diff[] = diff.convertChangesToDMP(jsDiffChanges); + + if (diffs.length <= 1) { + return [[], []]; + } + + return groupDiffs(diffs); +} + +function diffChangeBlock( + changes: ChangeData[], + diffMethod: DiffMethod +): [RangeTokenNode[], RangeTokenNode[]] { /* Convert ChangeData array to two strings representing old source and new source of a change block, like "created_at": "2023-11-20T16:47:52.801Z", @@ -144,7 +191,10 @@ function diffChangeBlock(changes: ChangeData[]): [RangeTokenNode[], RangeTokenNo ['', ''] ); - const [oldDiffs, newDiffs] = diffByWord(oldSource, newSource); // <-- That's basically the only change I made to allow word-level diffing + const [oldDiffs, newDiffs] = + diffMethod === DiffMethod.WORDS_CUSTOM_USING_DMP // <-- That's basically the only change I made to allow word-level diffing + ? diffByWord(oldSource, newSource) + : diffBy(diffMethod, oldSource, newSource); if (oldDiffs.length === 0 && newDiffs.length === 0) { return [[], []]; @@ -170,20 +220,22 @@ function diffChangeBlock(changes: ChangeData[]): [RangeTokenNode[], RangeTokenNo return [oldEdits, newEdits]; } -export function markEditsByWord(hunks: HunkData[]): TokenizeEnhancer { +export function markEditsBy(hunks: HunkData[], diffMethod: DiffMethod): TokenizeEnhancer { const changeBlocks = flatMap( hunks.map((hunk) => hunk.changes), findChangeBlocks ); - const [oldEdits, newEdits] = changeBlocks.map(diffChangeBlock).reduce( - // eslint-disable-next-line @typescript-eslint/no-shadow - ([oldEdits, newEdits], [currentOld, currentNew]) => [ - oldEdits.concat(currentOld), - newEdits.concat(currentNew), - ], - [[], []] - ); + const [oldEdits, newEdits] = changeBlocks + .map((changes) => diffChangeBlock(changes, diffMethod)) + .reduce( + // eslint-disable-next-line @typescript-eslint/no-shadow + ([oldEdits, newEdits], [currentOld, currentNew]) => [ + oldEdits.concat(currentOld), + newEdits.concat(currentNew), + ], + [[], []] + ); return pickRanges(flatten(oldEdits), flatten(newEdits)); } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx index 539d2da6ceb51..f6023348948ba 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx @@ -34,14 +34,15 @@ import { useGeneratedHtmlId, useEuiTheme, EuiSwitch, + EuiRadioGroup, } from '@elastic/eui'; import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; -import { markEditsByWord } from './mark_edits_by_word'; +import { markEditsBy, DiffMethod } from './mark_edits_by_word'; const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; -const DiffByWordEnabledContext = React.createContext(false); +const CompareMethodContext = React.createContext(DiffMethod.CHARS); interface UnfoldProps extends Omit { start: number; @@ -157,11 +158,7 @@ const useExpand = (hunks: HunkData[], oldSource: string, newSource: string) => { }; }; -const useTokens = ( - hunks: HunkData[], - tokenizeChangesBy: 'chars' | 'words' = 'chars', - oldSource: string -) => { +const useTokens = (hunks: HunkData[], compareMethod: DiffMethod, oldSource: string) => { if (!hunks) { return undefined; } @@ -171,10 +168,12 @@ const useTokens = ( highlight: false, enhancers: [ /* - "markEditsByWord" is a slightly modified version of "markEdits" enhancer from react-diff-view + "markEditsBy" is a slightly modified version of "markEdits" enhancer from react-diff-view to enable word-level highlighting. */ - tokenizeChangesBy === 'words' ? markEditsByWord(hunks) : markEdits(hunks, { type: 'block' }), + compareMethod === DiffMethod.CHARS + ? markEdits(hunks, { type: 'block' }) // Using built-in "markEdits" enhancer for char-level diffing + : markEditsBy(hunks, compareMethod), // Using custom "markEditsBy" enhancer for other-level diffing ], }; @@ -351,7 +350,8 @@ const CustomStyles = ({ children }: CustomStylesProps) => { }; function DiffView({ oldSource, newSource }: DiffViewProps) { - const diffByWordEnabled = useContext(DiffByWordEnabledContext); + const compareMethod = useContext(CompareMethodContext); + /* "react-diff-view" components consume diffs not as a strings, but as something they call "hunks". So we first need to convert our "before" and "after" strings into these "hunks". @@ -378,7 +378,7 @@ function DiffView({ oldSource, newSource }: DiffViewProps) { Here we go over each hunk and extract tokens from it. For example, splitting strings into words, so we can later highlight changes on a word-by-word basis vs line-by-line. */ - const tokens = useTokens(hunks, diffByWordEnabled ? 'words' : 'chars', oldSource); + const tokens = useTokens(hunks, compareMethod, oldSource); return ( (DiffMethod.CHARS); return ( <> + + { + setCompareMethod(optionId as DiffMethod); + }} + legend={{ + children: {'Diffing algorthm'}, + }} + /> - { - setDiffByWordEnabled(!diffByWordEnabled); - }} - /> - - + - + ); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx index 5e0ea4018a38c..1ec4a48dcfd40 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx @@ -47,8 +47,15 @@ const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); - const oldSource = JSON.stringify(currentVersion, null, 2); - const newSource = JSON.stringify(mergedVersion, null, 2); + const oldSource = + compareMethod === DiffMethod.JSON && typeof currentVersion === 'object' + ? currentVersion + : JSON.stringify(currentVersion, null, 2); + + const newSource = + compareMethod === DiffMethod.JSON && typeof currentVersion === 'object' + ? mergedVersion + : JSON.stringify(mergedVersion, null, 2); return ( <> @@ -164,11 +171,19 @@ const WholeObjectDiff = ({ openSections, toggleSection, }: WholeObjectDiffProps) => { - const oldSource = sortAndStringifyJson(oldRule); - const newSource = sortAndStringifyJson(newRule); + const compareMethod = useContext(CompareMethodContext); + + const oldSource = + compareMethod === DiffMethod.JSON && typeof oldRule === 'object' + ? oldRule + : sortAndStringifyJson(oldRule); + + const newSource = + compareMethod === DiffMethod.JSON && typeof newRule === 'object' + ? newRule + : sortAndStringifyJson(newRule); const styles = useContext(CustomStylesContext); - const compareMethod = useContext(CompareMethodContext); return ( <> From b8f33771b6f64d51a4a0710c17b6e7f380a0f23d Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Mon, 27 Nov 2023 19:05:45 +0100 Subject: [PATCH 6/9] Remove a useless file --- response.json | 110592 ----------------------------------------------- 1 file changed, 110592 deletions(-) delete mode 100644 response.json diff --git a/response.json b/response.json deleted file mode 100644 index 2fc48af01c971..0000000000000 --- a/response.json +++ /dev/null @@ -1,110592 +0,0 @@ -{ - "stats": { - "num_rules_to_install": 1003, - "tags": [ - "Data Source: Active Directory", - "Data Source: Amazon Web Services", - "Data Source: APM", - "Data Source: AWS", - "Data Source: Azure", - "Data Source: CyberArk PAS", - "Data Source: Elastic Defend", - "Data Source: Elastic Defend for Containers", - "Data Source: Elastic Endgame", - "Data Source: GCP", - "Data Source: Github", - "Data Source: Google Cloud Platform", - "Data Source: Google Workspace", - "Data Source: Kubernetes", - "Data Source: Microsoft 365", - "Data Source: Okta", - "Data Source: PowerShell Logs", - "Data Source: Sysmon Only", - "Data Source: Zoom", - "Domain: Cloud", - "Domain: Container", - "Domain: Endpoint", - "Domain: Network", - "OS: Linux", - "OS: macOS", - "OS: Windows", - "Resources: Investigation Guide", - "Rule Type: BBR", - "Rule Type: Higher-Order Rule", - "Rule Type: Indicator Match", - "Rule Type: Machine Learning", - "Rule Type: ML", - "Tactic: Collection", - "Tactic: Command and Control", - "Tactic: Credential Access", - "Tactic: Defense Evasion", - "Tactic: Discovery", - "Tactic: Execution", - "Tactic: Exfiltration", - "Tactic: Impact", - "Tactic: Initial Access", - "Tactic: Lateral Movement", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Tactic: Reconnaissance", - "Tactic: Resource Development", - "Tactic:Execution", - "Threat: BPFDoor", - "Threat: Cobalt Strike", - "Threat: Lightning Framework", - "Threat: Orbit", - "Threat: Rootkit", - "Threat: TripleCross", - "Use Case: Active Directory Monitoring", - "Use Case: Asset Visibility", - "Use Case: Configuration Audit", - "Use Case: Data Exfiltration Detection", - "Use Case: Domain Generation Algorithm Detection", - "Use Case: Guided Onboarding", - "Use Case: Identity and Access Audit", - "Use Case: Lateral Movement Detection", - "Use Case: Living off the Land Attack Detection", - "Use Case: Log Auditing", - "Use Case: Network Security Monitoring", - "Use Case: Threat Detection", - "Use Case: Vulnerability" - ] - }, - "rules": [ - { - "name": "Unusual File Creation - Alternate Data Stream", - "description": "Identifies suspicious creation of Alternate Data Streams on highly targeted files. This is uncommon for legitimate files and sometimes done by adversaries to hide malware.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual File Creation - Alternate Data Stream\n\nAlternate Data Streams (ADS) are file attributes only found on the NTFS file system. In this file system, files are built up from a couple of attributes; one of them is $Data, also known as the data attribute.\n\nThe regular data stream, also referred to as the unnamed data stream since the name string of this attribute is empty, contains the data inside the file. So any data stream that has a name is considered an alternate data stream.\n\nAttackers can abuse these alternate data streams to hide malicious files, string payloads, etc. This rule detects the creation of alternate data streams on highly targeted file types.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Retrieve the contents of the alternate data stream, and analyze it for potential maliciousness. Analysts can use the following PowerShell cmdlet to accomplish this:\n - `Get-Content C:\\Path\\To\\file.exe -stream SampleAlternateDataStreamName`\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of process executable and file conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 111, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1564", - "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/", - "subtechnique": [ - { - "id": "T1564.004", - "name": "NTFS File Attributes", - "reference": "https://attack.mitre.org/techniques/T1564/004/" - } - ] - } - ] - } - ], - "id": "e7d5fe91-18df-4749-92b5-305a6454a041", - "rule_id": "71bccb61-e19b-452f-b104-79a60e546a95", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n\n file.path : \"C:\\\\*:*\" and\n not file.path : \n (\"C:\\\\*:zone.identifier*\",\n \"C:\\\\users\\\\*\\\\appdata\\\\roaming\\\\microsoft\\\\teams\\\\old_weblogs_*:$DATA\") and\n\n not process.executable :\n (\"?:\\\\windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\w3wp.exe\",\n \"?:\\\\Windows\\\\explorer.exe\",\n \"?:\\\\Windows\\\\System32\\\\sihost.exe\",\n \"?:\\\\Windows\\\\System32\\\\PickerHost.exe\",\n \"?:\\\\Windows\\\\System32\\\\SearchProtocolHost.exe\",\n \"?:\\\\Program Files (x86)\\\\Dropbox\\\\Client\\\\Dropbox.exe\",\n \"?:\\\\Program Files\\\\Rivet Networks\\\\SmartByte\\\\SmartByteNetworkService.exe\",\n \"?:\\\\Program Files (x86)\\\\Microsoft\\\\Edge\\\\Application\\\\msedge.exe\",\n \"?:\\\\Program Files\\\\ExpressConnect\\\\ExpressConnectNetworkService.exe\",\n \"?:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Program Files\\\\Mozilla Firefox\\\\firefox.exe\",\n \"?:\\\\Program Files(x86)\\\\Microsoft Office\\\\root\\\\*\\\\EXCEL.EXE\",\n \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\*\\\\EXCEL.EXE\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Office\\\\root\\\\*\\\\OUTLOOK.EXE\",\n \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\*\\\\OUTLOOK.EXE\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Office\\\\root\\\\*\\\\POWERPNT.EXE\",\n \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\*\\\\POWERPNT.EXE\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Office\\\\root\\\\*\\\\WINWORD.EXE\",\n \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\*\\\\WINWORD.EXE\") and\n\n file.extension :\n (\n \"pdf\",\n \"dll\",\n \"png\",\n \"exe\",\n \"dat\",\n \"com\",\n \"bat\",\n \"cmd\",\n \"sys\",\n \"vbs\",\n \"ps1\",\n \"hta\",\n \"txt\",\n \"vbe\",\n \"js\",\n \"wsh\",\n \"docx\",\n \"doc\",\n \"xlsx\",\n \"xls\",\n \"pptx\",\n \"ppt\",\n \"rtf\",\n \"gif\",\n \"jpg\",\n \"png\",\n \"bmp\",\n \"img\",\n \"iso\"\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Abnormal Process ID or Lock File Created", - "description": "Identifies the creation of a Process ID (PID), lock or reboot file created in temporary file storage paradigm (tmpfs) directory /var/run. On Linux, the PID files typically hold the process ID to track previous copies running and manage other tasks. Certain Linux malware use the /var/run directory for holding data, executables and other tasks, disguising itself or these files as legitimate PID files.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Abnormal Process ID or Lock File Created\n\nLinux applications may need to save their process identification number (PID) for various purposes: from signaling that a program is running to serving as a signal that a previous instance of an application didn't exit successfully. PID files contain its creator process PID in an integer value.\n\nLinux lock files are used to coordinate operations in files so that conflicts and race conditions are prevented.\n\nThis rule identifies the creation of PID, lock, or reboot files in the /var/run/ directory. Attackers can masquerade malware, payloads, staged data for exfiltration, and more as legitimate PID files.\n\n#### Possible investigation steps\n\n- Retrieve the file and determine if it is malicious:\n - Check the contents of the PID files. They should only contain integer strings.\n - Check the file type of the lock and PID files to determine if they are executables. This is only observed in malicious files.\n - Check the size of the subject file. Legitimate PID files should be under 10 bytes.\n - Check if the lock or PID file has high entropy. This typically indicates an encrypted payload.\n - Analysts can use tools like `ent` to measure entropy.\n - Examine the reputation of the SHA-256 hash in the PID file. Use a database like VirusTotal to identify additional pivots and artifacts for investigation.\n- Trace the file's creation to ensure it came from a legitimate or authorized process.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, file modifications, and any spawned child processes.\n\n### False positive analysis\n\n- False positives can appear if the PID file is legitimate and holding a process ID as intended. If the PID file is an executable or has a file size that's larger than 10 bytes, it should be ruled suspicious.\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of file name and process executable conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Block the identified indicators of compromise (IoCs).\n- Take actions to terminate processes and connections used by the attacker.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 210, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Threat: BPFDoor", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "False-Positives (FP) can appear if the PID file is legitimate and holding a process ID as intended. To differentiate, if the PID file is an executable or larger than 10 bytes, it should be ruled suspicious." - ], - "references": [ - "https://www.sandflysecurity.com/blog/linux-file-masquerading-and-malicious-pids-sandfly-1-2-6-update/", - "https://twitter.com/GossiTheDog/status/1522964028284411907", - "https://exatrack.com/public/Tricephalic_Hellkeeper.pdf", - "https://www.elastic.co/security-labs/a-peek-behind-the-bpfdoor" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - } - ], - "id": "45f712c7-9647-4283-a5c4-26c58ba9e260", - "rule_id": "cac91072-d165-11ec-a764-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "host.os.type:linux and event.category:file and event.action:creation and\nuser.id:0 and file.extension:(pid or lock or reboot) and file.path:(/var/run/* or /run/*) and (\n (process.name : (\n bash or dash or sh or tcsh or csh or zsh or ksh or fish or ash or touch or nano or vim or vi or editor or mv or cp)\n ) or (\n process.executable : (\n ./* or /tmp/* or /var/tmp/* or /dev/shm/* or /var/run/* or /boot/* or /srv/* or /run/*\n ))\n) and not process.name : (go or git or containerd* or snap-confine)\n", - "new_terms_fields": [ - "host.id", - "process.executable", - "file.path" - ], - "history_window_start": "now-14d", - "index": [ - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "Attempt to Modify an Okta Policy Rule", - "description": "Detects attempts to modify a rule within an Okta policy. An adversary may attempt to modify an Okta policy rule in order to weaken an organization's security controls.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Modify an Okta Policy Rule\n\nThe modification of an Okta policy rule can be an indication of malicious activity as it may aim to weaken an organization's security controls.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the modification attempt.\n- Check the `okta.outcome.result` field to confirm the rule modification attempt.\n- Check if there are multiple rule modification attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the modification attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the modification attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the modification attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the modification attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized modification is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific modification technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 207, - "tags": [ - "Use Case: Identity and Access Audit", - "Tactic: Defense Evasion", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if Okta MFA rules are regularly modified in your organization." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "fd9ccf12-0734-49b4-b82e-36c9050d4844", - "rule_id": "000047bb-b27a-47ec-8b62-ef1a5d2c9e19", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:policy.rule.update\n", - "language": "kuery" - }, - { - "name": "Potential Persistence Through Run Control Detected", - "description": "This rule monitors the creation/alteration of the rc.local file by a previously unknown process executable through the use of the new terms rule type. The /etc/rc.local file is used to start custom applications, services, scripts or commands during start-up. The rc.local file has mostly been replaced by Systemd. However, through the \"systemd-rc-local-generator\", rc.local files can be converted to services that run at boot. Adversaries may alter rc.local to execute malicious code at start-up, and gain persistence onto the system.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Persistence Through Run Control Detected\n\nThe `rc.local` file executes custom commands or scripts during system startup on Linux systems. `rc.local` has been deprecated in favor of the use of `systemd services`, and more recent Unix distributions no longer leverage this method of on-boot script execution. \n\nThere might still be users that use `rc.local` in a benign matter, so investigation to see whether the file is malicious is vital. \n\nDetection alerts from this rule indicate the creation of a new `/etc/rc.local` file. \n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible Investigation Steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the file that was created or modified.\n - !{osquery{\"label\":\"Osquery - Retrieve File Information\",\"query\":\"SELECT * FROM file WHERE path = {{file.path}}\"}}\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate whether the `/lib/systemd/system/rc-local.service` and `/run/systemd/generator/multi-user.target.wants/rc-local.service` files were created through the `systemd-rc-local-generator` located at `/usr/lib/systemd/system-generators/systemd-rc-local-generator`.\n - !{osquery{\"label\":\"Osquery - Retrieve rc-local.service File Information\",\"query\":\"SELECT * FROM file WHERE (path = '/run/systemd/generator/multi-user.target.wants/rc-local.service' OR path = '/run/systemd/generator/multi-user.target.wants/rc-local.service')\"}}\n - In case the file is not present here, `sudo systemctl status rc-local` can be executed to find the location of the rc-local unit file.\n - If `rc-local.service` is found, manual investigation is required to check for the rc script execution. Systemd will generate syslogs in case of the execution of the rc-local service. `sudo cat /var/log/syslog | grep \"rc-local.service|/etc/rc.local Compatibility\"` can be executed to check for the execution of the service.\n - If logs are found, it's likely that the contents of the `rc.local` file have been executed. Analyze the logs. In case several syslog log files are available, use a wildcard to search through all of the available logs.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate whether this activity is related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Investigate whether the altered scripts call other malicious scripts elsewhere on the file system. \n - If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- If this activity is related to a system administrator who uses `rc.local` for administrative purposes, consider adding exceptions for this specific administrator user account. \n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Response and remediation\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the `service/rc.local` files or restore their original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.intezer.com/blog/malware-analysis/hiddenwasp-malware-targeting-linux-systems/", - "https://pberba.github.io/security/2022/02/06/linux-threat-hunting-for-persistence-initialization-scripts-and-shell-configuration/#8-boot-or-logon-initialization-scripts-rc-scripts", - "https://www.cyberciti.biz/faq/how-to-enable-rc-local-shell-script-on-systemd-while-booting-linux-system/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1037", - "name": "Boot or Logon Initialization Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/", - "subtechnique": [ - { - "id": "T1037.004", - "name": "RC Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/004/" - } - ] - } - ] - } - ], - "id": "1fb3f0fd-2eac-479e-b13f-08f4a8f4f786", - "rule_id": "0f4d35e4-925e-4959-ab24-911be207ee6f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "host.os.type : \"linux\" and event.category : \"file\" and \nevent.type : (\"change\" or \"file_modify_event\" or \"creation\" or \"file_create_event\") and\nfile.path : \"/etc/rc.local\" and not process.name : (\n \"dockerd\" or \"docker\" or \"dnf\" or \"dnf-automatic\" or \"yum\" or \"rpm\" or \"dpkg\"\n) and not file.extension : (\"swp\" or \"swpx\")\n", - "new_terms_fields": [ - "host.id", - "process.executable", - "user.id" - ], - "history_window_start": "now-7d", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Suspicious File Creation in /etc for Persistence", - "description": "Detects the manual creation of files in specific etc directories, via user root, used by Linux malware to persist and elevate privileges on compromised systems. File creation in these directories should not be entirely common and could indicate a malicious binary or script installing persistence mechanisms for long term access.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 109, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Threat: Orbit", - "Threat: Lightning Framework", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.intezer.com/blog/incident-response/orbit-new-undetected-linux-threat/", - "https://www.intezer.com/blog/research/lightning-framework-new-linux-threat/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1037", - "name": "Boot or Logon Initialization Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/", - "subtechnique": [ - { - "id": "T1037.004", - "name": "RC Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/004/" - } - ] - }, - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.006", - "name": "Dynamic Linker Hijacking", - "reference": "https://attack.mitre.org/techniques/T1574/006/" - } - ] - }, - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.002", - "name": "Systemd Service", - "reference": "https://attack.mitre.org/techniques/T1543/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.003", - "name": "Cron", - "reference": "https://attack.mitre.org/techniques/T1053/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.003", - "name": "Sudo and Sudo Caching", - "reference": "https://attack.mitre.org/techniques/T1548/003/" - } - ] - } - ] - } - ], - "id": "31b766cc-c112-4f4a-8250-d2a0f15d2652", - "rule_id": "1c84dd64-7e6c-4bad-ac73-a5014ee37042", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "file where host.os.type == \"linux\" and event.type in (\"creation\", \"file_create_event\") and user.name == \"root\" and\nfile.path : (\"/etc/ld.so.conf.d/*\", \"/etc/cron.d/*\", \"/etc/sudoers.d/*\", \"/etc/rc.d/init.d/*\", \"/etc/systemd/system/*\",\n\"/usr/lib/systemd/system/*\") and not process.executable : (\"*/dpkg\", \"*/yum\", \"*/apt\", \"*/dnf\", \"*/rpm\", \"*/systemd\",\n\"*/snapd\", \"*/dnf-automatic\",\"*/yum-cron\", \"*/elastic-agent\", \"*/dnfdaemon-system\", \"*/bin/dockerd\", \"*/sbin/dockerd\",\n\"/kaniko/executor\", \"/usr/sbin/rhn_check\") and not file.extension in (\"swp\", \"swpx\", \"tmp\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Suspicious File Changes Activity Detected", - "description": "This rule identifies a sequence of 100 file extension rename events within a set of common file paths by the same process in a timespan of 1 second. Ransomware is a type of malware that encrypts a victim's files or systems and demands payment (usually in cryptocurrency) in exchange for the decryption key. One important indicator of a ransomware attack is the mass encryption of the file system, after which a new file extension is added to the file.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Impact", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1486", - "name": "Data Encrypted for Impact", - "reference": "https://attack.mitre.org/techniques/T1486/" - } - ] - } - ], - "id": "0310774b-92d2-42dc-962b-5012dc10bf3d", - "rule_id": "28738f9f-7427-4d23-bc69-756708b5f624", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by process.entity_id, host.id with maxspan=1s\n [file where host.os.type == \"linux\" and event.type == \"change\" and event.action == \"rename\" and file.extension : \"?*\" \n and process.executable : (\"./*\", \"/tmp/*\", \"/var/tmp/*\", \"/dev/shm/*\", \"/var/run/*\", \"/boot/*\", \"/srv/*\", \"/run/*\") and\n file.path : (\n \"/home/*/Downloads/*\", \"/home/*/Documents/*\", \"/root/*\", \"/bin/*\", \"/usr/bin/*\",\n \"/opt/*\", \"/etc/*\", \"/var/log/*\", \"/var/lib/log/*\", \"/var/backup/*\", \"/var/www/*\")] with runs=25\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Process Access via Direct System Call", - "description": "Identifies suspicious process access events from an unknown memory region. Endpoint security solutions usually hook userland Windows APIs in order to decide if the code that is being executed is malicious or not. It's possible to bypass hooked functions by writing malicious functions that call syscalls directly.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Process Access via Direct System Call\n\nEndpoint security solutions usually hook userland Windows APIs in order to decide if the code that is being executed is malicious or not. It's possible to bypass hooked functions by writing malicious functions that call syscalls directly.\n\nMore context and technical details can be found in this [research blog](https://outflank.nl/blog/2019/06/19/red-team-tactics-combining-direct-system-calls-and-srdi-to-bypass-av-edr/).\n\nThis rule identifies suspicious process access events from an unknown memory region. Attackers can use direct system calls to bypass security solutions that rely on hooks.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This detection may be triggered by certain applications that install root certificates for the purpose of inspecting SSL traffic. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove the malicious certificate from the root certificate store.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 209, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://twitter.com/SBousseaden/status/1278013896440324096", - "https://www.ired.team/offensive-security/defense-evasion/using-syscalls-directly-from-visual-studio-to-bypass-avs-edrs" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - } - ], - "id": "7df8e34b-5c4d-4d61-a3b8-c2c276758826", - "rule_id": "2dd480be-1263-4d9c-8672-172928f6789a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.CallTrace", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetImage", - "type": "keyword", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.code == \"10\" and\n length(winlog.event_data.CallTrace) > 0 and\n\n /* Sysmon CallTrace starting with unknown memory module instead of ntdll which host Windows NT Syscalls */\n not winlog.event_data.CallTrace :\n (\"?:\\\\WINDOWS\\\\SYSTEM32\\\\ntdll.dll*\",\n \"?:\\\\WINDOWS\\\\SysWOW64\\\\ntdll.dll*\",\n \"?:\\\\Windows\\\\System32\\\\wow64cpu.dll*\",\n \"?:\\\\WINDOWS\\\\System32\\\\wow64win.dll*\",\n \"?:\\\\Windows\\\\System32\\\\win32u.dll*\") and\n\n not winlog.event_data.TargetImage :\n (\"?:\\\\Program Files (x86)\\\\Malwarebytes Anti-Exploit\\\\mbae-svc.exe\",\n \"?:\\\\Program Files\\\\Cisco\\\\AMP\\\\*\\\\sfc.exe\",\n \"?:\\\\Program Files (x86)\\\\Microsoft\\\\EdgeWebView\\\\Application\\\\*\\\\msedgewebview2.exe\",\n \"?:\\\\Program Files\\\\Adobe\\\\Acrobat DC\\\\Acrobat\\\\*\\\\AcroCEF.exe\") and\n\n not (process.executable : (\"?:\\\\Program Files\\\\Adobe\\\\Acrobat DC\\\\Acrobat\\\\Acrobat.exe\",\n \"?:\\\\Program Files (x86)\\\\World of Warcraft\\\\_classic_\\\\WowClassic.exe\") and\n not winlog.event_data.TargetImage : \"?:\\\\WINDOWS\\\\system32\\\\lsass.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Attempted Bypass of Okta MFA", - "description": "Detects attempts to bypass Okta multi-factor authentication (MFA). An adversary may attempt to bypass the Okta MFA policies configured for an organization in order to obtain unauthorized access to an application.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempted Bypass of Okta MFA\n\nMulti-factor authentication (MFA) is a crucial security measure in preventing unauthorized access. Okta MFA, like other MFA solutions, requires the user to provide multiple means of identification at login. An adversary might attempt to bypass Okta MFA to gain unauthorized access to an application.\n\nThis rule detects attempts to bypass Okta MFA. It might indicate a serious attempt to compromise a user account within the organization's network.\n\n#### Possible investigation steps\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the bypass attempt.\n- Check the `okta.outcome.result` field to confirm the MFA bypass attempt.\n- Check if there are multiple unsuccessful MFA attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the MFA bypass attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the bypass attempt.\n\n### False positive analysis\n\n- Check if there were issues with the MFA system at the time of the bypass attempt. This could indicate a system error rather than a genuine bypass attempt.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the login attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's MFA settings to ensure they are correctly configured.\n\n### Response and remediation\n\n- If unauthorized access is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific MFA bypass technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 207, - "tags": [ - "Data Source: Okta", - "Use Case: Identity and Access Audit", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1111", - "name": "Multi-Factor Authentication Interception", - "reference": "https://attack.mitre.org/techniques/T1111/" - } - ] - } - ], - "id": "9387f9c4-3fc9-48dc-832f-fd5002c20fdd", - "rule_id": "3805c3dc-f82c-4f8d-891e-63c24d3102b0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:user.mfa.attempt_bypass\n", - "language": "kuery" - }, - { - "name": "Okta Brute Force or Password Spraying Attack", - "description": "Identifies a high number of failed Okta user authentication attempts from a single IP address, which could be indicative of a brute force or password spraying attack. An adversary may attempt a brute force or password spraying attack to obtain unauthorized access to user accounts.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Okta Brute Force or Password Spraying Attack\n\nThis rule alerts when a high number of failed Okta user authentication attempts occur from a single IP address. This could be indicative of a brute force or password spraying attack, where an adversary may attempt to gain unauthorized access to user accounts by guessing the passwords.\n\n#### Possible investigation steps:\n\n- Review the `source.ip` field to identify the IP address from which the high volume of failed login attempts originated.\n- Look into the `event.outcome` field to verify that these are indeed failed authentication attempts.\n- Determine the `user.name` or `user.email` related to these failed login attempts. If the attempts are spread across multiple accounts, it might indicate a password spraying attack.\n- Check the timeline of the events. Are the failed attempts spread out evenly, or are there burst periods, which might indicate an automated tool?\n- Determine the geographical location of the source IP. Is this location consistent with the user's typical login location?\n- Analyze any previous successful logins from this IP. Was this IP previously associated with successful logins?\n\n### False positive analysis:\n\n- A single user or automated process that attempts to authenticate using expired or wrong credentials multiple times may trigger a false positive.\n- Analyze the behavior of the source IP. If the IP is associated with legitimate users or services, it may be a false positive.\n\n### Response and remediation:\n\n- If you identify unauthorized access attempts, consider blocking the source IP at the firewall level.\n- Notify the users who are targeted by the attack. Ask them to change their passwords and ensure they use unique, complex passwords.\n- Enhance monitoring on the affected user accounts for any suspicious activity.\n- If the attack is persistent, consider implementing CAPTCHA or account lockouts after a certain number of failed login attempts.\n- If the attack is persistent, consider implementing multi-factor authentication (MFA) for the affected user accounts.\n- Review and update your security policies based on the findings from the incident.", - "version": 207, - "tags": [ - "Use Case: Identity and Access Audit", - "Tactic: Credential Access", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false positives." - ], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "fcddc54e-a835-48b5-8501-c3510a702ef7", - "rule_id": "42bf698b-4738-445b-8231-c834ddefd8a0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "threshold", - "query": "event.dataset:okta.system and event.category:authentication and event.outcome:failure\n", - "threshold": { - "field": [ - "source.ip" - ], - "value": 25 - }, - "index": [ - "filebeat-*", - "logs-okta*" - ], - "language": "kuery" - }, - { - "name": "Adding Hidden File Attribute via Attrib", - "description": "Adversaries can add the 'hidden' attribute to files to hide them from the user in an attempt to evade detection.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "timeline_id": "e70679c2-6cde-4510-9764-4823df18f7db", - "timeline_title": "Comprehensive Process Timeline", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Adding Hidden File Attribute via Attrib\n\nThe `Hidden` attribute is a file or folder attribute that makes the file or folder invisible to regular directory listings when the attribute is set. \n\nAttackers can use this attribute to conceal tooling and malware to prevent administrators and users from finding it, even if they are looking specifically for it.\n\nThis rule looks for the execution of the `attrib.exe` utility with a command line that indicates the modification of the `Hidden` attribute.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to identify the target file or folder.\n - Examine the file, which process created it, header, etc.\n - If suspicious, retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Observe and collect information about the following activities in the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 109, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1564", - "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/", - "subtechnique": [ - { - "id": "T1564.001", - "name": "Hidden Files and Directories", - "reference": "https://attack.mitre.org/techniques/T1564/001/" - } - ] - }, - { - "id": "T1222", - "name": "File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/", - "subtechnique": [ - { - "id": "T1222.001", - "name": "Windows File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - } - ], - "id": "915c8c32-4ba4-49f5-81af-b76d50cdbf39", - "rule_id": "4630d948-40d4-4cef-ac69-4002e29bc3db", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"attrib.exe\" or process.pe.original_file_name == \"ATTRIB.EXE\") and process.args : \"+h\" and\n not\n (process.parent.name: \"cmd.exe\" and\n process.command_line: \"attrib +R +H +S +A *.cui\" and\n process.parent.command_line: \"?:\\\\WINDOWS\\\\system32\\\\cmd.exe /c \\\"?:\\\\WINDOWS\\\\system32\\\\*.bat\\\"\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Persistence Through init.d Detected", - "description": "Files that are placed in the /etc/init.d/ directory in Unix can be used to start custom applications, services, scripts or commands during start-up. Init.d has been mostly replaced in favor of Systemd. However, the \"systemd-sysv-generator\" can convert init.d files to service unit files that run at boot. Adversaries may add or alter files located in the /etc/init.d/ directory to execute malicious code upon boot in order to gain persistence on the system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Persistence Through init.d Detected\n\nThe `/etc/init.d` directory is used in Linux systems to store the initialization scripts for various services and daemons that are executed during system startup and shutdown.\n\nAttackers can abuse files within the `/etc/init.d/` directory to run scripts, commands or malicious software every time a system is rebooted by converting an executable file into a service file through the `systemd-sysv-generator`. After conversion, a unit file is created within the `/run/systemd/generator.late/` directory.\n\nThis rule looks for the creation of new files within the `/etc/init.d/` directory. Executable files in these directories will automatically run at boot with root privileges.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n#### Possible Investigation Steps\n\n- Investigate the file that was created or modified.\n - !{osquery{\"label\":\"Osquery - Retrieve File Information\",\"query\":\"SELECT * FROM file WHERE path = {{file.path}}\"}}\n- Investigate whether any other files in the `/etc/init.d/` or `/run/systemd/generator.late/` directories have been altered.\n - !{osquery{\"label\":\"Osquery - Retrieve File Listing Information\",\"query\":\"SELECT * FROM file WHERE (path LIKE '/etc/init.d/%' OR path LIKE '/run/systemd/generator.late/%')\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Additional File Listing Information\",\"query\":\"SELECT\\n f.path,\\n u.username AS file_owner,\\n g.groupname AS group_owner,\\n datetime(f.atime, 'unixepoch') AS file_last_access_time,\\n datetime(f.mtime, 'unixepoch') AS file_last_modified_time,\\n datetime(f.ctime, 'unixepoch') AS file_last_status_change_time,\\n datetime(f.btime, 'unixepoch') AS file_created_time,\\n f.size AS size_bytes\\nFROM\\n file f\\n LEFT JOIN users u ON f.uid = u.uid\\n LEFT JOIN groups g ON f.gid = g.gid\\nWHERE (path LIKE '/etc/init.d/%' OR path LIKE '/run/systemd/generator.late/%')\\n\"}}\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate syslog through the `sudo cat /var/log/syslog | grep 'LSB'` command to find traces of the LSB header of the script (if present). If syslog is being ingested into Elasticsearch, the same can be accomplished through Kibana.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate whether this activity is related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Investigate whether the altered scripts call other malicious scripts elsewhere on the file system. \n - If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- If this activity is related to a system administrator who uses init.d for administrative purposes, consider adding exceptions for this specific administrator user account. \n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Related Rules\n\n- Suspicious File Creation in /etc for Persistence - 1c84dd64-7e6c-4bad-ac73-a5014ee37042\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the maliciously created service/init.d files or restore it to the original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.intezer.com/blog/malware-analysis/hiddenwasp-malware-targeting-linux-systems/", - "https://pberba.github.io/security/2022/02/06/linux-threat-hunting-for-persistence-initialization-scripts-and-shell-configuration/#8-boot-or-logon-initialization-scripts-rc-scripts", - "https://www.cyberciti.biz/faq/how-to-enable-rc-local-shell-script-on-systemd-while-booting-linux-system/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1037", - "name": "Boot or Logon Initialization Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/" - } - ] - } - ], - "id": "f23f13a8-753c-42de-a3ea-720f182fd12b", - "rule_id": "474fd20e-14cc-49c5-8160-d9ab4ba16c8b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "host.os.type :\"linux\" and event.action:(\"creation\" or \"file_create_event\" or \"rename\" or \"file_rename_event\") and \nfile.path : /etc/init.d/* and not process.name : (\"dpkg\" or \"dockerd\" or \"rpm\" or \"dnf\" or \"chef-client\" or \"apk\" or \"yum\" or \n\"rpm\" or \"vmis-launcher\" or \"exe\") and not file.extension : (\"swp\" or \"swx\")\n", - "new_terms_fields": [ - "file.path", - "process.name" - ], - "history_window_start": "now-7d", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Suspicious Process Spawned from MOTD Detected", - "description": "Message of the day (MOTD) is the message that is presented to the user when a user connects to a Linux server via SSH or a serial connection. Linux systems contain several default MOTD files located in the \"/etc/update-motd.d/\" and \"/usr/lib/update-notifier/\" directories. These scripts run as the root user every time a user connects over SSH or a serial connection. Adversaries may create malicious MOTD files that grant them persistence onto the target every time a user connects to the system by executing a backdoor script or command. This rule detects the execution of potentially malicious processes through the MOTD utility.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Process Spawned from MOTD Detected\n\nThe message-of-the-day (MOTD) is used to display a customizable system-wide message or information to users upon login in Linux.\n\nAttackers can abuse message-of-the-day (motd) files to run scripts, commands or malicious software every time a user connects to a system over SSH or a serial connection, by creating a new file within the `/etc/update-motd.d/` or `/usr/lib/update-notifier/` directory. Files in these directories will automatically run with root privileges when they are made executable.\n\nThis rule identifies the execution of potentially malicious processes from a MOTD script, which is not likely to occur as default benign behavior. \n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible Investigation Steps\n\n- Investigate the file that was created or modified from which the suspicious process was executed.\n - !{osquery{\"label\":\"Osquery - Retrieve File Information\",\"query\":\"SELECT * FROM file WHERE path = {{file.path}}\"}}\n- Investigate whether any other files in the `/etc/update-motd.d/` or `/usr/lib/update-notifier/` directories have been altered.\n - !{osquery{\"label\":\"Osquery - Retrieve File Listing Information\",\"query\":\"SELECT * FROM file WHERE (path LIKE '/etc/update-motd.d/%' OR path LIKE '/usr/lib/update-notifier/%')\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Additional File Listing Information\",\"query\":\"SELECT\\n f.path,\\n u.username AS file_owner,\\n g.groupname AS group_owner,\\n datetime(f.atime, 'unixepoch') AS file_last_access_time,\\n datetime(f.mtime, 'unixepoch') AS file_last_modified_time,\\n datetime(f.ctime, 'unixepoch') AS file_last_status_change_time,\\n datetime(f.btime, 'unixepoch') AS file_created_time,\\n f.size AS size_bytes\\nFROM\\n file f\\n LEFT JOIN users u ON f.uid = u.uid\\n LEFT JOIN groups g ON f.gid = g.gid\\nWHERE (path LIKE '/etc/update-motd.d/%' OR path LIKE '/usr/lib/update-notifier/%')\\n\"}}\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate whether the altered scripts call other malicious scripts elsewhere on the file system. \n - If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services, and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### Related Rules\n\n- Potential Persistence Through MOTD File Creation Detected - 96d11d31-9a79-480f-8401-da28b194608f\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the MOTD files or restore them to the original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://pberba.github.io/security/2022/02/06/linux-threat-hunting-for-persistence-initialization-scripts-and-shell-configuration/#10-boot-or-logon-initialization-scripts-motd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1037", - "name": "Boot or Logon Initialization Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/" - } - ] - } - ], - "id": "639bc106-9b5a-4a7c-8eb7-5ec6109bc371", - "rule_id": "4ec47004-b34a-42e6-8003-376a123ea447", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where event.type == \"start\" and event.action : (\"exec\", \"exec_event\") and\nprocess.parent.executable : (\"/etc/update-motd.d/*\", \"/usr/lib/update-notifier/*\") and (\n (process.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and (\n (process.args : (\"-i\", \"-l\")) or (process.parent.name == \"socat\" and process.parent.args : \"*exec*\"))) or\n (process.name : (\"nc\", \"ncat\", \"netcat\", \"nc.openbsd\") and process.args_count >= 3 and \n not process.args : (\"-*z*\", \"-*l*\")) or\n (process.name : \"python*\" and process.args : \"-c\" and process.args : (\n \"*import*pty*spawn*\", \"*import*subprocess*call*\"\n )) or\n (process.name : \"perl*\" and process.args : \"-e\" and process.args : \"*socket*\" and process.args : (\n \"*exec*\", \"*system*\"\n )) or\n (process.name : \"ruby*\" and process.args : (\"-e\", \"-rsocket\") and process.args : (\n \"*TCPSocket.new*\", \"*TCPSocket.open*\"\n )) or\n (process.name : \"lua*\" and process.args : \"-e\" and process.args : \"*socket.tcp*\" and process.args : (\n \"*io.popen*\", \"*os.execute*\"\n )) or\n (process.name : \"php*\" and process.args : \"-r\" and process.args : \"*fsockopen*\" and process.args : \"*/bin/*sh*\") or \n (process.name : (\"awk\", \"gawk\", \"mawk\", \"nawk\") and process.args : \"*/inet/tcp/*\") or \n (process.name in (\"openssl\", \"telnet\"))\n) and \nnot (process.parent.args : \"--force\" or process.args : (\"/usr/games/lolcat\", \"/usr/bin/screenfetch\"))\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "FirstTime Seen Account Performing DCSync", - "description": "This rule identifies when a User Account starts the Active Directory Replication Process for the first time. Attackers can use the DCSync technique to get credential information of individual accounts or the entire domain, thus compromising the entire domain.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating FirstTime Seen Account Performing DCSync\n\nActive Directory replication is the process by which the changes that originate on one domain controller are automatically transferred to other domain controllers that store the same data.\n\nActive Directory data consists of objects that have properties, or attributes. Each object is an instance of an object class, and object classes and their respective attributes are defined in the Active Directory schema. Objects are defined by the values of their attributes, and changes to attribute values must be transferred from the domain controller on which they occur to every other domain controller that stores a replica of an affected object.\n\nAdversaries can use the DCSync technique that uses Windows Domain Controller's API to simulate the replication process from a remote domain controller, compromising major credential material such as the Kerberos krbtgt keys that are used legitimately for creating tickets, but also for forging tickets by attackers. This attack requires some extended privileges to succeed (DS-Replication-Get-Changes and DS-Replication-Get-Changes-All), which are granted by default to members of the Administrators, Domain Admins, Enterprise Admins, and Domain Controllers groups. Privileged accounts can be abused to grant controlled objects the right to DCsync/Replicate.\n\nMore details can be found on [Threat Hunter Playbook](https://threathunterplaybook.com/library/windows/active_directory_replication.html?highlight=dcsync#directory-replication-services-auditing) and [The Hacker Recipes](https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync).\n\nThis rule monitors for when a Windows Event ID 4662 (Operation was performed on an Active Directory object) with the access mask 0x100 (Control Access) and properties that contain at least one of the following or their equivalent Schema-Id-GUID (DS-Replication-Get-Changes, DS-Replication-Get-Changes-All, DS-Replication-Get-Changes-In-Filtered-Set) is seen in the environment for the first time in the last 15 days.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Correlate security events 4662 and 4624 (Logon Type 3) by their Logon ID (`winlog.logon.id`) on the Domain Controller (DC) that received the replication request. This will tell you where the AD replication request came from, and if it came from another DC or not.\n- Scope which credentials were compromised (for example, whether all accounts were replicated or specific ones).\n\n### False positive analysis\n\n- Administrators may use custom accounts on Azure AD Connect; investigate if this is part of a new Azure AD account setup, and ensure it is properly secured. If the activity was expected and there is no other suspicious activity involving the host or user, the analyst can dismiss the alert.\n- Although replicating Active Directory (AD) data to non-Domain Controllers is not a common practice and is generally not recommended from a security perspective, some software vendors may require it for their products to function correctly. Investigate if this is part of a new product setup, and ensure it is properly secured. If the activity was expected and there is no other suspicious activity involving the host or user, the analyst can dismiss the alert.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the entire domain or the `krbtgt` user was compromised:\n - Activate your incident response plan for total Active Directory compromise which should include, but not be limited to, a password reset (twice) of the `krbtgt` user.\n- Investigate how the attacker escalated privileges and identify systems they used to conduct lateral movement. Use this information to determine ways the attacker could regain access to the environment.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Privilege Escalation", - "Use Case: Active Directory Monitoring", - "Data Source: Active Directory", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-180815210510.html", - "https://threathunterplaybook.com/library/windows/active_directory_replication.html?highlight=dcsync#directory-replication-services-auditing", - "https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_ad_replication_non_machine_account.yml", - "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0027_windows_audit_directory_service_access.md", - "https://attack.stealthbits.com/privilege-escalation-using-mimikatz-dcsync", - "https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.006", - "name": "DCSync", - "reference": "https://attack.mitre.org/techniques/T1003/006/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - } - ] - } - ] - } - ], - "id": "cfe3d8d0-d3db-45ec-8d53-a4e575f08b87", - "rule_id": "5c6f4c58-b381-452a-8976-f1b1c6aa0def", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.Properties", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectUserName", - "type": "keyword", - "ecs": false - } - ], - "setup": "The 'Audit Directory Service Access' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Access (Success,Failure)\n```", - "type": "new_terms", - "query": "event.action:\"Directory Service Access\" and event.code:\"4662\" and\n winlog.event_data.Properties:(*DS-Replication-Get-Changes* or *DS-Replication-Get-Changes-All* or\n *DS-Replication-Get-Changes-In-Filtered-Set* or *1131f6ad-9c07-11d1-f79f-00c04fc2dcd2* or\n *1131f6aa-9c07-11d1-f79f-00c04fc2dcd2* or *89e95b76-444d-4c62-991a-0facbeda640c*) and\n not winlog.event_data.SubjectUserName:(*$ or MSOL_*)\n", - "new_terms_fields": [ - "winlog.event_data.SubjectUserName" - ], - "history_window_start": "now-15d", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "language": "kuery" - }, - { - "name": "New Systemd Timer Created", - "description": "Detects the creation of a systemd timer within any of the default systemd timer directories. Systemd timers can be used by an attacker to gain persistence, by scheduling the execution of a command or script. Similarly to cron/at, systemd timers can be set up to execute on boot time, or on a specific point in time, which allows attackers to regain access in case the connection to the infected asset was lost.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating New Systemd Timer Created\n\nSystemd timers are used for scheduling and automating recurring tasks or services on Linux systems. \n\nAttackers can leverage systemd timers to run scripts, commands, or malicious software at system boot or on a set time interval by creating a systemd timer and a corresponding systemd service file. \n\nThis rule monitors the creation of new systemd timer files, potentially indicating the creation of a persistence mechanism.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible Investigation Steps\n\n- Investigate the timer file that was created or modified.\n - !{osquery{\"label\":\"Osquery - Retrieve File Information\",\"query\":\"SELECT * FROM file WHERE path = {{file.path}}\"}}\n- Investigate the currently enabled systemd timers through the following command `sudo systemctl list-timers`.\n- Search for the systemd service file named similarly to the timer that was created.\n- Investigate whether any other files in any of the available systemd directories have been altered through OSQuery.\n - !{osquery{\"label\":\"Osquery - Retrieve File Listing Information\",\"query\":\"SELECT * FROM file WHERE (\\npath LIKE '/etc/systemd/system/%' OR \\npath LIKE '/usr/local/lib/systemd/system/%' OR \\npath LIKE '/lib/systemd/system/%' OR\\npath LIKE '/usr/lib/systemd/system/%' OR\\npath LIKE '/home/user/.config/systemd/user/%'\\n)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Additional File Listing Information\",\"query\":\"SELECT\\n f.path,\\n u.username AS file_owner,\\n g.groupname AS group_owner,\\n datetime(f.atime, 'unixepoch') AS file_last_access_time,\\n datetime(f.mtime, 'unixepoch') AS file_last_modified_time,\\n datetime(f.ctime, 'unixepoch') AS file_last_status_change_time,\\n datetime(f.btime, 'unixepoch') AS file_created_time,\\n f.size AS size_bytes\\nFROM\\n file f\\n LEFT JOIN users u ON f.uid = u.uid\\n LEFT JOIN groups g ON f.gid = g.gid\\nWHERE (\\npath LIKE '/etc/systemd/system/%' OR \\npath LIKE '/usr/local/lib/systemd/system/%' OR \\npath LIKE '/lib/systemd/system/%' OR\\npath LIKE '/usr/lib/systemd/system/%' OR\\npath LIKE '/home/{{user.name}}/.config/systemd/user/%'\\n)\\n\"}}\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Investigate whether the altered scripts call other malicious scripts elsewhere on the file system. \n - If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- If this activity is related to a system administrator who uses systemd timers for administrative purposes, consider adding exceptions for this specific administrator user account. \n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the service/timer or restore its original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://opensource.com/article/20/7/systemd-timers", - "https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.006", - "name": "Systemd Timers", - "reference": "https://attack.mitre.org/techniques/T1053/006/" - } - ] - } - ] - } - ], - "id": "8ae016fa-63dd-4610-a0c8-a30c69ace77c", - "rule_id": "7fb500fa-8e24-4bd1-9480-2a819352602c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "host.os.type : \"linux\" and event.action : (\"creation\" or \"file_create_event\") and file.extension : \"timer\" and\nfile.path : (/etc/systemd/system/* or /usr/local/lib/systemd/system/* or /lib/systemd/system/* or \n/usr/lib/systemd/system/* or /home/*/.config/systemd/user/*) and not process.name : (\n \"docker\" or \"dockerd\" or \"dnf\" or \"yum\" or \"rpm\" or \"dpkg\" or \"executor\" or \"cloudflared\"\n)\n", - "new_terms_fields": [ - "host.id", - "file.path", - "process.executable" - ], - "history_window_start": "now-10d", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Suspicious PowerShell Engine ImageLoad", - "description": "Identifies the PowerShell engine being invoked by unexpected processes. Rather than executing PowerShell functionality with powershell.exe, some attackers do this to operate more stealthily.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious PowerShell Engine ImageLoad\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can use PowerShell without having to execute `PowerShell.exe` directly. This technique, often called \"PowerShell without PowerShell,\" works by using the underlying System.Management.Automation namespace and can bypass application allowlisting and PowerShell security features.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Retrieve the implementation (DLL, executable, etc.) and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity can happen legitimately. Some vendors have their own PowerShell implementations that are shipped with some products. These benign true positives (B-TPs) can be added as exceptions if necessary after analysis.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 208, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "1989aca0-bd3f-4077-b6c2-615715746c14", - "rule_id": "852c1f19-68e8-43a6-9dce-340771fe1be3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable.caseless", - "type": "unknown", - "ecs": false - }, - { - "name": "process.name.caseless", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type:windows and event.category:library and \n dll.name:(\"System.Management.Automation.dll\" or \"System.Management.Automation.ni.dll\") and \n not (process.code_signature.subject_name:(\"Microsoft Corporation\" or \"Microsoft Dynamic Code Publisher\" or \"Microsoft Windows\") and process.code_signature.trusted:true and not process.name.caseless:(\"regsvr32.exe\" or \"rundll32.exe\")) and \n not (process.executable.caseless:(?\\:\\\\\\\\Program?Files?\\(x86\\)\\\\\\\\*.exe or ?\\:\\\\\\\\Program?Files\\\\\\\\*.exe) and process.code_signature.trusted:true) and \n not (process.executable.caseless:?\\:\\\\\\\\Windows\\\\\\\\Lenovo\\\\\\\\*.exe and process.code_signature.subject_name:\"Lenovo\" and \n process.code_signature.trusted:true) and not process.executable.caseless : \"C:\\\\Windows\\\\System32\\\\powershell.exe\"\n", - "new_terms_fields": [ - "host.id", - "process.executable", - "user.id" - ], - "history_window_start": "now-14d", - "index": [ - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "File made Immutable by Chattr", - "description": "Detects a file being made immutable using the chattr binary. Making a file immutable means it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the file can not be opened in write mode. Threat actors will commonly utilize this to prevent tampering or modification of their malicious files or any system files they have modified for purposes of persistence (e.g .ssh, /etc/passwd, etc.).", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 33, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1222", - "name": "File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/", - "subtechnique": [ - { - "id": "T1222.002", - "name": "Linux and Mac File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/002/" - } - ] - } - ] - } - ], - "id": "4098ad2c-70d6-40d6-9d19-d4a09f13eac7", - "rule_id": "968ccab9-da51-4a87-9ce2-d3c9782fd759", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and user.name == \"root\" and\n process.executable : \"/usr/bin/chattr\" and process.args : (\"-*i*\", \"+*i*\") and\n not process.parent.executable: (\"/lib/systemd/systemd\", \"/usr/local/uems_agent/bin/*\", \"/usr/lib/systemd/systemd\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Potential Persistence Through MOTD File Creation Detected", - "description": "Message of the day (MOTD) is the message that is presented to the user when a user connects to a Linux server via SSH or a serial connection. Linux systems contain several default MOTD files located in the \"/etc/update-motd.d/\" and \"/usr/lib/update-notifier/\" directories. These scripts run as the root user every time a user connects over SSH or a serial connection. Adversaries may create malicious MOTD files that grant them persistence onto the target every time a user connects to the system by executing a backdoor script or command. This rule detects the creation of potentially malicious files within the default MOTD file directories.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Persistence Through MOTD File Creation Detected\n\nThe message-of-the-day (MOTD) is used to display a customizable system-wide message or information to users upon login in Linux.\n\nAttackers can abuse message-of-the-day (motd) files to run scripts, commands or malicious software every time a user connects to a system over SSH or a serial connection, by creating a new file within the `/etc/update-motd.d/` or `/usr/lib/update-notifier/` directory. Executable files in these directories automatically run with root privileges.\n\nThis rule identifies the creation of new files within the `/etc/update-motd.d/` or `/usr/lib/update-notifier/` directories.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible Investigation Steps\n\n- Investigate the file that was created or modified.\n - !{osquery{\"label\":\"Osquery - Retrieve File Information\",\"query\":\"SELECT * FROM file WHERE path = {{file.path}}\"}}\n- Investigate whether any other files in the `/etc/update-motd.d/` or `/usr/lib/update-notifier/` directories have been altered.\n - !{osquery{\"label\":\"Osquery - Retrieve File Listing Information\",\"query\":\"SELECT * FROM file WHERE (path LIKE '/etc/update-motd.d/%' OR path LIKE '/usr/lib/update-notifier/%')\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Additional File Listing Information\",\"query\":\"SELECT\\n f.path,\\n u.username AS file_owner,\\n g.groupname AS group_owner,\\n datetime(f.atime, 'unixepoch') AS file_last_access_time,\\n datetime(f.mtime, 'unixepoch') AS file_last_modified_time,\\n datetime(f.ctime, 'unixepoch') AS file_last_status_change_time,\\n datetime(f.btime, 'unixepoch') AS file_created_time,\\n f.size AS size_bytes\\nFROM\\n file f\\n LEFT JOIN users u ON f.uid = u.uid\\n LEFT JOIN groups g ON f.gid = g.gid\\nWHERE (path LIKE '/etc/update-motd.d/%' OR path LIKE '/usr/lib/update-notifier/%')\\n\"}}\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate whether the modified scripts call other malicious scripts elsewhere on the file system. \n - If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### Related Rules\n\n- Suspicious Process Spawned from MOTD Detected - 4ec47004-b34a-42e6-8003-376a123ea447\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the MOTD files or restore their original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://pberba.github.io/security/2022/02/06/linux-threat-hunting-for-persistence-initialization-scripts-and-shell-configuration/#10-boot-or-logon-initialization-scripts-motd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1037", - "name": "Boot or Logon Initialization Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/" - } - ] - } - ], - "id": "3159ffe5-fae8-4446-bcd2-d2cc8afa07a6", - "rule_id": "96d11d31-9a79-480f-8401-da28b194608f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "host.os.type :\"linux\" and event.action:(\"creation\" or \"file_create_event\" or \"rename\" or \"file_rename_event\") and \nfile.path : (/etc/update-motd.d/* or /usr/lib/update-notifier/*) and not process.name : (\n dpkg or dockerd or rpm or executor or dnf\n) and not file.extension : (\"swp\" or \"swpx\")\n", - "new_terms_fields": [ - "host.id", - "file.path", - "process.executable" - ], - "history_window_start": "now-10d", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Potential Abuse of Repeated MFA Push Notifications", - "description": "Detects when an attacker abuses the Multi-Factor authentication mechanism by repeatedly issuing login requests until the user eventually accepts the Okta push notification. An adversary may attempt to bypass the Okta MFA policies configured for an organization to obtain unauthorized access.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Abuse of Repeated MFA Push Notifications\n\nMulti-Factor Authentication (MFA) is an effective method to prevent unauthorized access. However, some adversaries may abuse the system by repeatedly sending MFA push notifications until the user unwittingly approves the access.\n\nThis rule detects when a user denies MFA Okta Verify push notifications twice, followed by a successful authentication event within a 10-minute window. This sequence could indicate an adversary's attempt to bypass the Okta MFA policy.\n\n#### Possible investigation steps:\n\n- Identify the user who received the MFA notifications by reviewing the `user.email` field.\n- Identify the time, source IP, and geographical location of the MFA requests and the subsequent successful login.\n- Review the `event.action` field to understand the nature of the events. It should include two `user.mfa.okta_verify.deny_push` actions and one `user.authentication.sso` action.\n- Ask the user if they remember receiving the MFA notifications and subsequently logging into their account.\n- Check if the MFA requests and the successful login occurred during the user's regular activity hours.\n- Look for any other suspicious activity on the account around the same time.\n- Identify whether the same pattern is repeated for other users in your organization. Multiple users receiving push notifications simultaneously might indicate a larger attack.\n\n### False positive analysis:\n\n- Determine if the MFA push notifications were legitimate. Sometimes, users accidentally trigger MFA requests or deny them unintentionally and later approve them.\n- Check if there are known issues with the MFA system causing false denials.\n\n### Response and remediation:\n\n- If unauthorized access is confirmed, initiate your incident response process.\n- Alert the user and your IT department immediately.\n- If possible, isolate the user's account until the issue is resolved.\n- Investigate the source of the unauthorized access.\n- If the account was accessed by an unauthorized party, determine the actions they took after logging in.\n- Consider enhancing your MFA policy to prevent such incidents in the future.\n- Encourage users to report any unexpected MFA notifications immediately.\n- Review and update your incident response plans and security policies based on the findings from the incident.", - "version": 207, - "tags": [ - "Use Case: Identity and Access Audit", - "Tactic: Credential Access", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.mandiant.com/resources/russian-targeting-gov-business", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "56180406-be8a-4f24-ab38-831ab0c1f1f1", - "rule_id": "97a8e584-fd3b-421f-9b9d-9c9d9e57e9d7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - }, - { - "name": "user.email", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "eql", - "query": "sequence by user.email with maxspan=10m\n [any where event.dataset == \"okta.system\" and event.module == \"okta\" and event.action == \"user.mfa.okta_verify.deny_push\"]\n [any where event.dataset == \"okta.system\" and event.module == \"okta\" and event.action == \"user.mfa.okta_verify.deny_push\"]\n [any where event.dataset == \"okta.system\" and event.module == \"okta\" and event.action == \"user.authentication.sso\"]\n", - "language": "eql", - "index": [ - "filebeat-*", - "logs-okta*" - ] - }, - { - "name": "Startup or Run Key Registry Modification", - "description": "Identifies run key or startup key registry modifications. In order to survive reboots and other system interrupts, attackers will modify run keys within the registry or leverage startup folder items as a form of persistence.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "timeline_id": "3e47ef71-ebfc-4520-975c-cb27fc090799", - "timeline_title": "Comprehensive Registry Timeline", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Startup or Run Key Registry Modification\n\nAdversaries may achieve persistence by referencing a program with a registry run key. Adding an entry to the run keys in the registry will cause the program referenced to be executed when a user logs in. These programs will executed under the context of the user and will have the account's permissions. This rule looks for this behavior by monitoring a range of registry run keys.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- There is a high possibility of benign legitimate programs being added to registry run keys. This activity could be based on new software installations, patches, or any kind of network administrator related activity. Before undertaking further investigation, verify that this activity is not benign.\n\n### Related rules\n\n- Suspicious Startup Shell Folder Modification - c8b150f0-0164-475b-a75e-74b47800a9ff\n- Persistent Scripts in the Startup Directory - f7c4dc5a-a58d-491d-9f14-9b66507121c0\n- Startup Folder Persistence via Unsigned Process - 2fba96c0-ade5-4bce-b92f-a5df2509da3f\n- Startup Persistence by a Suspicious Process - 440e2db4-bc7f-4c96-a068-65b78da59bde\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 109, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - } - ] - } - ] - } - ], - "id": "2e658f00-2da8-4f8e-a778-339688911e9c", - "rule_id": "97fc44d3-8dae-4019-ae83-298c3015600f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.value", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and registry.data.strings != null and\n registry.path : (\n /* Machine Hive */\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\\\\*\",\n /* Users Hive */\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\\\\*\"\n ) and\n /* add common legitimate changes without being too restrictive as this is one of the most abused AESPs */\n not registry.data.strings : \"ctfmon.exe /n\" and\n not (registry.value : \"Application Restart #*\" and process.name : \"csrss.exe\") and\n not user.id : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\") and\n not registry.data.strings : (\"?:\\\\Program Files\\\\*.exe\", \"?:\\\\Program Files (x86)\\\\*.exe\") and\n not process.executable : (\"?:\\\\Windows\\\\System32\\\\msiexec.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\") and\n not (\n /* Logitech G Hub */\n (\n process.code_signature.trusted == true and process.code_signature.subject_name == \"Logitech Inc\" and\n process.name : \"lghub_agent.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Program Files\\\\LGHUB\\\\lghub.exe\\\" --background\"\n )\n ) or\n\n /* Google Drive File Stream, Chrome, and Google Update */\n (\n process.code_signature.trusted == true and process.code_signature.subject_name == \"Google LLC\" and\n (\n process.name : \"GoogleDriveFS.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Program Files\\\\Google\\\\Drive File Stream\\\\*\\\\GoogleDriveFS.exe\\\" --startup_mode\"\n ) or\n\n process.name : \"chrome.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\\\" --no-startup-window /prefetch:5\",\n \"\\\"?:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\\\" --no-startup-window /prefetch:5\"\n ) or\n\n process.name : \"GoogleUpdate.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Update\\\\*\\\\GoogleUpdateCore.exe\\\"\"\n )\n )\n ) or\n\n /* MS Programs */\n (\n process.code_signature.trusted == true and process.code_signature.subject_name in (\"Microsoft Windows\", \"Microsoft Corporation\") and\n (\n process.name : \"msedge.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Program Files (x86)\\\\Microsoft\\\\Edge\\\\Application\\\\msedge.exe\\\" --no-startup-window --win-session-start /prefetch:5\"\n ) or\n\n process.name : (\"Update.exe\", \"Teams.exe\") and registry.data.strings : (\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\Teams\\\\Update.exe --processStart \\\"Teams.exe\\\" --process-start-args \\\"--system-initiated\\\"\"\n ) or\n\n process.name : \"OneDriveStandaloneUpdater.exe\" and registry.data.strings : (\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\*\\\\Microsoft.SharePoint.exe\"\n ) or\n\n process.name : \"OneDriveSetup.exe\" and\n registry.value : (\n \"Delete Cached Standalone Update Binary\", \"Delete Cached Update Binary\", \"amd64\", \"Uninstall *\", \"i386\", \"OneDrive\"\n ) and\n registry.data.strings : (\n \"?:\\\\Windows\\\\system32\\\\cmd.exe /q /c * \\\"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\*\\\"\",\n \"?:\\\\Program Files (x86)\\\\Microsoft OneDrive\\\\OneDrive.exe /background *\",\n \"\\\"?:\\\\Program Files (x86)\\\\Microsoft OneDrive\\\\OneDrive.exe\\\" /background *\",\n \"?:\\\\Program Files\\\\Microsoft OneDrive\\\\OneDrive.exe /background *\"\n )\n )\n ) or\n\n /* Slack */\n (\n process.code_signature.trusted == true and process.code_signature.subject_name in (\n \"Slack Technologies, Inc.\", \"Slack Technologies, LLC\"\n ) and process.name : \"slack.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\slack\\\\slack.exe\\\" --process-start-args --startup\"\n )\n ) or\n\n /* WebEx */\n (\n process.code_signature.trusted == true and process.code_signature.subject_name in (\"Cisco WebEx LLC\", \"Cisco Systems, Inc.\") and\n process.name : \"WebexHost.exe\" and registry.data.strings : (\n \"\\\"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\WebEx\\\\WebexHost.exe\\\" /daemon /runFrom=autorun\"\n )\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Microsoft Build Engine Using an Alternate Name", - "description": "An instance of MSBuild, the Microsoft Build Engine, was started after being renamed. This is uncommon behavior and may indicate an attempt to run unnoticed or undetected.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Microsoft Build Engine Using an Alternate Name\n\nThe OriginalFileName attribute of a PE (Portable Executable) file is a metadata field that contains the original name of the executable file when compiled or linked. By using this attribute, analysts can identify renamed instances that attackers can use with the intent of evading detections, application allowlists, and other security protections.\n\nThe Microsoft Build Engine is a platform for building applications. This engine, also known as MSBuild, provides an XML schema for a project file that controls how the build platform processes and builds software, and can be abused to proxy execution of code.\n\nThis rule checks for renamed instances of MSBuild, which can indicate an attempt of evading detections, application allowlists, and other security protections.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 109, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.003", - "name": "Rename System Utilities", - "reference": "https://attack.mitre.org/techniques/T1036/003/" - } - ] - }, - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/", - "subtechnique": [ - { - "id": "T1127.001", - "name": "MSBuild", - "reference": "https://attack.mitre.org/techniques/T1127/001/" - } - ] - } - ] - } - ], - "id": "caa961a9-4962-4dc5-8652-adae3b9cb504", - "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name == \"MSBuild.exe\" and\n not process.name : \"MSBuild.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Credential Access via DCSync", - "description": "This rule identifies when a User Account starts the Active Directory Replication Process. Attackers can use the DCSync technique to get credential information of individual accounts or the entire domain, thus compromising the entire domain.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Credential Access via DCSync\n\nActive Directory replication is the process by which the changes that originate on one domain controller are automatically transferred to other domain controllers that store the same data.\n\nActive Directory data consists of objects that have properties, or attributes. Each object is an instance of an object class, and object classes and their respective attributes are defined in the Active Directory schema. Objects are defined by the values of their attributes, and changes to attribute values must be transferred from the domain controller on which they occur to every other domain controller that stores a replica of an affected object.\n\nAdversaries can use the DCSync technique that uses Windows Domain Controller's API to simulate the replication process from a remote domain controller, compromising major credential material such as the Kerberos krbtgt keys used legitimately for tickets creation, but also tickets forging by attackers. This attack requires some extended privileges to succeed (DS-Replication-Get-Changes and DS-Replication-Get-Changes-All), which are granted by default to members of the Administrators, Domain Admins, Enterprise Admins, and Domain Controllers groups. Privileged accounts can be abused to grant controlled objects the right to DCsync/Replicate.\n\nMore details can be found on [Threat Hunter Playbook](https://threathunterplaybook.com/library/windows/active_directory_replication.html?highlight=dcsync#directory-replication-services-auditing) and [The Hacker Recipes](https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync).\n\nThis rule monitors for Event ID 4662 (Operation was performed on an Active Directory object) and identifies events that use the access mask 0x100 (Control Access) and properties that contain at least one of the following or their equivalent Schema-Id-GUID (DS-Replication-Get-Changes, DS-Replication-Get-Changes-All, DS-Replication-Get-Changes-In-Filtered-Set). It also filters out events that use computer accounts and also Azure AD Connect MSOL accounts (more details [here](https://techcommunity.microsoft.com/t5/microsoft-defender-for-identity/ad-connect-msol-user-suspected-dcsync-attack/m-p/788028)).\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Correlate security events 4662 and 4624 (Logon Type 3) by their Logon ID (`winlog.logon.id`) on the Domain Controller (DC) that received the replication request. This will tell you where the AD replication request came from, and if it came from another DC or not.\n- Scope which credentials were compromised (for example, whether all accounts were replicated or specific ones).\n\n### False positive analysis\n\n- Administrators may use custom accounts on Azure AD Connect, investigate if it is the case, and if it is properly secured. If noisy in your environment due to expected activity, consider adding the corresponding account as a exception.\n- Although replicating Active Directory (AD) data to non-Domain Controllers is not a common practice and is generally not recommended from a security perspective, some software vendors may require it for their products to function correctly. If this rule is noisy in your environment due to expected activity, consider adding the corresponding account as a exception.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the entire domain or the `krbtgt` user was compromised:\n - Activate your incident response plan for total Active Directory compromise which should include, but not be limited to, a password reset (twice) of the `krbtgt` user.\n- Investigate how the attacker escalated privileges and identify systems they used to conduct lateral movement. Use this information to determine ways the attacker could regain access to the environment.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 110, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Privilege Escalation", - "Data Source: Active Directory", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-180815210510.html", - "https://threathunterplaybook.com/library/windows/active_directory_replication.html?highlight=dcsync#directory-replication-services-auditing", - "https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_ad_replication_non_machine_account.yml", - "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0027_windows_audit_directory_service_access.md", - "https://attack.stealthbits.com/privilege-escalation-using-mimikatz-dcsync", - "https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.006", - "name": "DCSync", - "reference": "https://attack.mitre.org/techniques/T1003/006/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - } - ] - } - ] - } - ], - "id": "1955f4d8-bfd0-48f4-8692-b4cdc3cd571c", - "rule_id": "9f962927-1a4f-45f3-a57b-287f2c7029c1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.AccessMask", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.Properties", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectUserName", - "type": "keyword", - "ecs": false - } - ], - "setup": "The 'Audit Directory Service Access' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Access (Success,Failure)\n```", - "type": "eql", - "query": "any where event.action == \"Directory Service Access\" and\n event.code == \"4662\" and winlog.event_data.Properties : (\n\n /* Control Access Rights/Permissions Symbol */\n\n \"*DS-Replication-Get-Changes*\",\n \"*DS-Replication-Get-Changes-All*\",\n \"*DS-Replication-Get-Changes-In-Filtered-Set*\",\n\n /* Identifying GUID used in ACE */\n\n \"*1131f6ad-9c07-11d1-f79f-00c04fc2dcd2*\",\n \"*1131f6aa-9c07-11d1-f79f-00c04fc2dcd2*\",\n \"*89e95b76-444d-4c62-991a-0facbeda640c*\")\n\n /* The right to perform an operation controlled by an extended access right. */\n\n and winlog.event_data.AccessMask : \"0x100\" and\n not winlog.event_data.SubjectUserName : (\"*$\", \"MSOL_*\", \"OpenDNS_Connector\")\n\n /* The Umbrella AD Connector uses the OpenDNS_Connector account to perform replication */\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "PowerShell Keylogging Script", - "description": "Detects the use of Win32 API Functions that can be used to capture user keystrokes in PowerShell scripts. Attackers use this technique to capture user input, looking for credentials and/or other valuable data.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Keylogging Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can abuse PowerShell capabilities to capture user keystrokes with the goal of stealing credentials and other valuable information as credit card data and confidential conversations.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Determine whether the script stores the captured data locally.\n- Investigate whether the script contains exfiltration capabilities and identify the exfiltration server.\n- Assess network data to determine if the host communicated with the exfiltration server.\n\n### False positive analysis\n\n- Regular users do not have a business justification for using scripting utilities to capture keystrokes, making false positives unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Prioritize the response if this alert involves key executives or potentially valuable targets for espionage.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 110, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/EmpireProject/Empire/blob/master/data/module_source/collection/Get-Keystrokes.ps1", - "https://github.com/MojtabaTajik/FunnyKeylogger/blob/master/FunnyLogger.ps1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1056", - "name": "Input Capture", - "reference": "https://attack.mitre.org/techniques/T1056/", - "subtechnique": [ - { - "id": "T1056.001", - "name": "Keylogging", - "reference": "https://attack.mitre.org/techniques/T1056/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - }, - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - } - ], - "id": "5a27473b-55b7-49a2-b526-9a4e7e4322a7", - "rule_id": "bd2c86a0-8b61-4457-ab38-96943984e889", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n (\n powershell.file.script_block_text : (GetAsyncKeyState or NtUserGetAsyncKeyState or GetKeyboardState or \"Get-Keystrokes\") or\n powershell.file.script_block_text : (\n (SetWindowsHookA or SetWindowsHookW or SetWindowsHookEx or SetWindowsHookExA or NtUserSetWindowsHookEx) and\n (GetForegroundWindow or GetWindowTextA or GetWindowTextW or \"WM_KEYBOARD_LL\" or \"WH_MOUSE_LL\")\n )\n ) and not user.id : \"S-1-5-18\"\n and not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\"\n )\n", - "language": "kuery" - }, - { - "name": "Potential Linux Ransomware Note Creation Detected", - "description": "This rule identifies a sequence of a mass file encryption event in conjunction with the creation of a .txt file with a file name containing ransomware keywords executed by the same process in a 1 second timespan. Ransomware is a type of malware that encrypts a victim's files or systems and demands payment (usually in cryptocurrency) in exchange for the decryption key. One important indicator of a ransomware attack is the mass encryption of the file system, after which a new file extension is added to the file.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Impact", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1486", - "name": "Data Encrypted for Impact", - "reference": "https://attack.mitre.org/techniques/T1486/" - } - ] - } - ], - "id": "399a6fb9-4d89-4e89-b6c1-898834e60357", - "rule_id": "c8935a8b-634a-4449-98f7-bb24d3b2c0af", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by process.entity_id, host.id with maxspan=1s \n [file where host.os.type == \"linux\" and event.type == \"change\" and event.action == \"rename\" and file.extension : \"?*\" \n and process.executable : (\"./*\", \"/tmp/*\", \"/var/tmp/*\", \"/dev/shm/*\", \"/var/run/*\", \"/boot/*\", \"/srv/*\", \"/run/*\") and\n file.path : (\n \"/home/*/Downloads/*\", \"/home/*/Documents/*\", \"/root/*\", \"/bin/*\", \"/usr/bin/*\",\n \"/opt/*\", \"/etc/*\", \"/var/log/*\", \"/var/lib/log/*\", \"/var/backup/*\", \"/var/www/*\")] with runs=25\n [file where host.os.type == \"linux\" and event.action == \"creation\" and file.name : (\n \"*crypt*\", \"*restore*\", \"*lock*\", \"*recovery*\", \"*data*\", \"*read*\", \"*instruction*\", \"*how_to*\", \"*ransom*\"\n )]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Attempt to Deactivate an Okta Policy Rule", - "description": "Detects attempts to deactivate a rule within an Okta policy. An adversary may attempt to deactivate a rule within an Okta policy in order to remove or weaken an organization's security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Deactivate an Okta Policy Rule\n\nIdentity and Access Management (IAM) systems like Okta serve as the first line of defense for an organization's network, and are often targeted by adversaries. By disabling security rules, adversaries can circumvent multi-factor authentication, access controls, or other protective measures enforced by these policies, enabling unauthorized access, privilege escalation, or other malicious activities.\n\nThis rule detects attempts to deactivate a rule within an Okta policy, which could be indicative of an adversary's attempt to weaken an organization's security controls. A threat actor may do this to remove barriers to their activities or enable future attacks.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the deactivation attempt.\n- Check the `okta.outcome.result` field to confirm the policy rule deactivation attempt.\n- Check if there are multiple policy rule deactivation attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the policy rule deactivation attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the deactivation attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the deactivation attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the deactivation attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized policy rule deactivation is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific deactivation technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 207, - "tags": [ - "Use Case: Identity and Access Audit", - "Tactic: Defense Evasion", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if Okta MFA rules are regularly deactivated in your organization." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "049d3f5b-944e-48f5-a198-14a2356ce3fe", - "rule_id": "cc92c835-da92-45c9-9f29-b4992ad621a0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:policy.rule.deactivate\n", - "language": "kuery" - }, - { - "name": "Okta User Session Impersonation", - "description": "A user has initiated a session impersonation granting them access to the environment with the permissions of the user they are impersonating. This would likely indicate Okta administrative access and should only ever occur if requested and expected.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Okta User Session Impersonation\n\nThe detection of an Okta User Session Impersonation indicates that a user has initiated a session impersonation which grants them access with the permissions of the user they are impersonating. This type of activity typically indicates Okta administrative access and should only ever occur if requested and expected.\n\n#### Possible investigation steps\n\n- Identify the actor associated with the impersonation event by checking the `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields.\n- Review the `event.action` field to confirm the initiation of the impersonation event.\n- Check the `event.time` field to understand the timing of the event.\n- Check the `okta.target.id`, `okta.target.type`, `okta.target.alternate_id`, or `okta.target.display_name` to identify the user who was impersonated.\n- Review any activities that occurred during the impersonation session. Look for any activities related to the impersonated user's account during and after the impersonation event.\n\n### False positive analysis\n\n- Verify if the session impersonation was part of an approved activity. Check if it was associated with any documented administrative tasks or troubleshooting efforts.\n- Ensure that the impersonation session was initiated by an authorized individual. You can check this by verifying the `okta.actor.id` or `okta.actor.display_name` against the list of approved administrators.\n\n### Response and remediation\n\n- If the impersonation was not authorized, consider it as a breach. Suspend the user account of the impersonator immediately.\n- Reset the user session and invalidate any active sessions related to the impersonated user.\n- If a specific impersonation technique was used, ensure that systems are patched or configured to prevent such techniques.\n- Conduct a thorough investigation to understand the extent of the breach and the potential impact on the systems and data.\n- Review and update your security policies to prevent such incidents in the future.\n- Implement additional monitoring and logging of Okta events to improve visibility of user actions.", - "version": 207, - "tags": [ - "Use Case: Identity and Access Audit", - "Tactic: Credential Access", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.cloudflare.com/cloudflare-investigation-of-the-january-2022-okta-compromise/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [] - } - ], - "id": "c95365d2-588f-4311-b188-71671df90b09", - "rule_id": "cdbebdc1-dc97-43c6-a538-f26a20c0a911", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:user.session.impersonation.initiate\n", - "language": "kuery" - }, - { - "name": "Interactive Terminal Spawned via Python", - "description": "Identifies when a terminal (tty) is spawned via Python. Attackers may upgrade a simple reverse shell to a fully interactive tty after obtaining initial access to a host.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.006", - "name": "Python", - "reference": "https://attack.mitre.org/techniques/T1059/006/" - } - ] - } - ] - } - ], - "id": "e01a0eaa-7941-4ba5-8fbd-96dde71efbd0", - "rule_id": "d76b02ef-fc95-4001-9297-01cb7412232f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and\n(\n (process.parent.name : \"python*\" and process.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\",\n \"fish\") and process.parent.args_count >= 3 and process.parent.args : \"*pty.spawn*\" and process.parent.args : \"-c\") or\n (process.parent.name : \"python*\" and process.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\",\n \"fish\") and process.args : \"*sh\" and process.args_count == 1 and process.parent.args_count == 1)\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Attempts to Brute Force an Okta User Account", - "description": "Identifies when an Okta user account is locked out 3 times within a 3 hour window. An adversary may attempt a brute force or password spraying attack to obtain unauthorized access to user accounts. The default Okta authentication policy ensures that a user account is locked out after 10 failed authentication attempts.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempts to Brute Force an Okta User Account\n\nBrute force attacks aim to guess user credentials through exhaustive trial-and-error attempts. In this context, Okta accounts are targeted.\n\nThis rule fires when an Okta user account has been locked out 3 times within a 3-hour window. This could indicate an attempted brute force or password spraying attack to gain unauthorized access to the user account. Okta's default authentication policy locks a user account after 10 failed authentication attempts.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.alternate_id` field in the alert. This should give the username of the account being targeted.\n- Review the `okta.event_type` field to understand the nature of the events that led to the account lockout.\n- Check the `okta.severity` and `okta.display_message` fields for more context around the lockout events.\n- Look for correlation of events from the same IP address. Multiple lockouts from the same IP address might indicate a single source for the attack.\n- If the IP is not familiar, investigate it. The IP could be a proxy, VPN, Tor node, cloud datacenter, or a legitimate IP turned malicious.\n- Determine if the lockout events occurred during the user's regular activity hours. Unusual timing may indicate malicious activity.\n- Examine the authentication methods used during the lockout events by checking the `okta.authentication_context.credential_type` field.\n\n### False positive analysis:\n\n- Determine whether the account owner or an internal user made repeated mistakes in entering their credentials, leading to the account lockout.\n- Ensure there are no known network or application issues that might cause these events.\n\n### Response and remediation:\n\n- Alert the user and your IT department immediately.\n- If unauthorized access is confirmed, initiate your incident response process.\n- Investigate the source of the attack. If a specific machine or network is compromised, additional steps may need to be taken to address the issue.\n- Require the affected user to change their password.\n- If the attack is ongoing, consider blocking the IP address initiating the brute force attack.\n- Implement account lockout policies to limit the impact of brute force attacks.\n- Encourage users to use complex, unique passwords and consider implementing multi-factor authentication.\n- Check if the compromised account was used to access or alter any sensitive data or systems.", - "version": 207, - "tags": [ - "Use Case: Identity and Access Audit", - "Tactic: Credential Access", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-180m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "@BenB196", - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "65ba47ea-1c26-4040-bd9e-41930b5bfb57", - "rule_id": "e08ccd49-0380-4b2b-8d71-8000377d6e49", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "threshold", - "query": "event.dataset:okta.system and event.action:user.account.lock\n", - "threshold": { - "field": [ - "okta.actor.alternate_id" - ], - "value": 3 - }, - "index": [ - "filebeat-*", - "logs-okta*" - ], - "language": "kuery" - }, - { - "name": "High Number of Okta User Password Reset or Unlock Attempts", - "description": "Identifies a high number of Okta user password reset or account unlock attempts. An adversary may attempt to obtain unauthorized access to Okta user accounts using these methods and attempt to blend in with normal activity in their target's environment and evade detection.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating High Number of Okta User Password Reset or Unlock Attempts\n\nThis rule is designed to detect a suspiciously high number of password reset or account unlock attempts in Okta. Excessive password resets or account unlocks can be indicative of an attacker's attempt to gain unauthorized access to an account.\n\n#### Possible investigation steps:\n- Identify the actor associated with the excessive attempts. The `okta.actor.alternate_id` field can be used for this purpose.\n- Determine the client used by the actor. You can look at `okta.client.device`, `okta.client.ip`, `okta.client.user_agent.raw_user_agent`, `okta.client.ip_chain.ip`, and `okta.client.geographical_context`.\n- Review the `okta.outcome.result` and `okta.outcome.reason` fields to understand the outcome of the password reset or unlock attempts.\n- Review the event actions associated with these attempts. Look at the `event.action` field and filter for actions related to password reset and account unlock attempts.\n- Check for other similar patterns of behavior from the same actor or IP address. If there is a high number of failed login attempts before the password reset or unlock attempts, this may suggest a brute force attack.\n- Also, look at the times when these attempts were made. If these were made during off-hours, it could further suggest an adversary's activity.\n\n### False positive analysis:\n- This alert might be a false positive if there are legitimate reasons for a high number of password reset or unlock attempts. This could be due to the user forgetting their password or account lockouts due to too many incorrect attempts.\n- Check the actor's past behavior. If this is their usual behavior and they have a valid reason for it, then it might be a false positive.\n\n### Response and remediation:\n- If unauthorized attempts are confirmed, initiate the incident response process.\n- Reset the user's password and enforce MFA re-enrollment, if applicable.\n- Block the IP address or device used in the attempts, if they appear suspicious.\n- If the attack was facilitated by a particular technique, ensure your systems are patched or configured to prevent such techniques.\n- Consider a security review of your Okta policies and rules to ensure they follow security best practices.", - "version": 207, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "@BenB196", - "Austin Songer" - ], - "false_positives": [ - "The number of Okta user password reset or account unlock attempts will likely vary between organizations. To fit this rule to their organization, users can duplicate this rule and edit the schedule and threshold values in the new rule." - ], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "8ac48ea1-4918-4b72-a0a8-ea99863d34ca", - "rule_id": "e90ee3af-45fc-432e-a850-4a58cf14a457", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "threshold", - "query": "event.dataset:okta.system and\n event.action:(system.email.account_unlock.sent_message or system.email.password_reset.sent_message or\n system.sms.send_account_unlock_message or system.sms.send_password_reset_message or\n system.voice.send_account_unlock_call or system.voice.send_password_reset_call or\n user.account.unlock_token)\n", - "threshold": { - "field": [ - "okta.actor.alternate_id" - ], - "value": 5 - }, - "index": [ - "filebeat-*", - "logs-okta*" - ], - "language": "kuery" - }, - { - "name": "WMI Incoming Lateral Movement", - "description": "Identifies processes executed via Windows Management Instrumentation (WMI) on a remote host. This could be indicative of adversary lateral movement, but could be noisy if administrators use WMI to remotely manage hosts.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "1c3fdfb9-05ad-4f1c-894e-652f002a22a3", - "rule_id": "f3475224-b179-4f78-8877-c2bd64c26b88", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.token.integrity_level_name", - "type": "unknown", - "ecs": false - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "source.port", - "type": "long", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan = 2s\n\n /* Accepted Incoming RPC connection by Winmgmt service */\n\n [network where host.os.type == \"windows\" and process.name : \"svchost.exe\" and network.direction : (\"incoming\", \"ingress\") and\n source.ip != \"127.0.0.1\" and source.ip != \"::1\" and source.port >= 49152 and destination.port >= 49152\n ]\n\n /* Excluding Common FPs Nessus and SCCM */\n\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"WmiPrvSE.exe\" and \n not process.Ext.token.integrity_level_name : \"system\" and not user.id : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\") and \n not process.executable : \n (\"?:\\\\Program Files\\\\HPWBEM\\\\Tools\\\\hpsum_swdiscovery.exe\", \n \"?:\\\\Windows\\\\CCM\\\\Ccm32BitLauncher.exe\", \n \"?:\\\\Windows\\\\System32\\\\wbem\\\\mofcomp.exe\", \n \"?:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\csc.exe\", \n \"?:\\\\Windows\\\\System32\\\\powercfg.exe\") and \n not (process.executable : \"?:\\\\Windows\\\\System32\\\\msiexec.exe\" and process.args : \"REBOOT=ReallySuppress\") and \n not (process.executable : \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\appcmd.exe\" and process.args : \"uninstall\")\n ]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Potential Credential Access via Windows Utilities", - "description": "Identifies the execution of known Windows utilities often abused to dump LSASS memory or the Active Directory database (NTDS.dit) in preparation for credential access.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Credential Access via Windows Utilities\n\nLocal Security Authority Server Service (LSASS) is a process in Microsoft Windows operating systems that is responsible for enforcing security policy on the system. It verifies users logging on to a Windows computer or server, handles password changes, and creates access tokens.\n\nThe `Ntds.dit` file is a database that stores Active Directory data, including information about user objects, groups, and group membership.\n\nThis rule looks for the execution of utilities that can extract credential data from the LSASS memory and Active Directory `Ntds.dit` file.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to identify what information was targeted.\n- Identify the target computer and its role in the IT environment.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If the host is a domain controller (DC):\n - Activate your incident response plan for total Active Directory compromise.\n - Review the privileges assigned to users that can access the DCs, to ensure that the least privilege principle is being followed and to reduce the attack surface.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 109, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://lolbas-project.github.io/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - }, - { - "id": "T1003.003", - "name": "NTDS", - "reference": "https://attack.mitre.org/techniques/T1003/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.011", - "name": "Rundll32", - "reference": "https://attack.mitre.org/techniques/T1218/011/" - } - ] - } - ] - } - ], - "id": "f2a81581-157b-4cea-b32a-b4ab8853d272", - "rule_id": "00140285-b827-4aee-aa09-8113f58a08f3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (\n (process.pe.original_file_name : \"procdump\" or process.name : \"procdump.exe\") and process.args : \"-ma\"\n ) or\n (\n process.name : \"ProcessDump.exe\" and not process.parent.executable regex~ \"\"\"C:\\\\Program Files( \\(x86\\))?\\\\Cisco Systems\\\\.*\"\"\"\n ) or\n (\n (process.pe.original_file_name : \"WriteMiniDump.exe\" or process.name : \"WriteMiniDump.exe\") and\n not process.parent.executable regex~ \"\"\"C:\\\\Program Files( \\(x86\\))?\\\\Steam\\\\.*\"\"\"\n ) or\n (\n (process.pe.original_file_name : \"RUNDLL32.EXE\" or process.name : \"RUNDLL32.exe\") and\n (process.args : \"MiniDump*\" or process.command_line : \"*comsvcs.dll*#24*\")\n ) or\n (\n (process.pe.original_file_name : \"RdrLeakDiag.exe\" or process.name : \"RdrLeakDiag.exe\") and\n process.args : \"/fullmemdmp\"\n ) or\n (\n (process.pe.original_file_name : \"SqlDumper.exe\" or process.name : \"SqlDumper.exe\") and\n process.args : \"0x01100*\") or\n (\n (process.pe.original_file_name : \"TTTracer.exe\" or process.name : \"TTTracer.exe\") and\n process.args : \"-dumpFull\" and process.args : \"-attach\") or\n (\n (process.pe.original_file_name : \"ntdsutil.exe\" or process.name : \"ntdsutil.exe\") and\n process.args : \"create*full*\") or\n (\n (process.pe.original_file_name : \"diskshadow.exe\" or process.name : \"diskshadow.exe\") and process.args : \"/s\")\n)\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*", - "logs-system.*" - ] - }, - { - "name": "System Shells via Services", - "description": "Windows services typically run as SYSTEM and can be used as a privilege escalation opportunity. Malware or penetration testers may run a shell as a service to gain SYSTEM permissions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating System Shells via Services\n\nAttackers may configure existing services or create new ones to execute system shells to elevate their privileges from administrator to SYSTEM. They can also configure services to execute these shells with persistence payloads.\n\nThis rule looks for system shells being spawned by `services.exe`, which is compatible with the above behavior.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify how the service was created or modified. Look for registry changes events or Windows events related to service activities (for example, 4697 and/or 7045).\n - Examine the created and existent services, the executables or drivers referenced, and command line arguments for suspicious entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the referenced files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Check for commands executed under the spawned shell.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the service or restore it to the original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - } - ], - "id": "dd9f068a-19ed-48d9-8753-98bc366bca73", - "rule_id": "0022d47d-39c7-4f69-a232-4fe9dc7a3acd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"services.exe\" and\n process.name : (\"cmd.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and\n\n /* Third party FP's */\n not process.args : \"NVDisplay.ContainerLocalSystem\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Remote System Discovery Commands", - "description": "Discovery of remote system information using built-in commands, which may be used to move laterally.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remote System Discovery Commands\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `arp` or `nbstat` utilities to enumerate remote systems in the environment, which is useful for attackers to identify lateral movement targets.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "building_block_type": "default", - "version": 109, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Resources: Investigation Guide", - "Data Source: Elastic Defend", - "Data Source: Elastic Endgame", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1016", - "name": "System Network Configuration Discovery", - "reference": "https://attack.mitre.org/techniques/T1016/" - }, - { - "id": "T1018", - "name": "Remote System Discovery", - "reference": "https://attack.mitre.org/techniques/T1018/" - } - ] - } - ], - "id": "a4e9a570-21b4-464e-97a0-1b4777445ac3", - "rule_id": "0635c542-1b96-4335-9b47-126582d2c19a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n ((process.name : \"nbtstat.exe\" and process.args : (\"-n\", \"-s\")) or\n (process.name : \"arp.exe\" and process.args : \"-a\") or\n (process.name : \"nltest.exe\" and process.args : (\"/dclist\", \"/dsgetdc\")) or\n (process.name : \"nslookup.exe\" and process.args : \"*_ldap._tcp.dc.*\") or\n (process.name: (\"dsquery.exe\", \"dsget.exe\") and process.args: \"subnet\") or\n ((((process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or\n ((process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and not \n process.parent.name : \"net.exe\")) and \n process.args : \"group\" and process.args : \"/domain\" and not process.args : \"/add\")))\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Process Termination followed by Deletion", - "description": "Identifies a process termination event quickly followed by the deletion of its executable file. Malware tools and other non-native files dropped or created on a system by an adversary may leave traces to indicate to what occurred. Removal of these files can occur during an intrusion, or as part of a post-intrusion process to minimize the adversary's footprint.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Process Termination followed by Deletion\n\nThis rule identifies an unsigned process termination event quickly followed by the deletion of its executable file. Attackers can delete programs after their execution in an attempt to cover their tracks in a host.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, command line and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately, as programs that exhibit this behavior, such as installers and similar utilities, should be signed. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - } - ] - }, - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.004", - "name": "File Deletion", - "reference": "https://attack.mitre.org/techniques/T1070/004/" - } - ] - } - ] - } - ], - "id": "bf39a3d4-6961-4a61-8d32-787e18009370", - "rule_id": "09443c92-46b3-45a4-8f25-383b028b258d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=5s\n [process where host.os.type == \"windows\" and event.type == \"end\" and\n process.code_signature.trusted != true and\n not process.executable : (\"C:\\\\Windows\\\\SoftwareDistribution\\\\*.exe\", \"C:\\\\Windows\\\\WinSxS\\\\*.exe\")\n ] by process.executable\n [file where host.os.type == \"windows\" and event.type == \"deletion\" and file.extension : (\"exe\", \"scr\", \"com\") and\n not process.executable :\n (\"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Windows\\\\System32\\\\drvinst.exe\") and\n not file.path : (\"?:\\\\Program Files\\\\*.exe\", \"?:\\\\Program Files (x86)\\\\*.exe\")\n ] by file.path\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Potential DLL Side-Loading via Trusted Microsoft Programs", - "description": "Identifies an instance of a Windows trusted program that is known to be vulnerable to DLL Search Order Hijacking starting after being renamed or from a non-standard path. This is uncommon behavior and may indicate an attempt to evade defenses via side loading a malicious DLL within the memory space of one of those processes.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - }, - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.002", - "name": "DLL Side-Loading", - "reference": "https://attack.mitre.org/techniques/T1574/002/" - } - ] - } - ] - } - ], - "id": "12a61b07-348e-4d50-8e7c-5ce5b499eb03", - "rule_id": "1160dcdb-0a0a-4a79-91d8-9b84616edebd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name in (\"WinWord.exe\", \"EXPLORER.EXE\", \"w3wp.exe\", \"DISM.EXE\") and\n not (process.name : (\"winword.exe\", \"explorer.exe\", \"w3wp.exe\", \"Dism.exe\") or\n process.executable : (\"?:\\\\Windows\\\\explorer.exe\",\n \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\Office*\\\\WINWORD.EXE\",\n \"?:\\\\Program Files?(x86)\\\\Microsoft Office\\\\root\\\\Office*\\\\WINWORD.EXE\",\n \"?:\\\\Windows\\\\System32\\\\Dism.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\Dism.exe\",\n \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\w3wp.exe\")\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "UAC Bypass via Windows Firewall Snap-In Hijack", - "description": "Identifies attempts to bypass User Account Control (UAC) by hijacking the Microsoft Management Console (MMC) Windows Firewall snap-in. Attackers bypass UAC to stealthily execute code with elevated permissions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating UAC Bypass via Windows Firewall Snap-In Hijack\n\nWindows User Account Control (UAC) allows a program to elevate its privileges (tracked as low to high integrity levels) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. UAC can deny an operation under high-integrity enforcement, or allow the user to perform the action if they are in the local administrators group and enter an administrator password when prompted.\n\nFor more information about the UAC and how it works, check the [official Microsoft docs page](https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works).\n\nThis rule identifies attempts to bypass User Account Control (UAC) by hijacking the Microsoft Management Console (MMC) Windows Firewall snap-in. Attackers bypass UAC to stealthily execute code with elevated permissions.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze any suspicious spawned processes using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/AzAgarampur/byeintegrity-uac" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - }, - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.014", - "name": "MMC", - "reference": "https://attack.mitre.org/techniques/T1218/014/" - } - ] - } - ] - } - ], - "id": "f3809a76-985b-4399-9894-98ff3356196e", - "rule_id": "1178ae09-5aff-460a-9f2f-455cd0ac4d8e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name == \"mmc.exe\" and\n /* process.Ext.token.integrity_level_name == \"high\" can be added in future for tuning */\n /* args of the Windows Firewall SnapIn */\n process.parent.args == \"WF.msc\" and process.name != \"WerFault.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "PowerShell Script with Token Impersonation Capabilities", - "description": "Detects scripts that contain PowerShell functions, structures, or Windows API functions related to token impersonation/theft. Attackers may duplicate then impersonate another user's token to escalate privileges and bypass access controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 8, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/decoder-it/psgetsystem", - "https://github.com/PowerShellMafia/PowerSploit/blob/master/Privesc/Get-System.ps1", - "https://github.com/EmpireProject/Empire/blob/master/data/module_source/privesc/Invoke-MS16032.ps1", - "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/", - "subtechnique": [ - { - "id": "T1134.001", - "name": "Token Impersonation/Theft", - "reference": "https://attack.mitre.org/techniques/T1134/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - }, - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - } - ], - "id": "48c7c4e6-baa1-4d33-b577-3fa23751fc10", - "rule_id": "11dd9713-0ec6-4110-9707-32daae1ee68c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.directory", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be configured (Enable).\n\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text:(\n \"Invoke-TokenManipulation\" or\n \"ImpersonateNamedPipeClient\" or\n \"NtImpersonateThread\" or\n (\n \"STARTUPINFOEX\" and\n \"UpdateProcThreadAttribute\"\n ) or\n (\n \"AdjustTokenPrivileges\" and\n \"SeDebugPrivilege\"\n ) or\n (\n (\"DuplicateToken\" or\n \"DuplicateTokenEx\") and\n (\"SetThreadToken\" or\n \"ImpersonateLoggedOnUser\" or\n \"CreateProcessWithTokenW\" or\n \"CreatePRocessAsUserW\" or\n \"CreateProcessAsUserA\")\n ) \n ) and\n not (\n user.id:(\"S-1-5-18\" or \"S-1-5-19\" or \"S-1-5-20\") and\n file.directory: \"C:\\\\ProgramData\\\\Microsoft\\\\Windows Defender Advanced Threat Protection\\\\Downloads\"\n ) and\n not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n", - "language": "kuery" - }, - { - "name": "Third-party Backup Files Deleted via Unexpected Process", - "description": "Identifies the deletion of backup files, saved using third-party software, by a process outside of the backup suite. Adversaries may delete Backup files to ensure that recovery from a ransomware attack is less likely.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Third-party Backup Files Deleted via Unexpected Process\n\nBackups are a significant obstacle for any ransomware operation. They allow the victim to resume business by performing data recovery, making them a valuable target.\n\nAttackers can delete backups from the host and gain access to backup servers to remove centralized backups for the environment, ensuring that victims have no alternatives to paying the ransom.\n\nThis rule identifies file deletions performed by a process that does not belong to the backup suite and aims to delete Veritas or Veeam backups.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check if any files on the host machine have been encrypted.\n\n### False positive analysis\n\n- This rule can be triggered by the manual removal of backup files and by removal using other third-party tools that are not from the backup suite. Exceptions can be added for specific accounts and executables, preferably tied together.\n\n### Related rules\n\n- Deleting Backup Catalogs with Wbadmin - 581add16-df76-42bb-af8e-c979bfb39a59\n- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921\n- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4\n- Volume Shadow Copy Deletion via WMIC - dc9c1f74-dac3-48e3-b47f-eb79db358f57\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- Perform data recovery locally or restore the backups from replicated copies (Cloud, other servers, etc.).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Impact", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Certain utilities that delete files for disk cleanup or Administrators manually removing backup files." - ], - "references": [ - "https://www.advintel.io/post/backup-removal-solutions-from-conti-ransomware-with-love" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1490", - "name": "Inhibit System Recovery", - "reference": "https://attack.mitre.org/techniques/T1490/" - }, - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - } - ], - "id": "1e501749-6d2f-44c1-b61d-302082f21ec3", - "rule_id": "11ea6bec-ebde-4d71-a8e9-784948f8e3e9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"deletion\" and\n (\n /* Veeam Related Backup Files */\n (file.extension : (\"VBK\", \"VIB\", \"VBM\") and\n not (\n process.executable : (\"?:\\\\Windows\\\\*\", \"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\") and\n (process.code_signature.trusted == true and process.code_signature.subject_name : \"Veeam Software Group GmbH\")\n )) or\n\n /* Veritas Backup Exec Related Backup File */\n (file.extension : \"BKF\" and\n not process.executable : (\"?:\\\\Program Files\\\\Veritas\\\\Backup Exec\\\\*\",\n \"?:\\\\Program Files (x86)\\\\Veritas\\\\Backup Exec\\\\*\") and\n not file.path : (\"?:\\\\ProgramData\\\\Trend Micro\\\\*\",\n \"?:\\\\Program Files (x86)\\\\Trend Micro\\\\*\",\n \"?:\\\\$RECYCLE.BIN\\\\*\"))\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Component Object Model Hijacking", - "description": "Identifies Component Object Model (COM) hijacking via registry modification. Adversaries may establish persistence by executing malicious content triggered by hijacked references to COM objects.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Component Object Model Hijacking\n\nAdversaries can insert malicious code that can be executed in place of legitimate software through hijacking the COM references and relationships as a means of persistence.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Retrieve the file referenced in the registry and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- Some Microsoft executables will reference the LocalServer32 registry key value for the location of external COM objects.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Tactic: Privilege Escalation", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://bohops.com/2018/08/18/abusing-the-com-registry-structure-part-2-loading-techniques-for-evasion-and-persistence/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.015", - "name": "Component Object Model Hijacking", - "reference": "https://attack.mitre.org/techniques/T1546/015/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.015", - "name": "Component Object Model Hijacking", - "reference": "https://attack.mitre.org/techniques/T1546/015/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "2de2bf48-e9a9-4fb7-a964-e797e5e854ab", - "rule_id": "16a52c14-7883-47af-8745-9357803f0d4c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n /* not necessary but good for filtering privileged installations */\n user.domain != \"NT AUTHORITY\" and\n (\n (\n registry.path : (\"HK*\\\\InprocServer32\\\\\", \"\\\\REGISTRY\\\\*\\\\InprocServer32\\\\\") and\n registry.data.strings: (\"scrobj.dll\", \"C:\\\\*\\\\scrobj.dll\") and\n not registry.path : \"*\\\\{06290BD*-48AA-11D2-8432-006008C3FBFC}\\\\*\"\n ) or\n\n /* in general COM Registry changes on Users Hive is less noisy and worth alerting */\n (registry.path : (\n \"HKEY_USERS\\\\*\\\\InprocServer32\\\\\",\n \"HKEY_USERS\\\\*\\\\LocalServer32\\\\\",\n \"HKEY_USERS\\\\*\\\\DelegateExecute*\",\n \"HKEY_USERS\\\\*\\\\TreatAs*\",\n \"HKEY_USERS\\\\*\\\\ScriptletURL*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\InprocServer32\\\\\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\LocalServer32\\\\\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\DelegateExecute*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\TreatAs*\", \n \"\\\\REGISTRY\\\\USER\\\\*\\\\ScriptletURL*\"\n ) and not \n (\n process.executable : \"?:\\\\Program Files*\\\\Veeam\\\\Backup and Replication\\\\Console\\\\veeam.backup.shell.exe\" and\n registry.path : (\n \"HKEY_USERS\\\\S-1-*_Classes\\\\CLSID\\\\*\\\\LocalServer32\\\\\",\n \"\\\\REGISTRY\\\\USER\\\\S-1-*_Classes\\\\CLSID\\\\*\\\\LocalServer32\\\\\"))\n ) or\n\n (\n registry.path : (\"HKLM\\\\*\\\\InProcServer32\\\\*\", \"\\\\REGISTRY\\\\MACHINE\\\\*\\\\InProcServer32\\\\*\") and\n registry.data.strings : (\"*\\\\Users\\\\*\", \"*\\\\ProgramData\\\\*\")\n )\n ) and\n\n /* removes false-positives generated by OneDrive and Teams */\n not process.name: (\"OneDrive.exe\", \"OneDriveSetup.exe\", \"FileSyncConfig.exe\", \"Teams.exe\") and\n\n /* Teams DLL loaded by regsvr */\n not (process.name: \"regsvr32.exe\" and registry.data.strings : \"*Microsoft.Teams.*.dll\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "New Systemd Service Created by Previously Unknown Process", - "description": "Systemd service files are configuration files in Linux systems used to define and manage system services. Malicious actors can leverage systemd service files to achieve persistence by creating or modifying service files to execute malicious commands or payloads during system startup. This allows them to maintain unauthorized access, execute additional malicious activities, or evade detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://opensource.com/article/20/7/systemd-timers", - "https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.002", - "name": "Systemd Service", - "reference": "https://attack.mitre.org/techniques/T1543/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.002", - "name": "Systemd Service", - "reference": "https://attack.mitre.org/techniques/T1543/002/" - } - ] - } - ] - } - ], - "id": "73ac748d-8878-42c0-bcb1-c5dc21376318", - "rule_id": "17b0a495-4d9f-414c-8ad0-92f018b8e001", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "host.os.type:linux and event.category:file and event.action:(\"creation\" or \"file_create_event\") and file.path:(\n /etc/systemd/system/* or \n /usr/local/lib/systemd/system/* or \n /lib/systemd/system/* or \n /usr/lib/systemd/system/* or \n /home/*/.config/systemd/user/*\n) and \nnot (\n process.name:(\n \"dpkg\" or \"dockerd\" or \"rpm\" or \"snapd\" or \"yum\" or \"exe\" or \"dnf\" or \"dnf-automatic\" or python* or \"puppetd\" or\n \"elastic-agent\" or \"cinc-client\" or \"chef-client\" or \"pacman\" or \"puppet\" or \"cloudflared\"\n ) or \n file.extension:(\"swp\" or \"swpx\")\n)\n", - "new_terms_fields": [ - "host.id", - "file.path", - "process.executable" - ], - "history_window_start": "now-10d", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Rare AWS Error Code", - "description": "A machine learning job detected an unusual error in a CloudTrail message. These can be byproducts of attempted or successful persistence, privilege escalation, defense evasion, discovery, lateral movement, or collection.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Rare AWS Error Code\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.\n\nThis rule uses a machine learning job to detect an unusual error in a CloudTrail message. This can be byproducts of attempted or successful persistence, privilege escalation, defense evasion, discovery, lateral movement, or collection.\n\nDetection alerts from this rule indicate a rare and unusual error code that was associated with the response to an AWS API command or method call.\n\n#### Possible investigation steps\n\n- Examine the history of the error. If the error only manifested recently, it might be related to recent changes in an automation module or script. You can find the error in the `aws.cloudtrail.error_code field` field.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, or network administrator activity.\n- Examine the request parameters. These may indicate the source of the program or the nature of the task being performed when the error occurred.\n - Check whether the error is related to unsuccessful attempts to enumerate or access objects, data, or secrets.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Contact the account owner and confirm whether they are aware of this activity if suspicious.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.\n- The adoption of new services or the addition of new functionality to scripts may generate false positives.\n\n### Related Rules\n\n- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276\n- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1\n- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1\n- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-2h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Rare and unusual errors may indicate an impending service failure state. Rare and unusual user error activity can also be due to manual troubleshooting or reconfiguration attempts by insufficiently privileged users, bugs in cloud automation scripts or workflows, or changes to IAM privileges." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "01ad6d2a-c855-4479-a354-89afdb4249d0", - "rule_id": "19de8096-e2b0-4bd8-80c9-34a820813fff", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": "rare_error_code" - }, - { - "name": "Potential Internal Linux SSH Brute Force Detected", - "description": "Identifies multiple internal consecutive login failures targeting a user account from the same source address within a short time interval. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to these accounts.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Internal Linux SSH Brute Force Detected\n\nThe rule identifies consecutive internal SSH login failures targeting a user account from the same source IP address to the same target host indicating brute force login attempts.\n\n#### Possible investigation steps\n\n- Investigate the login failure user name(s).\n- Investigate the source IP address of the failed ssh login attempt(s).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Infrastructure or availability issue.\n\n### Related Rules\n\n- Potential External Linux SSH Brute Force Detected - fa210b61-b627-4e5e-86f4-17e8270656ab\n- Potential SSH Password Guessing - 8cb84371-d053-4f4f-bce0-c74990e28f28\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 8, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 5, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/", - "subtechnique": [ - { - "id": "T1110.001", - "name": "Password Guessing", - "reference": "https://attack.mitre.org/techniques/T1110/001/" - }, - { - "id": "T1110.003", - "name": "Password Spraying", - "reference": "https://attack.mitre.org/techniques/T1110/003/" - } - ] - } - ] - } - ], - "id": "fcb0fbe9-4252-4634-9b74-79cf87cc31bc", - "rule_id": "1c27fa22-7727-4dd3-81c0-de6da5555feb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, source.ip, user.name with maxspan=15s\n [ authentication where host.os.type == \"linux\" and \n event.action in (\"ssh_login\", \"user_login\") and event.outcome == \"failure\" and\n cidrmatch(source.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \n \"::1\", \"FE80::/10\", \"FF00::/8\") ] with runs = 10\n", - "language": "eql", - "index": [ - "logs-system.auth-*" - ] - }, - { - "name": "Remote File Download via Script Interpreter", - "description": "Identifies built-in Windows script interpreters (cscript.exe or wscript.exe) being used to download an executable file from a remote destination.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remote File Download via Script Interpreter\n\nThe Windows Script Host (WSH) is a Windows automation technology, which is ideal for non-interactive scripting needs, such as logon scripting, administrative scripting, and machine automation.\n\nAttackers commonly use WSH scripts as their initial access method, acting like droppers for second stage payloads, but can also use them to download tools and utilities needed to accomplish their goals.\n\nThis rule looks for DLLs and executables downloaded using `cscript.exe` or `wscript.exe`.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze both the script and the executable involved using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- The usage of these script engines by regular users is unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.005", - "name": "Visual Basic", - "reference": "https://attack.mitre.org/techniques/T1059/005/" - } - ] - } - ] - } - ], - "id": "6e1c751d-cd9c-4958-9143-cf188211c74c", - "rule_id": "1d276579-3380-4095-ad38-e596a01bc64f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "network.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, process.entity_id\n [network where host.os.type == \"windows\" and process.name : (\"wscript.exe\", \"cscript.exe\") and network.protocol != \"dns\" and\n network.direction : (\"outgoing\", \"egress\") and network.type == \"ipv4\" and destination.ip != \"127.0.0.1\"\n ]\n [file where host.os.type == \"windows\" and event.type == \"creation\" and file.extension : (\"exe\", \"dll\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Potential Antimalware Scan Interface Bypass via PowerShell", - "description": "Identifies the execution of PowerShell script with keywords related to different Antimalware Scan Interface (AMSI) bypasses. An adversary may attempt first to disable AMSI before executing further malicious powershell scripts to evade detection.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Antimalware Scan Interface Bypass via PowerShell\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nThe Windows Antimalware Scan Interface (AMSI) is a versatile interface standard that allows your applications and services to integrate with any antimalware product on a machine. AMSI integrates with multiple Windows components, ranging from User Account Control (UAC) to VBA macros and PowerShell.\n\nThis rule identifies scripts that contain methods and classes that can be abused to bypass AMSI.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Determine whether the script was executed and capture relevant information, such as arguments that reveal intent or are indicators of compromise (IoCs).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate commands and scripts executed after this activity was observed.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe:\n - Observe and collect information about the following activities in the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: PowerShell Logs", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/S3cur3Th1sSh1t/Amsi-Bypass-Powershell" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "cbd828d7-3e61-490b-8f20-4ca87bce467e", - "rule_id": "1f0a69c0-3392-4adf-b7d5-6012fd292da8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:\"process\" and host.os.type:windows and\n (powershell.file.script_block_text :\n (\"System.Management.Automation.AmsiUtils\" or\n\t\t\t\t amsiInitFailed or \n\t\t\t\t \"Invoke-AmsiBypass\" or \n\t\t\t\t \"Bypass.AMSI\" or \n\t\t\t\t \"amsi.dll\" or \n\t\t\t\t AntimalwareProvider or \n\t\t\t\t amsiSession or \n\t\t\t\t amsiContext or\n\t\t\t\t AmsiInitialize or \n\t\t\t\t unloadobfuscated or \n\t\t\t\t unloadsilent or \n\t\t\t\t AmsiX64 or \n\t\t\t\t AmsiX32 or \n\t\t\t\t FindAmsiFun) or\n powershell.file.script_block_text:(\"[System.Runtime.InteropServices.Marshal]::Copy\" and \"VirtualProtect\") or\n powershell.file.script_block_text:(\"[Ref].Assembly.GetType(('System.Management.Automation\" and \".SetValue(\")\n )\n and not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n", - "language": "kuery" - }, - { - "name": "Unusual Network Activity from a Windows System Binary", - "description": "Identifies network activity from unexpected system applications. This may indicate adversarial activity as these applications are often leveraged by adversaries to execute code and evade detection.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Network Activity from a Windows System Binary\n\nAttackers can abuse certain trusted developer utilities to proxy the execution of malicious payloads. Since these utilities are usually signed, they can bypass the security controls that were put in place to prevent or detect direct execution.\n\nThis rule identifies network connections established by trusted developer utilities, which can indicate abuse to execute payloads or process masquerading.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- As trusted developer utilities have dual-use purposes, alerts derived from this rule are not essentially malicious. If these utilities are contacting internal or known trusted domains, review their security and consider creating exceptions if the domain is safe.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/", - "subtechnique": [ - { - "id": "T1127.001", - "name": "MSBuild", - "reference": "https://attack.mitre.org/techniques/T1127/001/" - }, - { - "id": "T1218.005", - "name": "Mshta", - "reference": "https://attack.mitre.org/techniques/T1218/005/" - } - ] - }, - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - } - ], - "id": "8e881cad-7b85-43b4-bd31-cfd09b93c69f", - "rule_id": "1fe3b299-fbb5-4657-a937-1d746f2c711a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dns.question.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id with maxspan=5m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n\n /* known applocker bypasses */\n (process.name : \"bginfo.exe\" or\n process.name : \"cdb.exe\" or\n process.name : \"control.exe\" or\n process.name : \"cmstp.exe\" or\n process.name : \"csi.exe\" or\n process.name : \"dnx.exe\" or\n process.name : \"fsi.exe\" or\n process.name : \"ieexec.exe\" or\n process.name : \"iexpress.exe\" or\n process.name : \"installutil.exe\" or\n process.name : \"Microsoft.Workflow.Compiler.exe\" or\n process.name : \"MSBuild.exe\" or\n process.name : \"msdt.exe\" or\n process.name : \"mshta.exe\" or\n process.name : \"msiexec.exe\" or\n process.name : \"msxsl.exe\" or\n process.name : \"odbcconf.exe\" or\n process.name : \"rcsi.exe\" or\n process.name : \"regsvr32.exe\" or\n process.name : \"xwizard.exe\")]\n [network where\n (process.name : \"bginfo.exe\" or\n process.name : \"cdb.exe\" or\n process.name : \"control.exe\" or\n process.name : \"cmstp.exe\" or\n process.name : \"csi.exe\" or\n process.name : \"dnx.exe\" or\n process.name : \"fsi.exe\" or\n process.name : \"ieexec.exe\" or\n process.name : \"iexpress.exe\" or\n process.name : \"installutil.exe\" or\n process.name : \"Microsoft.Workflow.Compiler.exe\" or\n process.name : \"MSBuild.exe\" or\n process.name : \"msdt.exe\" or\n process.name : \"mshta.exe\" or\n (\n process.name : \"msiexec.exe\" and not\n dns.question.name : (\n \"ocsp.digicert.com\", \"ocsp.verisign.com\", \"ocsp.comodoca.com\", \"ocsp.entrust.net\", \"ocsp.usertrust.com\",\n \"ocsp.godaddy.com\", \"ocsp.camerfirma.com\", \"ocsp.globalsign.com\", \"ocsp.sectigo.com\", \"*.local\"\n )\n ) or\n process.name : \"msxsl.exe\" or\n process.name : \"odbcconf.exe\" or\n process.name : \"rcsi.exe\" or\n process.name : \"regsvr32.exe\" or\n process.name : \"xwizard.exe\")]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Persistence via Update Orchestrator Service Hijack", - "description": "Identifies potential hijacking of the Microsoft Update Orchestrator Service to establish persistence with an integrity level of SYSTEM.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Persistence via Update Orchestrator Service Hijack\n\nWindows Update Orchestrator Service is a DCOM service used by other components to install Windows updates that are already downloaded. Windows Update Orchestrator Service was vulnerable to elevation of privileges (any user to local system) due to an improper authorization of the callers. The vulnerability affected the Windows 10 and Windows Server Core products. Fixed by Microsoft on Patch Tuesday June 2020.\n\nThis rule will detect uncommon processes spawned by `svchost.exe` with `UsoSvc` as the command line parameters. Attackers can leverage this technique to elevate privileges or maintain persistence.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Use Case: Vulnerability", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/irsl/CVE-2020-1313" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - }, - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/" - } - ] - } - ], - "id": "88ff6fe8-c2d3-447c-948b-e776c93c4ba7", - "rule_id": "265db8f5-fc73-4d0d-b434-6483b56372e2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.executable : \"C:\\\\Windows\\\\System32\\\\svchost.exe\" and\n process.parent.args : \"UsoSvc\" and\n not process.executable :\n (\"?:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\UUS\\\\Packages\\\\*\\\\amd64\\\\MoUsoCoreWorker.exe\",\n \"?:\\\\Windows\\\\System32\\\\UsoClient.exe\",\n \"?:\\\\Windows\\\\System32\\\\MusNotification.exe\",\n \"?:\\\\Windows\\\\System32\\\\MusNotificationUx.exe\",\n \"?:\\\\Windows\\\\System32\\\\MusNotifyIcon.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerMgr.exe\",\n \"?:\\\\Windows\\\\UUS\\\\amd64\\\\MoUsoCoreWorker.exe\",\n \"?:\\\\Windows\\\\System32\\\\MoUsoCoreWorker.exe\",\n \"?:\\\\Windows\\\\UUS\\\\amd64\\\\UsoCoreWorker.exe\",\n \"?:\\\\Windows\\\\System32\\\\UsoCoreWorker.exe\",\n \"?:\\\\Program Files\\\\Common Files\\\\microsoft shared\\\\ClickToRun\\\\OfficeC2RClient.exe\") and\n not process.name : (\"MoUsoCoreWorker.exe\", \"OfficeC2RClient.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Incoming Execution via PowerShell Remoting", - "description": "Identifies remote execution via Windows PowerShell remoting. Windows PowerShell remoting allows a user to run any Windows PowerShell command on one or more remote computers. This could be an indication of lateral movement.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "PowerShell remoting is a dual-use protocol that can be used for benign or malicious activity. It's important to baseline your environment to determine the amount of noise to expect from this tool." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-7.1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.006", - "name": "Windows Remote Management", - "reference": "https://attack.mitre.org/techniques/T1021/006/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "58e0bd07-4f84-4dfc-a68a-09a0ca99407f", - "rule_id": "2772264c-6fb9-4d9d-9014-b416eed21254", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan = 30s\n [network where host.os.type == \"windows\" and network.direction : (\"incoming\", \"ingress\") and destination.port in (5985, 5986) and\n network.protocol == \"http\" and source.ip != \"127.0.0.1\" and source.ip != \"::1\"]\n [process where host.os.type == \"windows\" and \n event.type == \"start\" and process.parent.name : \"wsmprovhost.exe\" and not process.executable : \"?:\\\\Windows\\\\System32\\\\conhost.exe\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "UAC Bypass Attempt via Windows Directory Masquerading", - "description": "Identifies an attempt to bypass User Account Control (UAC) by masquerading as a Microsoft trusted Windows directory. Attackers may bypass UAC to stealthily execute code with elevated permissions.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating UAC Bypass Attempt via Windows Directory Masquerading\n\nWindows User Account Control (UAC) allows a program to elevate its privileges (tracked as low to high integrity levels) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. UAC can deny an operation under high-integrity enforcement, or allow the user to perform the action if they are in the local administrators group and enter an administrator password when prompted.\n\nFor more information about the UAC and how it works, check the [official Microsoft docs page](https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works).\n\nThis rule identifies an attempt to bypass User Account Control (UAC) by masquerading as a Microsoft trusted Windows directory. Attackers may bypass UAC to stealthily execute code with elevated permissions.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze any suspicious spawned processes using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://medium.com/tenable-techblog/uac-bypass-by-mocking-trusted-directories-24a96675f6e" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - }, - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - } - ], - "id": "b6b8fb31-faf8-4ec7-9bb9-29dfb9a88b42", - "rule_id": "290aca65-e94d-403b-ba0f-62f320e63f51", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.args : (\"C:\\\\Windows \\\\system32\\\\*.exe\", \"C:\\\\Windows \\\\SysWOW64\\\\*.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Enumeration of Privileged Local Groups Membership", - "description": "Identifies instances of an unusual process enumerating built-in Windows privileged local groups membership like Administrators or Remote Desktop users.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Enumeration of Privileged Local Groups Membership\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the enumeration of privileged local groups' membership by suspicious processes, and excludes known legitimate utilities and programs installed. Attackers can use this information to decide the next steps of the attack, such as mapping targets for credential compromise and other post-exploitation activities.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the process, host and user involved on the event.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nThe 'Audit Security Group Management' audit policy must be configured (Success).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nAccount Management >\nAudit Security Group Management (Success)\n```\n\nMicrosoft introduced the [event used](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4799) in this detection rule on Windows 10 and Windows Server 2016 or later operating systems.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "version": 208, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1069", - "name": "Permission Groups Discovery", - "reference": "https://attack.mitre.org/techniques/T1069/", - "subtechnique": [ - { - "id": "T1069.001", - "name": "Local Groups", - "reference": "https://attack.mitre.org/techniques/T1069/001/" - } - ] - } - ] - } - ], - "id": "df68a919-7887-4396-9a5f-c3e4b0ce8101", - "rule_id": "291a0de9-937a-4189-94c0-3e847c8b13e4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "group.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.CallerProcessName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectUserName", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetSid", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'Audit Security Group Management' audit policy must be configured (Success).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nAccount Management >\nAudit Security Group Management (Success)\n```\n\nMicrosoft introduced the event used in this detection rule on Windows 10 and Windows Server 2016 or later operating systems.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "new_terms", - "query": "host.os.type:windows and event.category:iam and event.action:user-member-enumerated and \n (\n group.name:(*Admin* or \"RemoteDesktopUsers\") or\n winlog.event_data.TargetSid:(\"S-1-5-32-544\" or \"S-1-5-32-555\")\n ) and \n not (winlog.event_data.SubjectUserName: (*$ or \"LOCAL SERVICE\" or \"NETWORK SERVICE\") or \n winlog.event_data.CallerProcessName:(\"-\" or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\VSSVC.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\SearchIndexer.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\CompatTelRunner.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\oobe\\\\\\\\msoobe.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\net1.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\svchost.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\Netplwiz.exe or \n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\msiexec.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\CloudExperienceHostBroker.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\wbem\\\\\\\\WmiPrvSE.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\SrTasks.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\diskshadow.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\dfsrs.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\vssadmin.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\dllhost.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\mmc.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\SettingSyncHost.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\inetsrv\\\\\\\\w3wp.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\wsmprovhost.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\spool\\\\\\\\drivers\\\\\\\\x64\\\\\\\\3\\\\\\\\x3jobt3?.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\mstsc.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\esentutl.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\RecoveryDrive.exe or\n *\\:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\SystemPropertiesComputerName.exe or\n *\\:\\\\\\\\Windows\\\\\\\\SysWOW64\\\\\\\\msiexec.exe or\n *\\:\\\\\\\\Windows\\\\\\\\ImmersiveControlPanel\\\\\\\\SystemSettings.exe or\n *\\:\\\\\\\\Windows\\\\\\\\Temp\\\\\\\\rubrik_vmware???\\\\\\\\snaptool.exe or\n *\\:\\\\\\\\Windows\\\\\\\\VeeamVssSupport\\\\\\\\VeeamGuestHelper.exe or\n ?\\:\\\\\\\\WindowsAzure\\\\\\\\*WaAppAgent.exe or\n ?\\:\\\\\\\\Program?Files?\\(x86\\)\\\\\\\\*.exe or\n ?\\:\\\\\\\\Program?Files\\\\\\\\*.exe or\n ?\\:\\\\\\\\$WINDOWS.~BT\\\\\\\\Sources\\\\\\\\*.exe\n )\n )\n", - "new_terms_fields": [ - "host.id", - "winlog.event_data.SubjectUserName", - "winlog.event_data.CallerProcessName" - ], - "history_window_start": "now-14d", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "language": "kuery" - }, - { - "name": "Adobe Hijack Persistence", - "description": "Detects writing executable files that will be automatically launched by Adobe on launch.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Adobe Hijack Persistence\n\nAttackers can replace the `RdrCEF.exe` executable with their own to maintain their access, which will be launched whenever Adobe Acrobat Reader is executed.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://twitter.com/pabraeken/status/997997818362155008" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.010", - "name": "Services File Permissions Weakness", - "reference": "https://attack.mitre.org/techniques/T1574/010/" - } - ] - }, - { - "id": "T1554", - "name": "Compromise Client Software Binary", - "reference": "https://attack.mitre.org/techniques/T1554/" - } - ] - } - ], - "id": "42c2d141-559f-4f5c-808f-2b0f64992c91", - "rule_id": "2bf78aa2-9c56-48de-b139-f169bf99cf86", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n file.path : (\"?:\\\\Program Files (x86)\\\\Adobe\\\\Acrobat Reader DC\\\\Reader\\\\AcroCEF\\\\RdrCEF.exe\",\n \"?:\\\\Program Files\\\\Adobe\\\\Acrobat Reader DC\\\\Reader\\\\AcroCEF\\\\RdrCEF.exe\") and\n not process.name : \"msiexec.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Enumeration of Kernel Modules", - "description": "Loadable Kernel Modules (or LKMs) are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. This identifies attempts to enumerate information about a kernel module.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 206, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Security tools and device drivers may run these programs in order to enumerate kernel modules. Use of these programs by ordinary users is uncommon. These can be exempted by process name or username." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "d4dee1fc-9c8d-46a5-9046-504299999204", - "rule_id": "2d8043ed-5bda-4caf-801c-c1feb7410504", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "event.category:process and host.os.type:linux and event.type:start and (\n (process.name:(lsmod or modinfo)) or \n (process.name:kmod and process.args:list) or \n (process.name:depmod and process.args:(--all or -a))\n) \n", - "new_terms_fields": [ - "host.id", - "process.command_line", - "process.parent.executable" - ], - "history_window_start": "now-14d", - "index": [ - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "Attempt to Disable Syslog Service", - "description": "Adversaries may attempt to disable the syslog service in an attempt to an attempt to disrupt event logging and evade detection by security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "8e9d7202-7234-46b4-ae3b-77881e29da31", - "rule_id": "2f8a1226-5720-437d-9c20-e0029deb6194", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and\n ( (process.name == \"service\" and process.args == \"stop\") or\n (process.name == \"chkconfig\" and process.args == \"off\") or\n (process.name == \"systemctl\" and process.args in (\"disable\", \"stop\", \"kill\"))\n ) and process.args in (\"syslog\", \"rsyslog\", \"syslog-ng\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Startup Folder Persistence via Unsigned Process", - "description": "Identifies files written or modified in the startup folder by unsigned processes. Adversaries may abuse this technique to maintain persistence in an environment.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Startup Folder Persistence via Unsigned Process\n\nThe Windows Startup folder is a special folder in Windows. Programs added to this folder are executed during account logon, without user interaction, providing an excellent way for attackers to maintain persistence.\n\nThis rule looks for unsigned processes writing to the Startup folder locations.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- There is a high possibility of benign legitimate programs being added to Startup folders. This activity could be based on new software installations, patches, or any kind of network administrator related activity. Before undertaking further investigation, verify that this activity is not benign.\n\n### Related rules\n\n- Suspicious Startup Shell Folder Modification - c8b150f0-0164-475b-a75e-74b47800a9ff\n- Persistent Scripts in the Startup Directory - f7c4dc5a-a58d-491d-9f14-9b66507121c0\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - } - ] - } - ] - } - ], - "id": "2083e37d-7327-4c46-8380-1bfd8f025dfd", - "rule_id": "2fba96c0-ade5-4bce-b92f-a5df2509da3f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=5s\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.code_signature.trusted == false and\n /* suspicious paths can be added here */\n process.executable : (\"C:\\\\Users\\\\*.exe\",\n \"C:\\\\ProgramData\\\\*.exe\",\n \"C:\\\\Windows\\\\Temp\\\\*.exe\",\n \"C:\\\\Windows\\\\Tasks\\\\*.exe\",\n \"C:\\\\Intel\\\\*.exe\",\n \"C:\\\\PerfLogs\\\\*.exe\")\n ]\n [file where host.os.type == \"windows\" and event.type != \"deletion\" and user.domain != \"NT AUTHORITY\" and\n file.path : (\"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\*\",\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\StartUp\\\\*\")\n ]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Bypass UAC via Event Viewer", - "description": "Identifies User Account Control (UAC) bypass via eventvwr.exe. Attackers bypass UAC to stealthily execute code with elevated permissions.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Bypass UAC via Event Viewer\n\nWindows User Account Control (UAC) allows a program to elevate its privileges (tracked as low to high integrity levels) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. UAC can deny an operation under high-integrity enforcement, or allow the user to perform the action if they are in the local administrators group and enter an administrator password when prompted.\n\nFor more information about the UAC and how it works, check the [official Microsoft docs page](https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works).\n\nDuring startup, `eventvwr.exe` checks the registry value of the `HKCU\\Software\\Classes\\mscfile\\shell\\open\\command` registry key for the location of `mmc.exe`, which is used to open the `eventvwr.msc` saved console file. If the location of another binary or script is added to this registry value, it will be executed as a high-integrity process without a UAC prompt being displayed to the user. This rule detects this UAC bypass by monitoring processes spawned by `eventvwr.exe` other than `mmc.exe` and `werfault.exe`.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - } - ], - "id": "0232473f-e878-4d13-b708-8d3c4b58bb10", - "rule_id": "31b4c719-f2b4-41f6-a9bd-fce93c2eaf62", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"eventvwr.exe\" and\n not process.executable :\n (\"?:\\\\Windows\\\\SysWOW64\\\\mmc.exe\",\n \"?:\\\\Windows\\\\System32\\\\mmc.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Reverse Shell", - "description": "This detection rule identifies suspicious network traffic patterns associated with TCP reverse shell activity. This activity consists of a parent-child relationship where a network event is followed by the creation of a shell process. An attacker may establish a Linux TCP reverse shell to gain remote access to a target system.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - } - ], - "id": "2a21a2d7-1137-489f-855f-ddb6df2bcf63", - "rule_id": "48b3d2e3-f4e8-41e6-95e6-9b2091228db3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id with maxspan=1s\n [network where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"connection_attempted\", \"connection_accepted\") and \n process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"socat\") and \n destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\"] by process.entity_id\n [process where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"exec\", \"fork\") and \n process.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and \n process.parent.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"socat\") and not \n process.args : \"*imunify360-agent*\"] by process.parent.entity_id\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Deprecated - Potential Reverse Shell via Suspicious Parent Process", - "description": "This detection rule detects the creation of a shell through a suspicious parent child relationship. Any reverse shells spawned by the specified utilities that use a forked process to initialize the connection attempt will be captured through this rule. Attackers may spawn reverse shells to establish persistence onto a target system.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "This rule was deprecated due to its addition to the umbrella `Potential Reverse Shell via Suspicious Child Process` (76e4d92b-61c1-4a95-ab61-5fd94179a1ee) rule.", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - } - ], - "id": "e0eaac95-64d2-47ac-9688-a13638f1f14b", - "rule_id": "4b1a807a-4e7b-414e-8cea-24bf580f6fc5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n", - "type": "eql", - "query": "sequence by host.id, process.parent.entity_id with maxspan=1s\n[ process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"fork\" and (\n (process.name : \"python*\" and process.args == \"-c\" and not process.args == \"/usr/bin/supervisord\") or\n (process.name : \"php*\" and process.args == \"-r\") or\n (process.name : \"perl\" and process.args == \"-e\") or\n (process.name : \"ruby\" and process.args in (\"-e\", \"-rsocket\")) or\n (process.name : \"lua*\" and process.args == \"-e\") or\n (process.name : \"openssl\" and process.args : \"-connect\") or\n (process.name : (\"nc\", \"ncat\", \"netcat\") and process.args_count >= 3 and not process.args == \"-z\") or\n (process.name : \"telnet\" and process.args_count >= 3) or\n (process.name : \"awk\")) and \n process.parent.name : (\"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\") ]\n[ network where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"connection_attempted\", \"connection_accepted\") and \n process.name : (\"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\") and\n destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\" ]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unauthorized Access to an Okta Application", - "description": "Identifies unauthorized access attempts to Okta applications.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 206, - "tags": [ - "Tactic: Initial Access", - "Use Case: Identity and Access Audit", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [] - } - ], - "id": "3caa6156-4b21-446d-bfd1-f62b8d83e46a", - "rule_id": "4edd3e1a-3aa0-499b-8147-4d2ea43b1613", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:app.generic.unauth_app_access_attempt\n", - "language": "kuery" - }, - { - "name": "Exchange Mailbox Export via PowerShell", - "description": "Identifies the use of the Exchange PowerShell cmdlet, New-MailBoxExportRequest, to export the contents of a primary mailbox or archive to a .pst file. Adversaries may target user email to collect sensitive information.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Exchange Mailbox Export via PowerShell\n\nThe `New-MailBoxExportRequest` cmdlet is used to begin the process of exporting contents of a primary mailbox or archive to a .pst file. Note that this is done on a per-mailbox basis and this cmdlet is available only in on-premises Exchange.\nAttackers can abuse this functionality in preparation for exfiltrating contents, which is likely to contain sensitive and strategic data.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the export operation:\n - Identify the user account that performed the action and whether it should perform this kind of action.\n - Contact the account owner and confirm whether they are aware of this activity.\n - Check if this operation was approved and performed according to the organization's change management policy.\n - Retrieve the operation status and use the `Get-MailboxExportRequest` cmdlet to review previous requests.\n - By default, no group in Exchange has the privilege to import or export mailboxes. Investigate administrators that assigned the \"Mailbox Import Export\" privilege for abnormal activity.\n- Investigate if there is a significant quantity of export requests in the alert timeframe. This operation is done on a per-mailbox basis and can be part of a mass export.\n- If the operation was completed successfully:\n - Check if the file is on the path specified in the command.\n - Investigate if the file was compressed, archived, or retrieved by the attacker for exfiltration.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and it is done with proper approval.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If the involved host is not the Exchange server, isolate the host to prevent further post-compromise behavior.\n- Use the `Remove-MailboxExportRequest` cmdlet to remove fully or partially completed export requests.\n- Prioritize cases that involve personally identifiable information (PII) or other classified data.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges of users with the \"Mailbox Import Export\" privilege to ensure that the least privilege principle is being followed.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate exchange system administration activity." - ], - "references": [ - "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/", - "https://docs.microsoft.com/en-us/powershell/module/exchange/new-mailboxexportrequest?view=exchange-ps", - "https://www.elastic.co/security-labs/siestagraph-new-implant-uncovered-in-asean-member-foreign-ministry" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1005", - "name": "Data from Local System", - "reference": "https://attack.mitre.org/techniques/T1005/" - }, - { - "id": "T1114", - "name": "Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/", - "subtechnique": [ - { - "id": "T1114.001", - "name": "Local Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/001/" - }, - { - "id": "T1114.002", - "name": "Remote Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/002/" - } - ] - } - ] - } - ], - "id": "9fc852fc-616d-407f-a801-0f72ca3ae8f5", - "rule_id": "54a81f68-5f2a-421e-8eed-f888278bb712", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : \"New-MailboxExportRequest\" and\n not (\n file.path : (\n ?\\:\\\\\\\\Users\\\\\\\\*\\\\\\\\AppData\\\\\\\\Roaming\\\\\\\\Microsoft\\\\\\\\Exchange\\\\\\\\RemotePowerShell\\\\\\\\*\n ) and file.name:(*.psd1 or *.psm1)\n )\n", - "language": "kuery" - }, - { - "name": "RDP Enabled via Registry", - "description": "Identifies registry write modifications to enable Remote Desktop Protocol (RDP) access. This could be indicative of adversary lateral movement preparation.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating RDP Enabled via Registry\n\nMicrosoft Remote Desktop Protocol (RDP) is a proprietary Microsoft protocol that enables remote connections to other computers, typically over TCP port 3389.\n\nAttackers can use RDP to conduct their actions interactively. Ransomware operators frequently use RDP to access victim servers, often using privileged accounts.\n\nThis rule detects modification of the fDenyTSConnections registry key to the value `0`, which specifies that remote desktop connections are enabled. Attackers can abuse remote registry, use psexec, etc., to enable RDP and move laterally.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the user to check if they are aware of the operation.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check whether it makes sense to enable RDP to this host, given its role in the environment.\n- Check if the host is directly exposed to the internet.\n- Check whether privileged accounts accessed the host shortly after the modification.\n- Review network events within a short timespan of this alert for incoming RDP connection attempts.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Check whether the user should be performing this kind of activity, whether they are aware of it, whether RDP should be open, and whether the action exposes the environment to unnecessary risks.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If RDP is needed, make sure to secure it using firewall rules:\n - Allowlist RDP traffic to specific trusted hosts.\n - Restrict RDP logins to authorized non-administrator accounts, where possible.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.001", - "name": "Remote Desktop Protocol", - "reference": "https://attack.mitre.org/techniques/T1021/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "23ebcca2-4083-467f-8663-c8dd1970233f", - "rule_id": "58aa72ca-d968-4f34-b9f7-bea51d75eb50", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and \n event.type in (\"creation\", \"change\") and\n registry.path : \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Terminal Server\\\\fDenyTSConnections\" and\n registry.data.strings : (\"0\", \"0x00000000\") and\n not process.executable : (\"?:\\\\Windows\\\\System32\\\\SystemPropertiesRemote.exe\", \n \"?:\\\\Windows\\\\System32\\\\SystemPropertiesComputerName.exe\", \n \"?:\\\\Windows\\\\System32\\\\SystemPropertiesAdvanced.exe\", \n \"?:\\\\Windows\\\\System32\\\\SystemSettingsAdminFlows.exe\", \n \"?:\\\\Windows\\\\WinSxS\\\\*\\\\TiWorker.exe\", \n \"?:\\\\Windows\\\\system32\\\\svchost.exe\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Privilege Escalation via InstallerFileTakeOver", - "description": "Identifies a potential exploitation of InstallerTakeOver (CVE-2021-41379) default PoC execution. Successful exploitation allows an unprivileged user to escalate privileges to SYSTEM.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Privilege Escalation via InstallerFileTakeOver\n\nInstallerFileTakeOver is a weaponized escalation of privilege proof of concept (EoP PoC) to the CVE-2021-41379 vulnerability. Upon successful exploitation, an unprivileged user will escalate privileges to SYSTEM/NT AUTHORITY.\n\nThis rule detects the default execution of the PoC, which overwrites the `elevation_service.exe` DACL and copies itself to the location to escalate privileges. An attacker is able to still take over any file that is not in use (locked), which is outside the scope of this rule.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Look for additional processes spawned by the process, command lines, and network communications.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- Verify whether a digital signature exists in the executable, and if it is valid.\n\n### Related rules\n\n- Suspicious DLL Loaded for Persistence or Privilege Escalation - bfeaf89b-a2a7-48a3-817f-e41829dc61ee\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Resources: Investigation Guide", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/klinix5/InstallerFileTakeOver" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "de02bdbf-7183-4f0d-adfa-3e8f7061e1ff", - "rule_id": "58c6d58b-a0d3-412d-b3b8-0981a9400607", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.token.integrity_level_name", - "type": "unknown", - "ecs": false - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.Ext.token.integrity_level_name : \"System\" and\n (\n (process.name : \"elevation_service.exe\" and\n not process.pe.original_file_name == \"elevation_service.exe\") or\n \n (process.name : \"elevation_service.exe\" and\n not process.code_signature.trusted == true) or\n\n (process.parent.name : \"elevation_service.exe\" and\n process.name : (\"rundll32.exe\", \"cmd.exe\", \"powershell.exe\"))\n ) and\n not\n (\n process.name : \"elevation_service.exe\" and process.code_signature.trusted == true and\n process.pe.original_file_name == null\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Secure File Deletion via SDelete Utility", - "description": "Detects file name patterns generated by the use of Sysinternals SDelete utility to securely delete a file via multiple file overwrite and rename operations.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Secure File Deletion via SDelete Utility\n\nSDelete is a tool primarily used for securely deleting data from storage devices, making it unrecoverable. Microsoft develops it as part of the Sysinternals Suite. Although commonly used to delete data securely, attackers can abuse it to delete forensic indicators and remove files as a post-action to a destructive action such as ransomware or data theft to hinder recovery efforts.\n\nThis rule identifies file name patterns generated by the use of SDelete utility to securely delete a file via multiple file overwrite and rename operations.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Examine the command line and identify the files deleted, their importance and whether they could be the target of antiforensics activity.\n\n### False positive analysis\n\n- This is a dual-use tool, meaning its usage is not inherently malicious. Analysts can dismiss the alert if the administrator is aware of the activity, no other suspicious activity was identified, and there are justifications for the execution.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n - Prioritize cases involving critical servers and users.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If important data was encrypted, deleted, or modified, activate your data recovery plan.\n - Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Impact", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.004", - "name": "File Deletion", - "reference": "https://attack.mitre.org/techniques/T1070/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - } - ], - "id": "ecb61d30-c95e-43c0-b62b-92991d417e8f", - "rule_id": "5aee924b-6ceb-4633-980e-1bde8cdb40c5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"change\" and file.name : \"*AAA.AAA\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "PowerShell Suspicious Discovery Related Windows API Functions", - "description": "This rule detects the use of discovery-related Windows API functions in PowerShell Scripts. Attackers can use these functions to perform various situational awareness related activities, like enumerating users, shares, sessions, domain trusts, groups, etc.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Suspicious Discovery Related Windows API Functions\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can use PowerShell to interact with the Win32 API to bypass command line based detections, using libraries like PSReflect or Get-ProcAddress Cmdlet.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Check for additional PowerShell and command-line logs that indicate that imported functions were run.\n\n### False positive analysis\n\n- Discovery activities themselves are not inherently malicious if occurring in isolation, as long as the script does not contain other capabilities, and there are no other alerts related to the user or host; such alerts can be dismissed. However, analysts should keep in mind that this is not a common way of getting information, making it suspicious.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 110, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Tactic: Collection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate PowerShell scripts that make use of these functions." - ], - "references": [ - "https://github.com/BC-SECURITY/Empire/blob/9259e5106986847d2bb770c4289c0c0f1adf2344/data/module_source/situational_awareness/network/powerview.ps1#L21413", - "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1069", - "name": "Permission Groups Discovery", - "reference": "https://attack.mitre.org/techniques/T1069/", - "subtechnique": [ - { - "id": "T1069.001", - "name": "Local Groups", - "reference": "https://attack.mitre.org/techniques/T1069/001/" - } - ] - }, - { - "id": "T1087", - "name": "Account Discovery", - "reference": "https://attack.mitre.org/techniques/T1087/", - "subtechnique": [ - { - "id": "T1087.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1087/001/" - } - ] - }, - { - "id": "T1482", - "name": "Domain Trust Discovery", - "reference": "https://attack.mitre.org/techniques/T1482/" - }, - { - "id": "T1135", - "name": "Network Share Discovery", - "reference": "https://attack.mitre.org/techniques/T1135/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - }, - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1039", - "name": "Data from Network Shared Drive", - "reference": "https://attack.mitre.org/techniques/T1039/" - } - ] - } - ], - "id": "af0c2da2-1016-4843-aca1-44538eb17bd3", - "rule_id": "61ac3638-40a3-44b2-855a-985636ca985e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n NetShareEnum or\n NetWkstaUserEnum or\n NetSessionEnum or\n NetLocalGroupEnum or\n NetLocalGroupGetMembers or\n DsGetSiteName or\n DsEnumerateDomainTrusts or\n WTSEnumerateSessionsEx or\n WTSQuerySessionInformation or\n LsaGetLogonSessionData or\n QueryServiceObjectSecurity or\n GetComputerNameEx or\n NetWkstaGetInfo or\n GetUserNameEx or\n NetUserEnum or\n NetUserGetInfo or\n NetGroupEnum or\n NetGroupGetInfo or\n NetGroupGetUsers or\n NetWkstaTransportEnum or\n NetServerGetInfo or\n LsaEnumerateTrustedDomains or\n NetScheduleJobEnum or\n NetUserModalsGet\n )\n and not user.id : (\"S-1-5-18\" or \"S-1-5-19\")\n", - "language": "kuery" - }, - { - "name": "Network Connection via Signed Binary", - "description": "Binaries signed with trusted digital certificates can execute on Windows systems protected by digital signature validation. Adversaries may use these binaries to 'live off the land' and execute malicious files that could bypass application allowlists and signature validation.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Network Connection via Signed Binary\n\nBy examining the specific traits of Windows binaries (such as process trees, command lines, network connections, registry modifications, and so on) it's possible to establish a baseline of normal activity. Deviations from this baseline can indicate malicious activity, such as masquerading and deserve further investigation.\n\nThis rule looks for the execution of `expand.exe`, `extrac32.exe`, `ieexec.exe`, or `makecab.exe` utilities, followed by a network connection to an external address. Attackers can abuse utilities to execute malicious files or masquerade as those utilities to bypass detections and evade defenses.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n - Investigate the file digital signature and process original filename, if suspicious, treat it as potential malware.\n- Investigate the target host that the signed binary is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of destination IP address and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "a65a0f1f-6ca2-4bc6-b4de-23cc92ee7fff", - "rule_id": "63e65ec3-43b1-45b0-8f2d-45b34291dc44", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and (process.name : \"expand.exe\" or process.name : \"extrac32.exe\" or\n process.name : \"ieexec.exe\" or process.name : \"makecab.exe\") and\n event.type == \"start\"]\n [network where host.os.type == \"windows\" and (process.name : \"expand.exe\" or process.name : \"extrac32.exe\" or\n process.name : \"ieexec.exe\" or process.name : \"makecab.exe\") and\n not cidrmatch(destination.ip,\n \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\", \"192.0.0.0/29\", \"192.0.0.8/32\",\n \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\",\n \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\", \"FE80::/10\", \"FF00::/8\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Connection to Commonly Abused Web Services", - "description": "Adversaries may implement command and control (C2) communications that use common web services to hide their activity. This attack technique is typically targeted at an organization and uses web services common to the victim network, which allows the adversary to blend into legitimate traffic activity. These popular services are typically targeted since they have most likely been used before compromise, which helps malicious traffic blend in.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Connection to Commonly Abused Web Services\n\nAdversaries may use an existing, legitimate external Web service as a means for relaying data to/from a compromised system. Popular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise.\n\nThis rule looks for processes outside known legitimate program locations communicating with a list of services that can be abused for exfiltration or command and control.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Verify whether the digital signature exists in the executable.\n- Identify the operation type (upload, download, tunneling, etc.).\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This rule has a high chance to produce false positives because it detects communication with legitimate services. Noisy false positives can be added as exceptions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1102", - "name": "Web Service", - "reference": "https://attack.mitre.org/techniques/T1102/" - }, - { - "id": "T1568", - "name": "Dynamic Resolution", - "reference": "https://attack.mitre.org/techniques/T1568/", - "subtechnique": [ - { - "id": "T1568.002", - "name": "Domain Generation Algorithms", - "reference": "https://attack.mitre.org/techniques/T1568/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1567", - "name": "Exfiltration Over Web Service", - "reference": "https://attack.mitre.org/techniques/T1567/", - "subtechnique": [ - { - "id": "T1567.001", - "name": "Exfiltration to Code Repository", - "reference": "https://attack.mitre.org/techniques/T1567/001/" - }, - { - "id": "T1567.002", - "name": "Exfiltration to Cloud Storage", - "reference": "https://attack.mitre.org/techniques/T1567/002/" - } - ] - } - ] - } - ], - "id": "31be6f76-5456-4faf-a829-19b3dc977e8d", - "rule_id": "66883649-f908-4a5b-a1e0-54090a1d3a32", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dns.question.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "network where host.os.type == \"windows\" and network.protocol == \"dns\" and\n process.name != null and user.id not in (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\") and\n /* Add new WebSvc domains here */\n dns.question.name :\n (\n \"raw.githubusercontent.*\",\n \"*.pastebin.*\",\n \"*drive.google.*\",\n \"*docs.live.*\",\n \"*api.dropboxapi.*\",\n \"*dropboxusercontent.*\",\n \"*onedrive.*\",\n \"*4shared.*\",\n \"*.file.io\",\n \"*filebin.net\",\n \"*slack-files.com\",\n \"*ghostbin.*\",\n \"*ngrok.*\",\n \"*portmap.*\",\n \"*serveo.net\",\n \"*localtunnel.me\",\n \"*pagekite.me\",\n \"*localxpose.io\",\n \"*notabug.org\",\n \"rawcdn.githack.*\",\n \"paste.nrecom.net\",\n \"zerobin.net\",\n \"controlc.com\",\n \"requestbin.net\",\n \"cdn.discordapp.com\",\n \"discordapp.com\",\n \"discord.com\",\n \"script.google.com\",\n \"script.googleusercontent.com\"\n ) and\n /* Insert noisy false positives here */\n not (\n process.executable : (\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\WWAHost.exe\",\n \"?:\\\\Windows\\\\System32\\\\smartscreen.exe\",\n \"?:\\\\Windows\\\\System32\\\\MicrosoftEdgeCP.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\*\\\\MsMpEng.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Programs\\\\Fiddler\\\\Fiddler.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\Code.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\OneDrive.exe\",\n \"?:\\\\Windows\\\\system32\\\\mobsync.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\mobsync.exe\"\n ) or\n \n /* Discord App */\n (process.name : \"Discord.exe\" and (process.code_signature.subject_name : \"Discord Inc.\" and\n process.code_signature.trusted == true) and dns.question.name : (\"discord.com\", \"cdn.discordapp.com\", \"discordapp.com\")\n ) or \n\n /* MS Sharepoint */\n (process.name : \"Microsoft.SharePoint.exe\" and (process.code_signature.subject_name : \"Microsoft Corporation\" and\n process.code_signature.trusted == true) and dns.question.name : \"onedrive.live.com\"\n ) or \n\n /* Firefox */\n (process.name : \"firefox.exe\" and (process.code_signature.subject_name : \"Mozilla Corporation\" and\n process.code_signature.trusted == true)\n )\n ) \n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Attempt to Modify an Okta Policy", - "description": "Detects attempts to modify an Okta policy. An adversary may attempt to modify an Okta policy in order to weaken an organization's security controls. For example, an adversary may attempt to modify an Okta multi-factor authentication (MFA) policy in order to weaken the authentication requirements for user accounts.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Modify an Okta Policy\n\nModifications to Okta policies may indicate attempts to weaken an organization's security controls. If such an attempt is detected, consider the following steps for investigation.\n\n#### Possible investigation steps:\n- Identify the actor associated with the event. Check the fields `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, and `okta.actor.display_name`.\n- Determine the client used by the actor. You can look at `okta.client.device`, `okta.client.ip`, `okta.client.user_agent.raw_user_agent`, `okta.client.ip_chain.ip`, and `okta.client.geographical_context`.\n- Check the nature of the policy modification. You can review the `okta.target` field, especially `okta.target.display_name` and `okta.target.id`.\n- Examine the `okta.outcome.result` and `okta.outcome.reason` fields to understand the outcome of the modification attempt.\n- Check if there have been other similar modification attempts in a short time span from the same actor or IP address.\n\n### False positive analysis:\n- This alert might be a false positive if Okta policies are regularly updated in your organization as a part of normal operations.\n- Check if the actor associated with the event has legitimate rights to modify the Okta policies.\n- Verify the actor's geographical location and the time of the modification attempt. If these align with the actor's regular behavior, it could be a false positive.\n\n### Response and remediation:\n- If unauthorized modification is confirmed, initiate the incident response process.\n- Lock the actor's account and enforce password change as an immediate response.\n- Reset MFA tokens for the actor and enforce re-enrollment, if applicable.\n- Review any other actions taken by the actor to assess the overall impact.\n- If the attack was facilitated by a particular technique, ensure your systems are patched or configured to prevent such techniques.\n- Consider a security review of your Okta policies and rules to ensure they follow security best practices.", - "version": 206, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if Okta policies are regularly modified in your organization." - ], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "4eddc15b-f1dd-481e-b18e-5ede59d6b8cc", - "rule_id": "6731fbf2-8f28-49ed-9ab9-9a918ceb5a45", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:policy.lifecycle.update\n", - "language": "kuery" - }, - { - "name": "Attempt to Revoke Okta API Token", - "description": "Identifies attempts to revoke an Okta API token. An adversary may attempt to revoke or delete an Okta API token to disrupt an organization's business operations.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Revoke Okta API Token\n\nThe rule alerts when attempts are made to revoke an Okta API token. The API tokens are critical for integration services, and revoking them may lead to disruption in services. Therefore, it's important to validate these activities.\n\n#### Possible investigation steps:\n- Identify the actor associated with the API token revocation attempt. You can use the `okta.actor.alternate_id` field for this purpose.\n- Determine the client used by the actor. Review the `okta.client.device`, `okta.client.ip`, `okta.client.user_agent.raw_user_agent`, `okta.client.ip_chain.ip`, and `okta.client.geographical_context` fields.\n- Verify if the API token revocation was authorized or part of some planned activity.\n- Check the `okta.outcome.result` and `okta.outcome.reason` fields to see if the attempt was successful or failed.\n- Analyze the past activities of the actor involved in this action. An actor who usually performs such activities may indicate a legitimate reason.\n- Evaluate the actions that happened just before and after this event. It can help understand the full context of the activity.\n\n### False positive analysis:\n- It might be a false positive if the action was part of a planned activity or was performed by an authorized person.\n\n### Response and remediation:\n- If unauthorized revocation attempts are confirmed, initiate the incident response process.\n- Block the IP address or device used in the attempts, if they appear suspicious.\n- Reset the user's password and enforce MFA re-enrollment, if applicable.\n- Conduct a review of Okta policies and ensure they are in accordance with security best practices.\n- If the revoked token was used for critical integrations, coordinate with the relevant team to minimize the impact.", - "version": 206, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "If the behavior of revoking Okta API tokens is expected, consider adding exceptions to this rule to filter false positives." - ], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1531", - "name": "Account Access Removal", - "reference": "https://attack.mitre.org/techniques/T1531/" - } - ] - } - ], - "id": "cccbec70-644b-403c-9b04-dccdf1586362", - "rule_id": "676cff2b-450b-4cf1-8ed2-c0c58a4a2dd7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:system.api_token.revoke\n", - "language": "kuery" - }, - { - "name": "High Number of Process Terminations", - "description": "This rule identifies a high number (10) of process terminations via pkill from the same host within a short time period.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating High Number of Process Terminations\n\nAttackers can kill processes for a variety of purposes. For example, they can kill process associated with business applications and databases to release the lock on files used by these applications so they may be encrypted,or stop security and backup solutions, etc.\n\nThis rule identifies a high number (10) of process terminations via pkill from the same host within a short time period.\n\n#### Possible investigation steps\n\n- Examine the entry point to the host and user in action via the Analyse View.\n - Identify the session entry leader and session user.\n- Examine the contents of session leading to the process termination(s) via the Session View.\n - Examine the command execution pattern in the session, which may lead to suspricous activities.\n- Examine the process killed during the malicious execution\n - Identify imment threat to the system from the process killed.\n - Take necessary incident response actions to respawn necessary process.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further destructive behavior, which is commonly associated with this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system or restore it to the operational state.\n- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 109, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Impact", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1489", - "name": "Service Stop", - "reference": "https://attack.mitre.org/techniques/T1489/" - } - ] - } - ], - "id": "077a0e1b-9a04-4521-8e24-57b38fca1ac5", - "rule_id": "67f8443a-4ff3-4a70-916d-3cfa3ae9f02b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "threshold", - "query": "event.category:process and host.os.type:linux and event.type:start and process.name:\"pkill\" and process.args:\"-f\"\n", - "threshold": { - "field": [ - "host.id", - "process.executable", - "user.name" - ], - "value": 10 - }, - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Potential Windows Error Manager Masquerading", - "description": "Identifies suspicious instances of the Windows Error Reporting process (WerFault.exe or Wermgr.exe) with matching command-line and process executable values performing outgoing network connections. This may be indicative of a masquerading attempt to evade suspicious child process behavior detections.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Windows Error Manager Masquerading\n\nBy examining the specific traits of Windows binaries -- such as process trees, command lines, network connections, registry modifications, and so on -- it's possible to establish a baseline of normal activity. Deviations from this baseline can indicate malicious activity, such as masquerading and deserve further investigation.\n\nThis rule identifies a potential malicious process masquerading as `wermgr.exe` or `WerFault.exe`, by looking for a process creation with no arguments followed by a network connection.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legit Application Crash with rare Werfault commandline value" - ], - "references": [ - "https://twitter.com/SBousseaden/status/1235533224337641473", - "https://www.hexacorn.com/blog/2019/09/20/werfault-command-line-switches-v0-1/", - "https://app.any.run/tasks/26051d84-b68e-4afb-8a9a-76921a271b81/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - } - ], - "id": "e5667594-fc8e-4fbd-9e3e-21d2729cf586", - "rule_id": "6ea41894-66c3-4df7-ad6b-2c5074eb3df8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan = 5s\n [process where host.os.type == \"windows\" and event.type:\"start\" and process.name : (\"wermgr.exe\", \"WerFault.exe\") and process.args_count == 1]\n [network where host.os.type == \"windows\" and process.name : (\"wermgr.exe\", \"WerFault.exe\") and network.protocol != \"dns\" and\n network.direction : (\"outgoing\", \"egress\") and destination.ip !=\"::1\" and destination.ip !=\"127.0.0.1\"\n ]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Security Software Discovery using WMIC", - "description": "Identifies the use of Windows Management Instrumentation Command (WMIC) to discover certain System Security Settings such as AntiVirus or Host Firewall details.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Security Software Discovery using WMIC\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `wmic` utility with arguments compatible to the enumeration of the security software installed on the host. Attackers can use this information to decide whether or not to infect a system, disable protections, use bypasses, etc.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "building_block_type": "default", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1518", - "name": "Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/", - "subtechnique": [ - { - "id": "T1518.001", - "name": "Security Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "f01e4795-9316-4eb4-9573-474715b82cda", - "rule_id": "6ea55c81-e2ba-42f2-a134-bccf857ba922", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(process.name : \"wmic.exe\" or process.pe.original_file_name : \"wmic.exe\") and\nprocess.args : \"/namespace:\\\\\\\\root\\\\SecurityCenter2\" and process.args : \"Get\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Modification of Dynamic Linker Preload Shared Object", - "description": "Identifies modification of the dynamic linker preload shared object (ld.so.preload). Adversaries may execute malicious payloads by hijacking the dynamic linker used to load libraries.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 207, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.anomali.com/blog/rocke-evolves-its-arsenal-with-a-new-malware-family-written-in-golang" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.006", - "name": "Dynamic Linker Hijacking", - "reference": "https://attack.mitre.org/techniques/T1574/006/" - } - ] - } - ] - } - ], - "id": "ccf1ca99-a349-4a15-ae87-f36ddec03293", - "rule_id": "717f82c2-7741-4f9b-85b8-d06aeb853f4f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "new_terms", - "query": "host.os.type:linux and event.category:file and event.action:(updated or renamed or rename) and \nnot event.type:deletion and file.path:/etc/ld.so.preload\n", - "new_terms_fields": [ - "host.id", - "user.id", - "process.executable" - ], - "history_window_start": "now-10d", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Attempt to Reset MFA Factors for an Okta User Account", - "description": "Detects attempts to reset an Okta user's enrolled multi-factor authentication (MFA) factors. An adversary may attempt to reset the MFA factors for an Okta user's account in order to register new MFA factors and abuse the account to blend in with normal activity in the victim's environment.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 206, - "tags": [ - "Tactic: Persistence", - "Use Case: Identity and Access Audit", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if the MFA factors for Okta user accounts are regularly reset in your organization." - ], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "6a4a3285-5548-460e-b07f-0f7d94d07323", - "rule_id": "729aa18d-06a6-41c7-b175-b65b739b1181", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:user.mfa.factor.reset_all\n", - "language": "kuery" - }, - { - "name": "Access to a Sensitive LDAP Attribute", - "description": "Identify access to sensitive Active Directory object attributes that contains credentials and decryption keys such as unixUserPassword, ms-PKI-AccountCredentials and msPKI-CredentialRoamingTokens.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "The 'Audit Directory Service Access' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Access (Success,Failure)\n```", - "version": 8, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Privilege Escalation", - "Use Case: Active Directory Monitoring", - "Data Source: Active Directory" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.mandiant.com/resources/blog/apt29-windows-credential-roaming", - "https://social.technet.microsoft.com/wiki/contents/articles/11483.windows-credential-roaming.aspx", - "https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5136" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - }, - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.004", - "name": "Private Keys", - "reference": "https://attack.mitre.org/techniques/T1552/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - } - ] - } - ] - } - ], - "id": "c2db3b6e-3cd8-46d2-9485-185f451b4e6c", - "rule_id": "764c9fcd-4c4c-41e6-a0c7-d6c46c2eff66", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.AccessMask", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.Properties", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectUserSid", - "type": "keyword", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "any where event.action == \"Directory Service Access\" and event.code == \"4662\" and\n\n not winlog.event_data.SubjectUserSid : \"S-1-5-18\" and\n\n winlog.event_data.Properties : (\n /* unixUserPassword */\n \"*612cb747-c0e8-4f92-9221-fdd5f15b550d*\",\n\n /* ms-PKI-AccountCredentials */\n \"*b8dfa744-31dc-4ef1-ac7c-84baf7ef9da7*\",\n\n /* ms-PKI-DPAPIMasterKeys */\n \"*b3f93023-9239-4f7c-b99c-6745d87adbc2*\",\n\n /* msPKI-CredentialRoamingTokens */\n \"*b7ff5a38-0818-42b0-8110-d3d154c97f24*\"\n ) and\n\n /*\n Excluding noisy AccessMasks\n 0x0 undefined and 0x100 Control Access\n https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4662\n */\n not winlog.event_data.AccessMask in (\"0x0\", \"0x100\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Creation of Hidden Shared Object File", - "description": "Identifies the creation of a hidden shared object (.so) file. Users can mark specific files as hidden simply by putting a \".\" as the first character in the file or folder name. Adversaries can use this to their advantage to hide files and folders on the system for persistence and defense evasion.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 33, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1564", - "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/", - "subtechnique": [ - { - "id": "T1564.001", - "name": "Hidden Files and Directories", - "reference": "https://attack.mitre.org/techniques/T1564/001/" - } - ] - } - ] - } - ], - "id": "11f4562c-05eb-4495-9f55-6baaa0cd6b24", - "rule_id": "766d3f91-3f12-448c-b65f-20123e9e9e8c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", - "type": "eql", - "query": "file where host.os.type == \"linux\" and event.type == \"creation\" and file.extension == \"so\" and file.name : \".*.so\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Potential Reverse Shell via Suspicious Child Process", - "description": "This detection rule detects the creation of a shell through a suspicious process chain. Any reverse shells spawned by the specified utilities that are initialized from a single process followed by a network connection attempt will be captured through this rule. Attackers may spawn reverse shells to establish persistence onto a target system.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - } - ], - "id": "b462375e-5204-4c3a-985d-99e57b9ccf09", - "rule_id": "76e4d92b-61c1-4a95-ab61-5fd94179a1ee", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"exec\", \"fork\") and (\n (process.name : \"python*\" and process.args : \"-c\" and process.args : (\n \"*import*pty*spawn*\", \"*import*subprocess*call*\"\n )) or\n (process.name : \"perl*\" and process.args : \"-e\" and process.args : \"*socket*\" and process.args : (\n \"*exec*\", \"*system*\"\n )) or\n (process.name : \"ruby*\" and process.args : (\"-e\", \"-rsocket\") and process.args : (\n \"*TCPSocket.new*\", \"*TCPSocket.open*\"\n )) or\n (process.name : \"lua*\" and process.args : \"-e\" and process.args : \"*socket.tcp*\" and process.args : (\n \"*io.popen*\", \"*os.execute*\"\n )) or\n (process.name : \"php*\" and process.args : \"-r\" and process.args : \"*fsockopen*\" and process.args : \"*/bin/*sh*\") or \n (process.name : (\"awk\", \"gawk\", \"mawk\", \"nawk\") and process.args : \"*/inet/tcp/*\") or\n (process.name : \"openssl\" and process.args : \"-connect\") or\n (process.name : (\"nc\", \"ncat\", \"netcat\") and process.args_count >= 3 and not process.args == \"-z\") or\n (process.name : \"telnet\" and process.args_count >= 3)\n ) and process.parent.name : (\n \"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\",\n \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\")]\n [network where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"connection_attempted\", \"connection_accepted\") and \n process.name : (\"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\") and \n destination.ip != null and not cidrmatch(destination.ip, \"127.0.0.0/8\", \"169.254.0.0/16\", \"224.0.0.0/4\", \"::1\")]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Spike in AWS Error Messages", - "description": "A machine learning job detected a significant spike in the rate of a particular error in the CloudTrail messages. Spikes in error messages may accompany attempts at privilege escalation, lateral movement, or discovery.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Spike in AWS Error Messages\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.\n\nThis rule uses a machine learning job to detect a significant spike in the rate of a particular error in the CloudTrail messages. Spikes in error messages may accompany attempts at privilege escalation, lateral movement, or discovery.\n\n#### Possible investigation steps\n\n- Examine the history of the error. If the error only manifested recently, it might be related to recent changes in an automation module or script. You can find the error in the `aws.cloudtrail.error_code field` field.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, or network administrator activity.\n- Examine the request parameters. These may indicate the source of the program or the nature of the task being performed when the error occurred.\n - Check whether the error is related to unsuccessful attempts to enumerate or access objects, data, or secrets.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Contact the account owner and confirm whether they are aware of this activity if suspicious.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.\n- The adoption of new services or the addition of new functionality to scripts may generate false positives.\n\n### Related Rules\n\n- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276\n- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1\n- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1\n- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Spikes in error message activity can also be due to bugs in cloud automation scripts or workflows; changes to cloud automation scripts or workflows; adoption of new services; changes in the way services are used; or changes to IAM privileges." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "e5af9461-f667-4b3e-a73f-edc513545da7", - "rule_id": "78d3d8d9-b476-451d-a9e0-7a5addd70670", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": "high_distinct_count_error_message" - }, - { - "name": "Windows Network Enumeration", - "description": "Identifies attempts to enumerate hosts in a network using the built-in Windows net.exe tool.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Windows Network Enumeration\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `net` utility to enumerate servers in the environment that hosts shared drives or printers. This information is useful to attackers as they can identify targets for lateral movements and search for valuable shared data.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "building_block_type": "default", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Tactic: Collection", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1018", - "name": "Remote System Discovery", - "reference": "https://attack.mitre.org/techniques/T1018/" - }, - { - "id": "T1135", - "name": "Network Share Discovery", - "reference": "https://attack.mitre.org/techniques/T1135/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1039", - "name": "Data from Network Shared Drive", - "reference": "https://attack.mitre.org/techniques/T1039/" - } - ] - } - ], - "id": "5ec299a0-ceb1-4d8d-9876-28a745ce1892", - "rule_id": "7b8bfc26-81d2-435e-965c-d722ee397ef1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n ((process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or\n ((process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and\n not process.parent.name : \"net.exe\")) and\n (process.args : \"view\" or (process.args : \"time\" and process.args : \"\\\\\\\\*\"))\n\n\n /* expand when ancestry is available\n and not descendant of [process where event.type == \"start\" and process.name : \"cmd.exe\" and\n ((process.parent.name : \"userinit.exe\") or\n (process.parent.name : \"gpscript.exe\") or\n (process.parent.name : \"explorer.exe\" and\n process.args : \"C:\\\\*\\\\Start Menu\\\\Programs\\\\Startup\\\\*.bat*\"))]\n */\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Unusual City For an AWS Command", - "description": "A machine learning job detected AWS command activity that, while not inherently suspicious or abnormal, is sourcing from a geolocation (city) that is unusual for the command. This can be the result of compromised credentials or keys being used by a threat actor in a different geography than the authorized user(s).", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual City For an AWS Command\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.\n\nThis rule uses a machine learning job to detect an AWS API command that while not inherently suspicious or abnormal, is sourcing from a geolocation (city) that is unusual for the command. This can be the result of compromised credentials or keys used by a threat actor in a different geography than the authorized user(s).\n\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation of the source IP address.\n\n#### Possible investigation steps\n\n- Identify the user account involved and the action performed. Verify whether it should perform this kind of action.\n - Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context.\n - The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, or network administrator activity.\n- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Contact the account owner and confirm whether they are aware of this activity if suspicious.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- False positives can occur if activity is coming from new employees based in a city with no previous history in AWS.\n- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.\n\n### Related Rules\n\n- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1\n- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1\n- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff\n- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-2h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "New or unusual command and user geolocation activity can be due to manual troubleshooting or reconfiguration; changes in cloud automation scripts or workflows; adoption of new services; expansion into new regions; increased adoption of work from home policies; or users who travel frequently." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "5e4cfc7c-a0ea-4288-893e-9968e0cb5e8d", - "rule_id": "809b70d3-e2c3-455e-af1b-2626a5a1a276", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": "rare_method_for_a_city" - }, - { - "name": "PowerShell Suspicious Payload Encoded and Compressed", - "description": "Identifies the use of .NET functionality for decompression and base64 decoding combined in PowerShell scripts, which malware and security tools heavily use to deobfuscate payloads and load them directly in memory to bypass defenses.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Suspicious Payload Encoded and Compressed\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can embed compressed and encoded payloads in scripts to load directly into the memory without touching the disk. This strategy can circumvent string and file-based security protections.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the script using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately outside engineering or IT business units. As long as the analyst did not identify malware or suspicious activity related to the user or host, this alert can be dismissed.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n- Suspicious .NET Reflection via PowerShell - e26f042e-c590-4e82-8e05-41e81bd822ad\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 109, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate PowerShell Scripts which makes use of compression and encoding." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1027", - "name": "Obfuscated Files or Information", - "reference": "https://attack.mitre.org/techniques/T1027/" - }, - { - "id": "T1140", - "name": "Deobfuscate/Decode Files or Information", - "reference": "https://attack.mitre.org/techniques/T1140/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "b841c7cb-d971-414a-aa1d-bbc9c03c8ca9", - "rule_id": "81fe9dc6-a2d7-4192-a2d8-eed98afc766a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n (\n \"System.IO.Compression.DeflateStream\" or\n \"System.IO.Compression.GzipStream\" or\n \"IO.Compression.DeflateStream\" or\n \"IO.Compression.GzipStream\"\n ) and\n FromBase64String\n ) and\n not file.path: ?\\:\\\\\\\\ProgramData\\\\\\\\Microsoft\\\\\\\\Windows?Defender?Advanced?Threat?Protection\\\\\\\\Downloads\\\\\\\\* and\n not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "Enumerating Domain Trusts via NLTEST.EXE", - "description": "Identifies the use of nltest.exe for domain trust discovery purposes. Adversaries may use this command-line utility to enumerate domain trusts and gain insight into trust relationships, as well as the state of Domain Controller (DC) replication in a Microsoft Windows NT Domain.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Enumerating Domain Trusts via NLTEST.EXE\n\nActive Directory (AD) domain trusts define relationships between domains within a Windows AD environment. In this setup, a \"trusting\" domain permits users from a \"trusted\" domain to access resources. These trust relationships can be configurable as one-way, two-way, transitive, or non-transitive, enabling controlled access and resource sharing across domains.\n\nThis rule identifies the usage of the `nltest.exe` utility to enumerate domain trusts. Attackers can use this information to enable the next actions in a target environment, such as lateral movement.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation and are done within the user business context (e.g., an administrator in this context). As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Related rules\n\n- Enumerating Domain Trusts via DSQUERY.EXE - 06a7a03c-c735-47a6-a313-51c354aef6c3\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Domain administrators may use this command-line utility for legitimate information gathering purposes, but it is not common for environments with Windows Server 2012 and newer." - ], - "references": [ - "https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc731935(v=ws.11)", - "https://redcanary.com/blog/how-one-hospital-thwarted-a-ryuk-ransomware-outbreak/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1482", - "name": "Domain Trust Discovery", - "reference": "https://attack.mitre.org/techniques/T1482/" - }, - { - "id": "T1018", - "name": "Remote System Discovery", - "reference": "https://attack.mitre.org/techniques/T1018/" - } - ] - } - ], - "id": "d5694c65-fbc8-4281-a363-2a551e0f0d25", - "rule_id": "84da2554-e12a-11ec-b896-f661ea17fbcd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"nltest.exe\" and process.args : (\n \"/DCLIST:*\", \"/DCNAME:*\", \"/DSGET*\",\n \"/LSAQUERYFTI:*\", \"/PARENTDOMAIN\",\n \"/DOMAIN_TRUSTS\", \"/BDC_QUERY:*\"\n ) and \nnot process.parent.name : \"PDQInventoryScanner.exe\" and \nnot user.id in (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Attempt to Deactivate an Okta Network Zone", - "description": "Detects attempts to deactivate an Okta network zone. Okta network zones can be configured to limit or restrict access to a network based on IP addresses or geolocations. An adversary may attempt to modify, delete, or deactivate an Okta network zone in order to remove or weaken an organization's security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Deactivate an Okta Network Zone\n\nThe Okta network zones can be configured to restrict or limit access to a network based on IP addresses or geolocations. Deactivating a network zone in Okta may remove or weaken the security controls of an organization, which might be an indicator of an adversary's attempt to evade defenses.\n\n#### Possible investigation steps\n\n- Identify the actor related to the alert by reviewing the `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields.\n- Examine the `event.action` field to confirm the deactivation of a network zone.\n- Check the `okta.target.id`, `okta.target.type`, `okta.target.alternate_id`, or `okta.target.display_name` to identify the network zone that was deactivated.\n- Investigate the `event.time` field to understand when the event happened.\n- Review the actor's activities before and after the event to understand the context of this event.\n\n### False positive analysis\n\n- Check the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor. If these match the actor's normal behavior, it might be a false positive.\n- Check if the actor is a known administrator or part of the IT team who might have a legitimate reason to deactivate a network zone.\n- Verify the actor's actions with any known planned changes or maintenance activities.\n\n### Response and remediation\n\n- If unauthorized access or actions are confirmed, immediately lock the affected actor account and require a password change.\n- Re-enable the deactivated network zone if it was deactivated without authorization.\n- Review and update the privileges of the actor who initiated the deactivation.\n- Check the security policies and procedures to identify any gaps and update them as necessary.\n- Implement additional monitoring and logging of Okta events to improve visibility of user actions.\n- Communicate and train the employees about the importance of following proper procedures for modifying network zone settings.", - "version": 206, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Use Case: Network Security Monitoring", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if your organization's Okta network zones are regularly modified." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/network/network-zones.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "09b972a1-7b3f-4b4b-9fb6-6b49e44ce495", - "rule_id": "8a5c1e5f-ad63-481e-b53a-ef959230f7f1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:zone.deactivate\n", - "language": "kuery" - }, - { - "name": "Potential Successful SSH Brute Force Attack", - "description": "Identifies multiple SSH login failures followed by a successful one from the same source address. Adversaries can attempt to login into multiple users with a common or known password to gain access to accounts.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Successful SSH Brute Force Attack\n\nThe rule identifies consecutive SSH login failures followed by a successful login from the same source IP address to the same target host indicating a successful attempt of brute force password guessing.\n\n#### Possible investigation steps\n\n- Investigate the login failure user name(s).\n- Investigate the source IP address of the failed ssh login attempt(s).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Infrastructure or availability issue.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Ensure active session(s) on the host(s) are terminated as the attacker could have gained initial access to the system(s).\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 8, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/", - "subtechnique": [ - { - "id": "T1110.001", - "name": "Password Guessing", - "reference": "https://attack.mitre.org/techniques/T1110/001/" - }, - { - "id": "T1110.003", - "name": "Password Spraying", - "reference": "https://attack.mitre.org/techniques/T1110/003/" - } - ] - } - ] - } - ], - "id": "50c44021-ffdd-4d74-bbdb-41414672f848", - "rule_id": "8cb84371-d053-4f4f-bce0-c74990e28f28", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, source.ip, user.name with maxspan=15s\n [authentication where host.os.type == \"linux\" and event.action in (\"ssh_login\", \"user_login\") and\n event.outcome == \"failure\" and source.ip != null and source.ip != \"0.0.0.0\" and source.ip != \"::\" ] with runs=10\n\n [authentication where host.os.type == \"linux\" and event.action in (\"ssh_login\", \"user_login\") and\n event.outcome == \"success\" and source.ip != null and source.ip != \"0.0.0.0\" and source.ip != \"::\" ]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-system.auth-*" - ] - }, - { - "name": "PowerShell Suspicious Script with Clipboard Retrieval Capabilities", - "description": "Detects PowerShell scripts that can get the contents of the clipboard, which attackers can abuse to retrieve sensitive information like credentials, messages, etc.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Suspicious Script with Clipboard Retrieval Capabilities\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can abuse PowerShell capabilities to get the contents of the clipboard with the goal of stealing credentials and other valuable information, such as credit card data and confidential conversations.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Determine whether the script stores the captured data locally.\n- Investigate whether the script contains exfiltration capabilities and identify the exfiltration server.\n- Assess network data to determine if the host communicated with the exfiltration server.\n\n### False positive analysis\n\n- Regular users are unlikely to use scripting utilities to capture contents of the clipboard, making false positives unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Related rules\n\n- PowerShell Keylogging Script - bd2c86a0-8b61-4457-ab38-96943984e889\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Prioritize the response if this alert involves key executives or potentially valuable targets for espionage.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Data Source: PowerShell Logs", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-clipboard", - "https://github.com/EmpireProject/Empire/blob/master/data/module_source/collection/Get-ClipboardContents.ps1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1115", - "name": "Clipboard Data", - "reference": "https://attack.mitre.org/techniques/T1115/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "f70becfb-90e1-454e-8e0e-8a64a383c573", - "rule_id": "92984446-aefb-4d5e-ad12-598042ca80ba", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n (powershell.file.script_block_text : (\n \"Windows.Clipboard\" or\n \"Windows.Forms.Clipboard\" or\n \"Windows.Forms.TextBox\"\n ) and\n powershell.file.script_block_text : (\n \"]::GetText\" or\n \".Paste()\"\n )) or powershell.file.script_block_text : \"Get-Clipboard\" and\n not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n ) and\n not user.id : \"S-1-5-18\" and\n not file.path : (\n ?\\:\\\\\\\\program?files\\\\\\\\powershell\\\\\\\\?\\\\\\\\Modules\\\\\\\\*.psd1 or\n ?\\:\\\\\\\\Windows\\\\\\\\system32\\\\\\\\WindowsPowerShell\\\\\\\\v1.0\\\\\\\\Modules\\\\\\\\*.psd1 or\n ?\\:\\\\\\\\WINDOWS\\\\\\\\system32\\\\\\\\WindowsPowerShell\\\\\\\\v1.0\\\\\\\\Modules\\\\\\\\*.psd1 or\n ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules\\\\\\\\*.psd1 or\n ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules\\\\\\\\*.psm1\n ) and \n not (\n file.path : ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\*Modules*.ps1 and\n file.name : (\"Convert-ExcelRangeToImage.ps1\" or \"Read-Clipboard.ps1\")\n )\n", - "language": "kuery" - }, - { - "name": "Modification of Standard Authentication Module or Configuration", - "description": "Adversaries may modify the standard authentication module for persistence via patching the normal authorization process or modifying the login configuration to allow unauthorized access or elevate privileges.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 204, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trusted system module updates or allowed Pluggable Authentication Module (PAM) daemon configuration changes." - ], - "references": [ - "https://github.com/zephrax/linux-pam-backdoor", - "https://github.com/eurialo/pambd", - "http://0x90909090.blogspot.com/2016/06/creating-backdoor-in-pam-in-5-line-of.html", - "https://www.trendmicro.com/en_us/research/19/i/skidmap-linux-malware-uses-rootkit-capabilities-to-hide-cryptocurrency-mining-payload.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1556", - "name": "Modify Authentication Process", - "reference": "https://attack.mitre.org/techniques/T1556/" - } - ] - } - ], - "id": "d469cb82-f182-48e9-8913-95362fb468b5", - "rule_id": "93f47b6f-5728-4004-ba00-625083b3dcb0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "new_terms", - "query": "event.category:file and event.type:change and\n (file.name:pam_*.so or file.path:(/etc/pam.d/* or /private/etc/pam.d/* or /usr/lib64/security/*)) and\n process.executable:\n (* and\n not\n (\n /usr/libexec/packagekitd or\n /usr/bin/vim or\n /usr/libexec/xpcproxy or\n /usr/bin/bsdtar or\n /usr/local/bin/brew or\n \"/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/XPCServices/package_script_service.xpc/Contents/MacOS/package_script_service\"\n )\n ) and\n not file.path:\n (\n /tmp/snap.rootfs_*/pam_*.so or\n /tmp/newroot/lib/*/pam_*.so or\n /private/var/folders/*/T/com.apple.fileprovider.ArchiveService/TemporaryItems/*/lib/security/pam_*.so or\n /tmp/newroot/usr/lib64/security/pam_*.so\n ) and\n not process.name:\n (\n yum or dnf or rsync or platform-python or authconfig or rpm or pdkg or apk or dnf-automatic or btrfs or\n dpkg or pam-auth-update or steam or platform-python3.6 or pam-config or microdnf or yum_install or yum-cron or\n systemd or containerd or pacman\n )\n", - "new_terms_fields": [ - "host.id", - "process.executable", - "file.path" - ], - "history_window_start": "now-7d", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "Suspicious Zoom Child Process", - "description": "A suspicious Zoom child process was detected, which may indicate an attempt to run unnoticed. Verify process details such as command line, network connections, file writes and associated file signature details as well.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Zoom Child Process\n\nBy examining the specific traits of Windows binaries -- such as process trees, command lines, network connections, registry modifications, and so on -- it's possible to establish a baseline of normal activity. Deviations from this baseline can indicate malicious activity, such as masquerading, and deserve further investigation.\n\nThis rule identifies a potential malicious process masquerading as `Zoom.exe` or exploiting a vulnerability in the application causing it to execute code.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the command line of the child process to determine which commands or scripts were executed.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - }, - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1203", - "name": "Exploitation for Client Execution", - "reference": "https://attack.mitre.org/techniques/T1203/" - } - ] - } - ], - "id": "bd735b74-b251-4a32-ba4b-74a98ec61f49", - "rule_id": "97aba1ef-6034-4bd3-8c1a-1e0996b27afa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"Zoom.exe\" and process.name : (\"cmd.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Credential Access via LSASS Memory Dump", - "description": "Identifies suspicious access to LSASS handle from a call trace pointing to DBGHelp.dll or DBGCore.dll, which both export the MiniDumpWriteDump method that can be used to dump LSASS memory content in preparation for credential access.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 207, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic:Execution", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.ired.team/offensive-security/credential-access-and-credential-dumping/dump-credentials-from-lsass-process-without-mimikatz", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - } - ], - "id": "1ae946e9-f012-4525-a1bd-bd4960ab2958", - "rule_id": "9960432d-9b26-409f-972b-839a959e79e2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.CallTrace", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetImage", - "type": "keyword", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.code == \"10\" and\n winlog.event_data.TargetImage : \"?:\\\\WINDOWS\\\\system32\\\\lsass.exe\" and\n\n /* DLLs exporting MiniDumpWriteDump API to create an lsass mdmp*/\n winlog.event_data.CallTrace : (\"*dbghelp*\", \"*dbgcore*\") and\n\n /* case of lsass crashing */\n not process.executable : (\"?:\\\\Windows\\\\System32\\\\WerFault.exe\", \"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Potential Shadow File Read via Command Line Utilities", - "description": "Identifies access to the /etc/shadow file via the commandline using standard system utilities. After elevating privileges to root, threat actors may attempt to read or dump this file in order to gain valid credentials. They may utilize these to move laterally undetected and access additional resources.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.cyberciti.biz/faq/unix-linux-password-cracking-john-the-ripper/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.008", - "name": "/etc/passwd and /etc/shadow", - "reference": "https://attack.mitre.org/techniques/T1003/008/" - } - ] - } - ] - } - ], - "id": "257de89a-0baf-4ca2-9941-11e54d03c0f2", - "rule_id": "9a3a3689-8ed1-4cdb-83fb-9506db54c61f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.working_directory", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "host.os.type : \"linux\" and event.category : \"process\" and event.action : (\"exec\" or \"exec_event\") and\n(process.args : \"/etc/shadow\" or (process.working_directory: \"/etc\" and process.args: \"shadow\")) and not \n(process.executable : (\"/bin/chown\" or \"/usr/bin/chown\") and process.args : \"root:shadow\") and not \n(process.executable : (\"/bin/chmod\" or \"/usr/bin/chmod\") and process.args : \"640\")\n", - "new_terms_fields": [ - "process.command_line" - ], - "history_window_start": "now-7d", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Microsoft Build Engine Started by a Script Process", - "description": "An instance of MSBuild, the Microsoft Build Engine, was started by a script or the Windows command interpreter. This behavior is unusual and is sometimes used by malicious payloads.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 206, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/", - "subtechnique": [ - { - "id": "T1127.001", - "name": "MSBuild", - "reference": "https://attack.mitre.org/techniques/T1127/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - }, - { - "id": "T1059.005", - "name": "Visual Basic", - "reference": "https://attack.mitre.org/techniques/T1059/005/" - } - ] - } - ] - } - ], - "id": "d4c54da3-a6f6-4658-bb97-d1a21b1d0e49", - "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name.caseless", - "type": "unknown", - "ecs": false - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type:windows and event.category:process and event.type:start and (\n process.name.caseless:\"msbuild.exe\" or process.pe.original_file_name:\"MSBuild.exe\") and \n process.parent.name:(\"cmd.exe\" or \"powershell.exe\" or \"pwsh.exe\" or \"powershell_ise.exe\" or \"cscript.exe\" or\n \"wscript.exe\" or \"mshta.exe\")\n", - "new_terms_fields": [ - "host.id", - "user.name", - "process.command_line" - ], - "history_window_start": "now-14d", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ], - "language": "kuery" - }, - { - "name": "Potential Credential Access via Trusted Developer Utility", - "description": "An instance of MSBuild, the Microsoft Build Engine, loaded DLLs (dynamically linked libraries) responsible for Windows credential management. This technique is sometimes used for credential dumping.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Credential Access via Trusted Developer Utility\n\nThe Microsoft Build Engine is a platform for building applications. This engine, also known as MSBuild, provides an XML schema for a project file that controls how the build platform processes and builds software.\n\nAdversaries can abuse MSBuild to proxy the execution of malicious code. The inline task capability of MSBuild that was introduced in .NET version 4 allows for C# or Visual Basic code to be inserted into an XML project file. MSBuild will compile and execute the inline task. `MSBuild.exe` is a signed Microsoft binary, and the execution of code using it can bypass application control defenses that are configured to allow `MSBuild.exe` execution.\n\nThis rule looks for the MSBuild process loading `vaultcli.dll` or `SAMLib.DLL`, which indicates the execution of credential access activities.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to identify the `.csproj` file location.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.002", - "name": "Security Account Manager", - "reference": "https://attack.mitre.org/techniques/T1003/002/" - } - ] - }, - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/", - "subtechnique": [ - { - "id": "T1555.004", - "name": "Windows Credential Manager", - "reference": "https://attack.mitre.org/techniques/T1555/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/", - "subtechnique": [ - { - "id": "T1127.001", - "name": "MSBuild", - "reference": "https://attack.mitre.org/techniques/T1127/001/" - } - ] - } - ] - } - ], - "id": "a68db131-95bb-47bd-a9c7-4dc26ffccaa7", - "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and (process.name : \"MSBuild.exe\" or process.pe.original_file_name == \"MSBuild.exe\")]\n [any where host.os.type == \"windows\" and (event.category == \"library\" or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : (\"vaultcli.dll\", \"SAMLib.DLL\") or file.name : (\"vaultcli.dll\", \"SAMLib.DLL\"))]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Microsoft Build Engine Started an Unusual Process", - "description": "An instance of MSBuild, the Microsoft Build Engine, started a PowerShell script or the Visual C# Command Line Compiler. This technique is sometimes used to deploy a malicious payload using the Build Engine.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 207, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual. If a build system triggers this rule it can be exempted by process, user or host name." - ], - "references": [ - "https://blog.talosintelligence.com/2020/02/building-bypass-with-msbuild.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1027", - "name": "Obfuscated Files or Information", - "reference": "https://attack.mitre.org/techniques/T1027/", - "subtechnique": [ - { - "id": "T1027.004", - "name": "Compile After Delivery", - "reference": "https://attack.mitre.org/techniques/T1027/004/" - } - ] - }, - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/", - "subtechnique": [ - { - "id": "T1127.001", - "name": "MSBuild", - "reference": "https://attack.mitre.org/techniques/T1127/001/" - } - ] - } - ] - } - ], - "id": "40e24351-6419-4dbe-b7a7-7ddb0ada19bb", - "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name.caseless", - "type": "unknown", - "ecs": false - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "new_terms", - "query": "host.os.type:windows and event.category:process and event.type:start and process.parent.name:\"MSBuild.exe\" and\nprocess.name.caseless:(\"csc.exe\" or \"iexplore.exe\" or \"powershell.exe\")\n", - "new_terms_fields": [ - "host.id", - "user.name", - "process.parent.command_line" - ], - "history_window_start": "now-14d", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ], - "language": "kuery" - }, - { - "name": "Potential Protocol Tunneling via EarthWorm", - "description": "Identifies the execution of the EarthWorm tunneler. Adversaries may tunnel network communications to and from a victim system within a separate protocol to avoid detection and network filtering, or to enable access to otherwise unreachable systems.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "http://rootkiter.com/EarthWorm/", - "https://decoded.avast.io/luigicamastra/apt-group-targeting-governmental-agencies-in-east-asia/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - } - ], - "id": "47f5ffa4-d3c9-4e51-a913-6afa9b30bd4b", - "rule_id": "9f1c4ca3-44b5-481d-ba42-32dc215a2769", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and\n process.args : \"-s\" and process.args : \"-d\" and process.args : \"rssocks\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "File Permission Modification in Writable Directory", - "description": "Identifies file permission modifications in common writable directories by a non-root user. Adversaries often drop files or payloads into a writable directory and change permissions prior to execution.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 206, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Certain programs or applications may modify files or change ownership in writable directories. These can be exempted by username." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1222", - "name": "File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/" - } - ] - } - ], - "id": "4ca272bc-a0e4-4ca4-b683-7ce94624edfe", - "rule_id": "9f9a2a82-93a8-4b1a-8778-1780895626d4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.working_directory", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "new_terms", - "query": "host.os.type:linux and event.category:process and event.type:start and\nprocess.name:(chmod or chown or chattr or chgrp) and \nprocess.working_directory:(\"/tmp\" or \"/var/tmp\" or \"/dev/shm\")\n", - "new_terms_fields": [ - "host.id", - "process.parent.executable", - "process.command_line" - ], - "history_window_start": "now-14d", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "First Time Seen AWS Secret Value Accessed in Secrets Manager", - "description": "An adversary equipped with compromised credentials may attempt to access the secrets in secrets manager to steal certificates, credentials, or other sensitive material.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating First Time Seen AWS Secret Value Accessed in Secrets Manager\n\nAWS Secrets Manager is a service that enables the replacement of hardcoded credentials in code, including passwords, with an API call to Secrets Manager to retrieve the secret programmatically.\n\nThis rule looks for the retrieval of credentials using `GetSecretValue` action in Secrets Manager programmatically. This is a [New Terms](https://www.elastic.co/guide/en/security/master/rules-ui-create.html#create-new-terms-rule) rule indicating this is the first time a specific user identity has successfuly retrieved a secret value from Secrets Manager.\n\n#### Possible investigation steps\n\n- Identify the account and its role in the environment, and inspect the related policy.\n- Identify the applications that should use this account.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Investigate abnormal values in the `user_agent.original` field by comparing them with the intended and authorized usage and historical data. Suspicious user agent values include non-SDK, AWS CLI, custom user agents, etc.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences involving other users.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Review IAM permission policies for the user identity and specific secrets accessed.\n- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- False positives may occur due to the intended usage of the service. Tuning is needed in order to have higher confidence. Consider adding exceptions — preferably with a combination of user agent and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Rotate secrets or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 308, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Credential Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Nick Jones", - "Elastic" - ], - "false_positives": [ - "Verify whether the user identity, user agent, and/or hostname should be using GetSecretString API for the specified SecretId. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html", - "http://detectioninthe.cloud/credential_access/access_secret_in_secrets_manager/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1528", - "name": "Steal Application Access Token", - "reference": "https://attack.mitre.org/techniques/T1528/" - } - ] - } - ], - "id": "b72a7d63-3b9b-4087-bfc5-630d05bf8b5d", - "rule_id": "a00681e3-9ed6-447c-ab2c-be648821c622", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "user_agent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "new_terms", - "query": "event.dataset:aws.cloudtrail and event.provider:secretsmanager.amazonaws.com and\n event.action:GetSecretValue and event.outcome:success and\n not user_agent.name: (\"Chrome\" or \"Firefox\" or \"Safari\" or \"Edge\" or \"Brave\" or \"Opera\" or \"aws-cli\")\n", - "new_terms_fields": [ - "aws.cloudtrail.user_identity.access_key_id", - "aws.cloudtrail.request_parameters" - ], - "history_window_start": "now-15d", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "language": "kuery" - }, - { - "name": "System Log File Deletion", - "description": "Identifies the deletion of sensitive Linux system logs. This may indicate an attempt to evade detection or destroy forensic evidence on a system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.fireeye.com/blog/threat-research/2020/11/live-off-the-land-an-overview-of-unc1945.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.002", - "name": "Clear Linux or Mac System Logs", - "reference": "https://attack.mitre.org/techniques/T1070/002/" - } - ] - } - ] - } - ], - "id": "97a1db1a-da0f-49b0-859c-af127a1b77b2", - "rule_id": "aa895aea-b69c-4411-b110-8d7599634b30", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", - "type": "eql", - "query": "file where host.os.type == \"linux\" and event.type == \"deletion\" and\n file.path :\n (\n \"/var/run/utmp\",\n \"/var/log/wtmp\",\n \"/var/log/btmp\",\n \"/var/log/lastlog\",\n \"/var/log/faillog\",\n \"/var/log/syslog\",\n \"/var/log/messages\",\n \"/var/log/secure\",\n \"/var/log/auth.log\",\n \"/var/log/boot.log\",\n \"/var/log/kern.log\"\n ) and\n not process.name in (\"gzip\", \"executor\", \"dockerd\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Remotely Started Services via RPC", - "description": "Identifies remote execution of Windows services over remote procedure call (RPC). This could be indicative of lateral movement, but will be noisy if commonly done by administrators.\"", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remotely Started Services via RPC\n\nThe Service Control Manager Remote Protocol is a client/server protocol used for configuring and controlling service programs running on a remote computer. A remote service management session begins with the client initiating the connection request to the server. If the server grants the request, the connection is established. The client can then make multiple requests to modify, query the configuration, or start and stop services on the server by using the same session until the session is terminated.\n\nThis rule detects the remote creation or start of a service by correlating a `services.exe` network connection and the spawn of a child process.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Review login events (e.g., 4624) in the alert timeframe to identify the account used to perform this action. Use the `source.address` field to help identify the source system.\n- Review network events from the source system using the source port identified on the alert and try to identify the program used to initiate the action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- Remote management software like SCCM may trigger this rule. If noisy on your environment, consider adding exceptions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-scmr/705b624a-13de-43cc-b8a2-99573da3635f" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - } - ], - "id": "aae040f5-86a5-471c-82c4-a2c2cc3c1deb", - "rule_id": "aa9a274d-6b53-424d-ac5e-cb8ca4251650", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "source.port", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=1s\n [network where host.os.type == \"windows\" and process.name : \"services.exe\" and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.port >= 49152 and destination.port >= 49152 and source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ] by host.id, process.entity_id\n [process where host.os.type == \"windows\" and \n event.type == \"start\" and process.parent.name : \"services.exe\" and\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\svchost.exe\" and process.args : \"tiledatamodelsvc\") and\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\msiexec.exe\" and process.args : \"/V\") and\n not process.executable :\n (\"?:\\\\Windows\\\\ADCR_Agent\\\\adcrsvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\VSSVC.exe\",\n \"?:\\\\Windows\\\\servicing\\\\TrustedInstaller.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Windows\\\\PSEXESVC.EXE\",\n \"?:\\\\Windows\\\\System32\\\\sppsvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\wbem\\\\WmiApSrv.exe\",\n \"?:\\\\WINDOWS\\\\RemoteAuditService.exe\",\n \"?:\\\\Windows\\\\VeeamVssSupport\\\\VeeamGuestHelper.exe\",\n \"?:\\\\Windows\\\\VeeamLogShipper\\\\VeeamLogShipper.exe\",\n \"?:\\\\Windows\\\\CAInvokerService.exe\",\n \"?:\\\\Windows\\\\System32\\\\upfc.exe\",\n \"?:\\\\Windows\\\\AdminArsenal\\\\PDQ*.exe\",\n \"?:\\\\Windows\\\\System32\\\\vds.exe\",\n \"?:\\\\Windows\\\\Veeam\\\\Backup\\\\VeeamDeploymentSvc.exe\",\n \"?:\\\\Windows\\\\ProPatches\\\\Scheduler\\\\STSchedEx.exe\",\n \"?:\\\\Windows\\\\System32\\\\certsrv.exe\",\n \"?:\\\\Windows\\\\eset-remote-install-service.exe\",\n \"?:\\\\Pella Corporation\\\\Pella Order Management\\\\GPAutoSvc.exe\",\n \"?:\\\\Pella Corporation\\\\OSCToGPAutoService\\\\OSCToGPAutoSvc.exe\",\n \"?:\\\\Pella Corporation\\\\Pella Order Management\\\\GPAutoSvc.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\NwxExeSvc\\\\NwxExeSvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\taskhostex.exe\")\n ] by host.id, process.parent.entity_id\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Remote Execution via File Shares", - "description": "Identifies the execution of a file that was created by the virtual system process. This may indicate lateral movement via network file shares.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remote Execution via File Shares\n\nAdversaries can use network shares to host tooling to support the compromise of other hosts in the environment. These tools can include discovery utilities, credential dumpers, malware, etc.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Review adjacent login events (e.g., 4624) in the alert timeframe to identify the account used to perform this action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity can happen legitimately. Consider adding exceptions if it is expected and noisy in your environment.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Review the privileges needed to write to the network share and restrict write access as needed.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.menasec.net/2020/08/new-trick-to-detect-lateral-movement.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.002", - "name": "SMB/Windows Admin Shares", - "reference": "https://attack.mitre.org/techniques/T1021/002/" - } - ] - } - ] - } - ], - "id": "7427d720-5c70-4a66-91b6-46ea59c90cc0", - "rule_id": "ab75c24b-2502-43a0-bf7c-e60e662c811e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.header_bytes", - "type": "unknown", - "ecs": false - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=1m\n [file where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and \n process.pid == 4 and (file.extension : \"exe\" or file.Ext.header_bytes : \"4d5a*\")] by host.id, file.path\n [process where host.os.type == \"windows\" and event.type == \"start\"] by host.id, process.executable\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual AWS Command for a User", - "description": "A machine learning job detected an AWS API command that, while not inherently suspicious or abnormal, is being made by a user context that does not normally use the command. This can be the result of compromised credentials or keys as someone uses a valid account to persist, move laterally, or exfiltrate data.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual AWS Command for a User\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.\n\nThis rule uses a machine learning job to detect an AWS API command that while not inherently suspicious or abnormal, is being made by a user context that does not normally use the command. This can be the result of compromised credentials or keys as someone uses a valid account to persist, move laterally, or exfiltrate data.\n\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the calling IAM user.\n\n#### Possible investigation steps\n\n- Identify the user account involved and the action performed. Verify whether it should perform this kind of action.\n - Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context.\n - The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, or network administrator activity.\n- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Contact the account owner and confirm whether they are aware of this activity if suspicious.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.\n\n### Related Rules\n\n- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276\n- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1\n- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff\n- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-2h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "New or unusual user command activity can be due to manual troubleshooting or reconfiguration; changes in cloud automation scripts or workflows; adoption of new services; or changes in the way services are used." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "5f8c7b70-2c54-4110-a195-56b173f197ad", - "rule_id": "ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "rare_method_for_a_username" - }, - { - "name": "Attempt to Delete an Okta Policy", - "description": "Detects attempts to delete an Okta policy. An adversary may attempt to delete an Okta policy in order to weaken an organization's security controls. For example, an adversary may attempt to delete an Okta multi-factor authentication (MFA) policy in order to weaken the authentication requirements for user accounts.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Delete an Okta Policy\n\nOkta policies are critical to managing user access and enforcing security controls within an organization. The deletion of an Okta policy could drastically weaken an organization's security posture by allowing unrestricted access or facilitating other malicious activities.\n\nThis rule detects attempts to delete an Okta policy, which could be indicative of an adversary's attempt to weaken an organization's security controls. Adversaries may do this to bypass security barriers and enable further malicious activities.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the deletion attempt.\n- Check the `okta.outcome.result` field to confirm the policy deletion attempt.\n- Check if there are multiple policy deletion attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the policy deletion attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the deletion attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the deletion attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the deletion attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized policy deletion is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific deletion technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 206, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if Okta policies are regularly deleted in your organization." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "0235ac26-998d-45c1-bb8b-ac12774a0189", - "rule_id": "b4bb1440-0fcb-4ed1-87e5-b06d58efc5e9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:policy.lifecycle.delete\n", - "language": "kuery" - }, - { - "name": "Attempt to Deactivate an Okta Policy", - "description": "Detects attempts to deactivate an Okta policy. An adversary may attempt to deactivate an Okta policy in order to weaken an organization's security controls. For example, an adversary may attempt to deactivate an Okta multi-factor authentication (MFA) policy in order to weaken the authentication requirements for user accounts.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Deactivate an Okta Policy\n\nOkta policies define rules to manage user access to resources. Policies such as multi-factor authentication (MFA) are critical for enforcing strong security measures. Deactivation of an Okta policy could potentially weaken the security posture, allowing for unauthorized access or facilitating other malicious activities.\n\nThis rule is designed to detect attempts to deactivate an Okta policy, which could be indicative of an adversary's attempt to weaken an organization's security controls. For example, disabling an MFA policy could lower the security of user authentication processes.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the deactivation attempt.\n- Check the `okta.outcome.result` field to confirm the policy deactivation attempt.\n- Check if there are multiple policy deactivation attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the policy deactivation attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the deactivation attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the deactivation attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the deactivation attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized policy deactivation is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific deactivation technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 206, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "If the behavior of deactivating Okta policies is expected, consider adding exceptions to this rule to filter false positives." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "2e7f379b-79a8-4f39-9cff-4ed335177b7b", - "rule_id": "b719a170-3bdb-4141-b0e3-13e3cf627bfe", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:policy.lifecycle.deactivate\n", - "language": "kuery" - }, - { - "name": "Chkconfig Service Add", - "description": "Detects the use of the chkconfig binary to manually add a service for management by chkconfig. Threat actors may utilize this technique to maintain persistence on a system. When a new service is added, chkconfig ensures that the service has either a start or a kill entry in every runlevel and when the system is rebooted the service file added will run providing long-term persistence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Threat: Lightning Framework", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.intezer.com/blog/research/lightning-framework-new-linux-threat/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1037", - "name": "Boot or Logon Initialization Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/", - "subtechnique": [ - { - "id": "T1037.004", - "name": "RC Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/004/" - } - ] - } - ] - } - ], - "id": "26f4f52b-ba36-4d2a-a724-ffd20878a380", - "rule_id": "b910f25a-2d44-47f2-a873-aabdc0d355e6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and\n( \n (process.executable : \"/usr/sbin/chkconfig\" and process.args : \"--add\") or\n (process.args : \"*chkconfig\" and process.args : \"--add\")\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Creation of Hidden Files and Directories via CommandLine", - "description": "Users can mark specific files as hidden simply by putting a \".\" as the first character in the file or folder name. Adversaries can use this to their advantage to hide files and folders on the system for persistence and defense evasion. This rule looks for hidden files or folders in common writable directories.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Certain tools may create hidden temporary files or directories upon installation or as part of their normal behavior. These events can be filtered by the process arguments, username, or process name values." - ], - "references": [], - "max_signals": 33, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1564", - "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/", - "subtechnique": [ - { - "id": "T1564.001", - "name": "Hidden Files and Directories", - "reference": "https://attack.mitre.org/techniques/T1564/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - } - ], - "id": "62f1d86b-f89b-4f7c-9995-1d3dcb8bf614", - "rule_id": "b9666521-4742-49ce-9ddc-b8e84c35acae", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.working_directory", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and\nprocess.working_directory in (\"/tmp\", \"/var/tmp\", \"/dev/shm\") and\nprocess.args regex~ \"\"\"\\.[a-z0-9_\\-][a-z0-9_\\-\\.]{1,254}\"\"\" and\nnot process.name in (\"ls\", \"find\", \"grep\", \"git\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious DLL Loaded for Persistence or Privilege Escalation", - "description": "Identifies the loading of a non Microsoft signed DLL that is missing on a default Windows install (phantom DLL) or one that can be loaded from a different location by a native Windows process. This may be abused to persist or elevate privileges via privileged file write vulnerabilities.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious DLL Loaded for Persistence or Privilege Escalation\n\nAttackers can execute malicious code by abusing missing modules that processes try to load, enabling them to escalate privileges or gain persistence. This rule identifies the loading of a non-Microsoft-signed DLL that is missing on a default Windows installation or one that can be loaded from a different location by a native Windows process.\n\n#### Possible investigation steps\n\n- Examine the DLL signature and identify the process that created it.\n - Investigate any abnormal behaviors by the process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve the DLL and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://itm4n.github.io/windows-dll-hijacking-clarified/", - "http://remoteawesomethoughts.blogspot.com/2019/05/windows-10-task-schedulerservice.html", - "https://googleprojectzero.blogspot.com/2018/04/windows-exploitation-tricks-exploiting.html", - "https://shellz.club/2020/10/16/edgegdi-dll-for-persistence-and-lateral-movement.html", - "https://windows-internals.com/faxing-your-way-to-system/", - "http://waleedassar.blogspot.com/2013/01/wow64logdll.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.002", - "name": "DLL Side-Loading", - "reference": "https://attack.mitre.org/techniques/T1574/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.001", - "name": "DLL Search Order Hijacking", - "reference": "https://attack.mitre.org/techniques/T1574/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - } - ] - } - ] - } - ], - "id": "795b6d23-588c-4488-99e4-2ccc7d0ea209", - "rule_id": "bfeaf89b-a2a7-48a3-817f-e41829dc61ee", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dll.code_signature.exists", - "type": "boolean", - "ecs": true - }, - { - "name": "dll.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "file.hash.sha256", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "any where host.os.type == \"windows\" and\n (event.category : (\"driver\", \"library\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (\n /* compatible with Elastic Endpoint Library Events */\n (dll.name : (\"wlbsctrl.dll\", \"wbemcomn.dll\", \"WptsExtensions.dll\", \"Tsmsisrv.dll\", \"TSVIPSrv.dll\", \"Msfte.dll\",\n \"wow64log.dll\", \"WindowsCoreDeviceInfo.dll\", \"Ualapi.dll\", \"wlanhlp.dll\", \"phoneinfo.dll\", \"EdgeGdi.dll\",\n \"cdpsgshims.dll\", \"windowsperformancerecordercontrol.dll\", \"diagtrack_win.dll\", \"oci.dll\", \"TPPCOIPW32.dll\", \n \"tpgenlic.dll\", \"thinmon.dll\", \"fxsst.dll\", \"msTracer.dll\")\n and (dll.code_signature.trusted != true or dll.code_signature.exists != true)) or\n\n /* compatible with Sysmon EventID 7 - Image Load */\n (file.name : (\"wlbsctrl.dll\", \"wbemcomn.dll\", \"WptsExtensions.dll\", \"Tsmsisrv.dll\", \"TSVIPSrv.dll\", \"Msfte.dll\",\n \"wow64log.dll\", \"WindowsCoreDeviceInfo.dll\", \"Ualapi.dll\", \"wlanhlp.dll\", \"phoneinfo.dll\", \"EdgeGdi.dll\",\n \"cdpsgshims.dll\", \"windowsperformancerecordercontrol.dll\", \"diagtrack_win.dll\", \"oci.dll\", \"TPPCOIPW32.dll\", \n \"tpgenlic.dll\", \"thinmon.dll\", \"fxsst.dll\", \"msTracer.dll\") and \n not file.path : (\"?:\\\\Windows\\\\System32\\\\wbemcomn.dll\", \"?:\\\\Windows\\\\SysWOW64\\\\wbemcomn.dll\") and \n not file.hash.sha256 : \n (\"6e837794fc282446906c36d681958f2f6212043fc117c716936920be166a700f\", \n \"b14e4954e8cca060ffeb57f2458b6a3a39c7d2f27e94391cbcea5387652f21a4\", \n \"c258d90acd006fa109dc6b748008edbb196d6168bc75ace0de0de54a4db46662\") and \n not file.code_signature.status == \"Valid\")\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Attempt to Delete an Okta Network Zone", - "description": "Detects attempts to delete an Okta network zone. Okta network zones can be configured to limit or restrict access to a network based on IP addresses or geolocations. An adversary may attempt to modify, delete, or deactivate an Okta network zone in order to remove or weaken an organization's security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Delete an Okta Network Zone\n\nOkta network zones can be configured to limit or restrict access to a network based on IP addresses or geolocations. Deleting a network zone in Okta might remove or weaken the security controls of an organization, which might be an indicator of an adversary's attempt to evade defenses.\n\n#### Possible investigation steps:\n\n- Identify the actor associated with the alert by examining the `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields.\n- Examine the `event.action` field to confirm the deletion of a network zone.\n- Investigate the `okta.target.id`, `okta.target.type`, `okta.target.alternate_id`, or `okta.target.display_name` fields to identify the network zone that was deleted.\n- Review the `event.time` field to understand when the event happened.\n- Check the actor's activities before and after the event to understand the context of this event.\n\n### False positive analysis:\n\n- Verify the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor. If these match the actor's typical behavior, it might be a false positive.\n- Check if the actor is a known administrator or a member of the IT team who might have a legitimate reason to delete a network zone.\n- Cross-verify the actor's actions with any known planned changes or maintenance activities.\n\n### Response and remediation:\n\n- If unauthorized access or actions are confirmed, immediately lock the affected actor's account and require a password change.\n- If a network zone was deleted without authorization, create a new network zone with similar settings as the deleted one.\n- Review and update the privileges of the actor who initiated the deletion.\n- Identify any gaps in the security policies and procedures and update them as necessary.\n- Implement additional monitoring and logging of Okta events to improve visibility of user actions.\n- Communicate and train the employees about the importance of following proper procedures for modifying network zone settings.", - "version": 206, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Use Case: Network Security Monitoring", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if Oyour organization's Okta network zones are regularly deleted." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/network/network-zones.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "62cec8b7-db06-4af2-9d3b-d8c36371f89a", - "rule_id": "c749e367-a069-4a73-b1f2-43a3798153ad", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:zone.delete\n", - "language": "kuery" - }, - { - "name": "Suspicious Startup Shell Folder Modification", - "description": "Identifies suspicious startup shell folder modifications to change the default Startup directory in order to bypass detections monitoring file creation in the Windows Startup folder.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Startup Shell Folder Modification\n\nTechniques used within malware and by adversaries often leverage the Windows registry to store malicious programs for persistence. Startup shell folders are often targeted as they are not as prevalent as normal Startup folder paths so this behavior may evade existing AV/EDR solutions. These programs may also run with higher privileges which can be ideal for an attacker.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Review the source process and related file tied to the Windows Registry entry.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- There is a high possibility of benign legitimate programs being added to shell folders. This activity could be based on new software installations, patches, or other network administrator activity. Before undertaking further investigation, it should be verified that this activity is not benign.\n\n### Related rules\n\n- Startup or Run Key Registry Modification - 97fc44d3-8dae-4019-ae83-298c3015600f\n- Persistent Scripts in the Startup Directory - f7c4dc5a-a58d-491d-9f14-9b66507121c0\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "e50add37-f45a-4c2e-ba1b-e747a22f2abf", - "rule_id": "c8b150f0-0164-475b-a75e-74b47800a9ff", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\User Shell Folders\\\\Common Startup\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders\\\\Common Startup\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\User Shell Folders\\\\Startup\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders\\\\Startup\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\User Shell Folders\\\\Common Startup\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders\\\\Common Startup\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\User Shell Folders\\\\Startup\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\Shell Folders\\\\Startup\"\n ) and\n registry.data.strings != null and\n /* Normal Startup Folder Paths */\n not registry.data.strings : (\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\",\n \"%ProgramData%\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\",\n \"%USERPROFILE%\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\",\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Modification or Removal of an Okta Application Sign-On Policy", - "description": "Detects attempts to modify or delete a sign on policy for an Okta application. An adversary may attempt to modify or delete the sign on policy for an Okta application in order to remove or weaken an organization's security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 206, - "tags": [ - "Tactic: Persistence", - "Use Case: Identity and Access Audit", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if sign on policies for Okta applications are regularly modified or deleted in your organization." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/App_Based_Signon.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1556", - "name": "Modify Authentication Process", - "reference": "https://attack.mitre.org/techniques/T1556/" - } - ] - } - ], - "id": "3d0dd47f-02b5-4242-933e-8e3d698fadd6", - "rule_id": "cd16fb10-0261-46e8-9932-a0336278cdbe", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:(application.policy.sign_on.update or application.policy.sign_on.rule.delete)\n", - "language": "kuery" - }, - { - "name": "Attempt to Deactivate MFA for an Okta User Account", - "description": "Detects attempts to deactivate multi-factor authentication (MFA) for an Okta user. An adversary may deactivate MFA for an Okta user account in order to weaken the authentication requirements for the account.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 206, - "tags": [ - "Tactic: Persistence", - "Use Case: Identity and Access Audit", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "If the behavior of deactivating MFA for Okta user accounts is expected, consider adding exceptions to this rule to filter false positives." - ], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "77379c3e-e63d-4822-94f6-d0891d0f3c30", - "rule_id": "cd89602e-9db0-48e3-9391-ae3bf241acd8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:user.mfa.factor.deactivate\n", - "language": "kuery" - }, - { - "name": "Potential PowerShell HackTool Script by Function Names", - "description": "Detects known PowerShell offensive tooling functions names in PowerShell scripts. Attackers commonly use out-of-the-box offensive tools without modifying the code. This rule aim is to take advantage of that.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md", - "https://github.com/BC-SECURITY/Empire" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "dfedb0a8-3c3f-41e3-8953-8456af5ea7a6", - "rule_id": "cde1bafa-9f01-4f43-a872-605b678968b0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"Add-DomainGroupMember\" or \"Add-DomainObjectAcl\" or\n \"Add-RemoteConnection\" or \"Add-ServiceDacl\" or\n \"Add-Win32Type\" or \"Convert-ADName\" or\n \"Convert-LDAPProperty\" or \"ConvertFrom-LDAPLogonHours\" or\n \"ConvertFrom-UACValue\" or \"Copy-ArrayOfMemAddresses\" or\n \"Create-NamedPipe\" or \"Create-ProcessWithToken\" or\n \"Create-RemoteThread\" or \"Create-SuspendedWinLogon\" or\n \"Create-WinLogonProcess\" or \"Emit-CallThreadStub\" or\n \"Enable-SeAssignPrimaryTokenPrivilege\" or \"Enable-SeDebugPrivilege\" or\n \"Enum-AllTokens\" or \"Export-PowerViewCSV\" or\n \"Find-AVSignature\" or \"Find-AppLockerLog\" or\n \"Find-DomainLocalGroupMember\" or \"Find-DomainObjectPropertyOutlier\" or\n \"Find-DomainProcess\" or \"Find-DomainShare\" or\n \"Find-DomainUserEvent\" or \"Find-DomainUserLocation\" or\n \"Find-InterestingDomainAcl\" or \"Find-InterestingDomainShareFile\" or\n \"Find-InterestingFile\" or \"Find-LocalAdminAccess\" or\n \"Find-PSScriptsInPSAppLog\" or \"Find-PathDLLHijack\" or\n \"Find-ProcessDLLHijack\" or \"Find-RDPClientConnection\" or\n \"Get-AllAttributesForClass\" or \"Get-CachedGPPPassword\" or\n \"Get-DecryptedCpassword\" or \"Get-DecryptedSitelistPassword\" or\n \"Get-DelegateType\" or\n \"Get-DomainDFSShare\" or \"Get-DomainDFSShareV1\" or\n \"Get-DomainDFSShareV2\" or \"Get-DomainDNSRecord\" or\n \"Get-DomainDNSZone\" or \"Get-DomainFileServer\" or\n \"Get-DomainForeignGroupMember\" or \"Get-DomainForeignUser\" or\n \"Get-DomainGPO\" or \"Get-DomainGPOComputerLocalGroupMapping\" or\n \"Get-DomainGPOLocalGroup\" or \"Get-DomainGPOUserLocalGroupMapping\" or\n \"Get-DomainGUIDMap\" or \"Get-DomainGroup\" or\n \"Get-DomainGroupMember\" or \"Get-DomainGroupMemberDeleted\" or\n \"Get-DomainManagedSecurityGroup\" or \"Get-DomainOU\" or\n \"Get-DomainObject\" or \"Get-DomainObjectAcl\" or\n \"Get-DomainObjectAttributeHistory\" or \"Get-DomainObjectLinkedAttributeHistory\" or\n \"Get-DomainPolicyData\" or \"Get-DomainSID\" or\n \"Get-DomainSPNTicket\" or \"Get-DomainSearcher\" or\n \"Get-DomainSite\" or \"Get-DomainSubnet\" or\n \"Get-DomainTrust\" or \"Get-DomainTrustMapping\" or\n \"Get-DomainUser\" or \"Get-DomainUserEvent\" or\n \"Get-Forest\" or \"Get-ForestDomain\" or\n \"Get-ForestGlobalCatalog\" or \"Get-ForestSchemaClass\" or\n \"Get-ForestTrust\" or \"Get-GPODelegation\" or\n \"Get-GPPAutologon\" or \"Get-GPPInnerField\" or\n \"Get-GPPInnerFields\" or \"Get-GPPPassword\" or\n \"Get-GptTmpl\" or \"Get-GroupsXML\" or\n \"Get-HttpStatus\" or \"Get-ImageNtHeaders\" or\n \"Get-Keystrokes\" or\n \"Get-MemoryProcAddress\" or \"Get-MicrophoneAudio\" or\n \"Get-ModifiablePath\" or \"Get-ModifiableRegistryAutoRun\" or\n \"Get-ModifiableScheduledTaskFile\" or \"Get-ModifiableService\" or\n \"Get-ModifiableServiceFile\" or \"Get-Name\" or\n \"Get-NetComputerSiteName\" or \"Get-NetLocalGroup\" or\n \"Get-NetLocalGroupMember\" or \"Get-NetLoggedon\" or\n \"Get-NetRDPSession\" or \"Get-NetSession\" or\n \"Get-NetShare\" or \"Get-PEArchitecture\" or\n \"Get-PEBasicInfo\" or \"Get-PEDetailedInfo\" or\n \"Get-PathAcl\" or \"Get-PrimaryToken\" or\n \"Get-ProcAddress\" or \"Get-ProcessTokenGroup\" or\n \"Get-ProcessTokenPrivilege\" or \"Get-ProcessTokenType\" or\n \"Get-RegLoggedOn\" or \"Get-RegistryAlwaysInstallElevated\" or\n \"Get-RegistryAutoLogon\" or \"Get-RemoteProcAddress\" or\n \"Get-Screenshot\" or \"Get-ServiceDetail\" or\n \"Get-SiteListPassword\" or \"Get-SitelistField\" or\n \"Get-System\" or \"Get-SystemNamedPipe\" or\n \"Get-SystemToken\" or \"Get-ThreadToken\" or\n \"Get-TimedScreenshot\" or \"Get-TokenInformation\" or\n \"Get-TopPort\" or \"Get-UnattendedInstallFile\" or\n \"Get-UniqueTokens\" or \"Get-UnquotedService\" or\n \"Get-VaultCredential\" or \"Get-VaultElementValue\" or\n \"Get-VirtualProtectValue\" or \"Get-VolumeShadowCopy\" or\n \"Get-WMIProcess\" or \"Get-WMIRegCachedRDPConnection\" or\n \"Get-WMIRegLastLoggedOn\" or \"Get-WMIRegMountedDrive\" or\n \"Get-WMIRegProxy\" or \"Get-WebConfig\" or\n \"Get-Win32Constants\" or \"Get-Win32Functions\" or\n \"Get-Win32Types\" or \"Import-DllImports\" or\n \"Import-DllInRemoteProcess\" or \"Inject-LocalShellcode\" or\n \"Inject-RemoteShellcode\" or \"Install-ServiceBinary\" or\n \"Invoke-CompareAttributesForClass\" or \"Invoke-CreateRemoteThread\" or\n \"Invoke-CredentialInjection\" or \"Invoke-DllInjection\" or\n \"Invoke-EventVwrBypass\" or \"Invoke-ImpersonateUser\" or\n \"Invoke-Kerberoast\" or \"Invoke-MemoryFreeLibrary\" or\n \"Invoke-MemoryLoadLibrary\" or \"Invoke-Method\" or\n \"Invoke-Mimikatz\" or \"Invoke-NinjaCopy\" or\n \"Invoke-PatchDll\" or \"Invoke-Portscan\" or\n \"Invoke-PrivescAudit\" or \"Invoke-ReflectivePEInjection\" or\n \"Invoke-ReverseDnsLookup\" or \"Invoke-RevertToSelf\" or\n \"Invoke-ServiceAbuse\" or \"Invoke-Shellcode\" or\n \"Invoke-TokenManipulation\" or \"Invoke-UserImpersonation\" or\n \"Invoke-WmiCommand\" or \"Mount-VolumeShadowCopy\" or\n \"New-ADObjectAccessControlEntry\" or \"New-DomainGroup\" or\n \"New-DomainUser\" or \"New-DynamicParameter\" or\n \"New-InMemoryModule\" or\n \"New-ThreadedFunction\" or \"New-VolumeShadowCopy\" or\n \"Out-CompressedDll\" or \"Out-EncodedCommand\" or\n \"Out-EncryptedScript\" or \"Out-Minidump\" or\n \"PortScan-Alive\" or \"Portscan-Port\" or\n \"Remove-DomainGroupMember\" or \"Remove-DomainObjectAcl\" or\n \"Remove-RemoteConnection\" or \"Remove-VolumeShadowCopy\" or\n \"Restore-ServiceBinary\" or \"Set-DesktopACLToAllowEveryone\" or\n \"Set-DesktopACLs\" or \"Set-DomainObject\" or\n \"Set-DomainObjectOwner\" or \"Set-DomainUserPassword\" or\n \"Set-ServiceBinaryPath\" or \"Sub-SignedIntAsUnsigned\" or\n \"Test-AdminAccess\" or \"Test-MemoryRangeValid\" or\n \"Test-ServiceDaclPermission\" or \"Update-ExeFunctions\" or\n \"Update-MemoryAddresses\" or \"Update-MemoryProtectionFlags\" or\n \"Write-BytesToMemory\" or \"Write-HijackDll\" or\n \"Write-PortscanOut\" or \"Write-ServiceBinary\" or\n \"Write-UserAddMSI\" or \"Invoke-Privesc\" or\n \"func_get_proc_address\" or \"Invoke-BloodHound\" or\n \"Invoke-HostEnum\" or \"Get-BrowserInformation\" or\n \"Get-DomainAccountPolicy\" or \"Get-DomainAdmins\" or\n \"Get-AVProcesses\" or \"Get-AVInfo\" or\n \"Get-RecycleBin\" or \"Invoke-BruteForce\" or\n \"Get-PassHints\" or \"Invoke-SessionGopher\" or\n \"Get-LSASecret\" or \"Get-PassHashes\" or\n \"Invoke-WdigestDowngrade\" or \"Get-ChromeDump\" or\n \"Invoke-DomainPasswordSpray\" or \"Get-FoxDump\" or\n \"New-HoneyHash\" or \"Invoke-DCSync\" or\n \"Invoke-PowerDump\" or \"Invoke-SSIDExfil\" or\n \"Invoke-PowerShellTCP\" or \"Add-Exfiltration\" or\n \"Do-Exfiltration\" or \"Invoke-DropboxUpload\" or\n \"Invoke-ExfilDataToGitHub\" or \"Invoke-EgressCheck\" or\n \"Invoke-PostExfil\" or \"Create-MultipleSessions\" or\n \"Invoke-NetworkRelay\" or \"New-GPOImmediateTask\" or\n \"Invoke-WMIDebugger\" or \"Invoke-SQLOSCMD\" or\n \"Invoke-SMBExec\" or \"Invoke-PSRemoting\" or\n \"Invoke-ExecuteMSBuild\" or \"Invoke-DCOM\" or\n \"Invoke-InveighRelay\" or \"Invoke-PsExec\" or\n \"Invoke-SSHCommand\" or \"Find-ActiveUsersWMI\" or\n \"Get-SystemDrivesWMI\" or \"Get-ActiveNICSWMI\" or\n \"Remove-Persistence\" or \"DNS_TXT_Pwnage\" or\n \"Execute-OnTime\" or \"HTTP-Backdoor\" or\n \"Add-ConstrainedDelegationBackdoor\" or \"Add-RegBackdoor\" or\n \"Add-ScrnSaveBackdoor\" or \"Gupt-Backdoor\" or\n \"Invoke-ADSBackdoor\" or \"Add-Persistence\" or\n \"Invoke-ResolverBackdoor\" or \"Invoke-EventLogBackdoor\" or\n \"Invoke-DeadUserBackdoor\" or \"Invoke-DisableMachineAcctChange\" or\n \"Invoke-AccessBinary\" or \"Add-NetUser\" or\n \"Invoke-Schtasks\" or \"Invoke-JSRatRegsvr\" or\n \"Invoke-JSRatRundll\" or \"Invoke-PoshRatHttps\" or\n \"Invoke-PsGcatAgent\" or \"Remove-PoshRat\" or\n \"Install-SSP\" or \"Invoke-BackdoorLNK\" or\n \"PowerBreach\" or \"InstallEXE-Persistence\" or\n \"RemoveEXE-Persistence\" or \"Install-ServiceLevel-Persistence\" or\n \"Remove-ServiceLevel-Persistence\" or \"Invoke-Prompt\" or\n \"Invoke-PacketCapture\" or \"Start-WebcamRecorder\" or\n \"Get-USBKeyStrokes\" or \"Invoke-KeeThief\" or\n \"Get-Keystrokes\" or \"Invoke-NetRipper\" or\n \"Get-EmailItems\" or \"Invoke-MailSearch\" or\n \"Invoke-SearchGAL\" or \"Get-WebCredentials\" or\n \"Start-CaptureServer\" or \"Invoke-PowerShellIcmp\" or\n \"Invoke-PowerShellTcpOneLine\" or \"Invoke-PowerShellTcpOneLineBind\" or\n \"Invoke-PowerShellUdp\" or \"Invoke-PowerShellUdpOneLine\" or\n \"Run-EXEonRemote\" or \"Download-Execute-PS\" or\n \"Out-RundllCommand\" or \"Set-RemoteWMI\" or\n \"Set-DCShadowPermissions\" or \"Invoke-PowerShellWMI\" or\n \"Invoke-Vnc\" or \"Invoke-LockWorkStation\" or\n \"Invoke-EternalBlue\" or \"Invoke-ShellcodeMSIL\" or\n \"Invoke-MetasploitPayload\" or \"Invoke-DowngradeAccount\" or\n \"Invoke-RunAs\" or \"ExetoText\" or\n \"Disable-SecuritySettings\" or \"Set-MacAttribute\" or\n \"Invoke-MS16032\" or \"Invoke-BypassUACTokenManipulation\" or\n \"Invoke-SDCLTBypass\" or \"Invoke-FodHelperBypass\" or\n \"Invoke-EventVwrBypass\" or \"Invoke-EnvBypass\" or\n \"Get-ServiceUnquoted\" or \"Get-ServiceFilePermission\" or\n \"Get-ServicePermission\" or \"Get-ServicePermission\" or\n \"Enable-DuplicateToken\" or \"Invoke-PsUaCme\" or\n \"Invoke-Tater\" or \"Invoke-WScriptBypassUAC\" or\n \"Invoke-AllChecks\" or \"Find-TrustedDocuments\" or\n \"Invoke-Interceptor\" or \"Invoke-PoshRatHttp\" or\n \"Invoke-ExecCommandWMI\" or \"Invoke-KillProcessWMI\" or\n \"Invoke-CreateShareandExecute\" or \"Invoke-RemoteScriptWithOutput\" or\n \"Invoke-SchedJobManipulation\" or \"Invoke-ServiceManipulation\" or\n \"Invoke-PowerOptionsWMI\" or \"Invoke-DirectoryListing\" or\n \"Invoke-FileTransferOverWMI\" or \"Invoke-WMImplant\" or\n \"Invoke-WMIObfuscatedPSCommand\" or \"Invoke-WMIDuplicateClass\" or\n \"Invoke-WMIUpload\" or \"Invoke-WMIRemoteExtract\" or \"Invoke-winPEAS\"\n ) and\n not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\"\n ) and\n not user.id : (\"S-1-5-18\" or \"S-1-5-19\")\n", - "language": "kuery" - }, - { - "name": "Registry Persistence via AppInit DLL", - "description": "AppInit DLLs are dynamic-link libraries (DLLs) that are loaded into every process that creates a user interface (loads user32.dll) on Microsoft Windows operating systems. The AppInit DLL mechanism is used to load custom code into user-mode processes, allowing for the customization of the user interface and the behavior of Windows-based applications. Attackers who add those DLLs to the registry locations can execute code with elevated privileges, similar to process injection, and provide a solid and constant persistence on the machine.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Registry Persistence via AppInit DLL\n\nAppInit DLLs are dynamic-link libraries (DLLs) that are loaded into every process that creates a user interface (loads `user32.dll`) on Microsoft Windows operating systems. The AppInit DLL mechanism is used to load custom code into user-mode processes, allowing for the customization of the user interface and the behavior of Windows-based applications.\n\nAttackers who add those DLLs to the registry locations can execute code with elevated privileges, similar to process injection, and provide a solid and constant persistence on the machine.\n\nThis rule identifies modifications on the AppInit registry keys.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Review the source process and related DLL file tied to the Windows Registry entry.\n - Check whether the DLL is signed, and tied to a authorized program used on your environment.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Retrieve all DLLs under the AppInit registry keys:\n - !{osquery{\"label\":\"Osquery - Retrieve AppInit Registry Value\",\"query\":\"SELECT * FROM registry r where (r.key == 'HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows' or\\nr.key == 'HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Wow6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows') and r.name ==\\n'AppInit_DLLs'\\n\"}}\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable and the DLLs using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.010", - "name": "AppInit DLLs", - "reference": "https://attack.mitre.org/techniques/T1546/010/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "538b9891-8bfa-431f-b1ce-5cafe0edeb22", - "rule_id": "d0e159cf-73e9-40d1-a9ed-077e3158a855", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\AppInit_Dlls\",\n \"HKLM\\\\SOFTWARE\\\\Wow6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\AppInit_Dlls\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\AppInit_Dlls\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Wow6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\AppInit_Dlls\"\n ) and not process.executable : (\n \"C:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"C:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\",\n \"C:\\\\Program Files\\\\Commvault\\\\ContentStore*\\\\Base\\\\cvd.exe\",\n \"C:\\\\Program Files (x86)\\\\Commvault\\\\ContentStore*\\\\Base\\\\cvd.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Attempt to Delete an Okta Policy Rule", - "description": "Detects attempts to delete a rule within an Okta policy. An adversary may attempt to delete an Okta policy rule in order to weaken an organization's security controls.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Delete an Okta Policy Rule\n\nOkta policy rules are integral components of an organization's security controls, as they define how user access to resources is managed. Deletion of a rule within an Okta policy could potentially weaken the organization's security posture, allowing for unauthorized access or facilitating other malicious activities.\n\nThis rule detects attempts to delete an Okta policy rule, which could indicate an adversary's attempt to weaken an organization's security controls. Adversaries may do this to circumvent security measures and enable further malicious activities.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the deletion attempt.\n- Check the `okta.outcome.result` field to confirm the policy rule deletion attempt.\n- Check if there are multiple policy rule deletion attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the policy rule deletion attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the deletion attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the deletion attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the deletion attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized policy rule deletion is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific deletion technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 206, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if Okta MFA rules are regularly modified in your organization." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/Security_Policies.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "06a4cf1d-d42a-46c7-80ba-3d4abf3926a3", - "rule_id": "d5d86bf5-cf0c-4c06-b688-53fdc072fdfd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:policy.rule.delete\n", - "language": "kuery" - }, - { - "name": "System Information Discovery via Windows Command Shell", - "description": "Identifies the execution of discovery commands to enumerate system information, files, and folders using the Windows Command Shell.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating System Information Discovery via Windows Command Shell\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule identifies commands to enumerate system information, files, and folders using the Windows Command Shell.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "building_block_type": "default", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - }, - { - "id": "T1083", - "name": "File and Directory Discovery", - "reference": "https://attack.mitre.org/techniques/T1083/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - } - ], - "id": "8f121f28-9de9-4ee0-bf59-1dce0348aab7", - "rule_id": "d68e95ad-1c82-4074-a12a-125fe10ac8ba", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"cmd.exe\" and process.args : \"/c\" and process.args : (\"set\", \"dir\") and\n not process.parent.executable : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\", \"?:\\\\PROGRA~1\\\\*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Untrusted Driver Loaded", - "description": "Identifies attempt to load an untrusted driver. Adversaries may modify code signing policies to enable execution of unsigned or self-signed code.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Untrusted Driver Loaded\n\nMicrosoft created the Windows Driver Signature Enforcement (DSE) security feature to prevent drivers with invalid signatures from loading and executing into the kernel (ring 0). DSE aims to protect systems by blocking attackers from loading malicious drivers on targets. \n\nThis protection is essential for maintaining system security. However, attackers or administrators can disable DSE and load untrusted drivers, which can put the system at risk. Therefore, it's important to keep this feature enabled and only load drivers from trusted sources to ensure system integrity and security.\n\nThis rule identifies an attempt to load an untrusted driver, which effectively means that DSE was disabled or bypassed. This can indicate that the system was compromised.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the driver loaded to identify potentially suspicious characteristics. The following actions can help you gain context:\n - Identify the path that the driver was loaded from. If you're using Elastic Defend, path information can be found in the `dll.path` field.\n - Examine the file creation and modification timestamps:\n - On Elastic Defend, those can be found in the `dll.Ext.relative_file_creation_time` and `dll.Ext.relative_file_name_modify_time` fields. The values are in seconds.\n - Search for file creation events sharing the same file name as the `dll.name` field and identify the process responsible for the operation.\n - Investigate any other abnormal behavior by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n - Use the driver SHA-256 (`dll.hash.sha256` field) hash value to search for the existence and reputation in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Use Osquery to investigate the drivers loaded into the system.\n - !{osquery{\"label\":\"Osquery - Retrieve All Non-Microsoft Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE NOT (provider == \\\"Microsoft\\\" AND signed == \\\"1\\\")\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Unsigned Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE signed == \\\"0\\\"\\n\"}}\n- Identify the driver's `Device Name` and `Service Name`.\n- Check for alerts from the rules specified in the `Related Rules` section.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Related Rules\n\n- First Time Seen Driver Loaded - df0fd41e-5590-4965-ad5e-cd079ec22fa9\n- Code Signing Policy Modification Through Registry - da7733b1-fe08-487e-b536-0a04c6d8b0cd\n- Code Signing Policy Modification Through Built-in tools - b43570de-a908-4f7f-8bdb-b2df6ffd8c80\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Disable and uninstall all suspicious drivers found in the system. This can be done via Device Manager. (Note that this step may require you to boot the system into Safe Mode.)\n- Remove the related services and registry keys found in the system. Note that the service will probably not stop if the driver is still installed.\n - This can be done via PowerShell `Remove-Service` cmdlet.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Ensure that the Driver Signature Enforcement is enabled on the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/hfiref0x/TDL", - "https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653559(v=vs.85)?redirectedfrom=MSDN" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - } - ] - } - ] - } - ], - "id": "e6602776-8fc7-49c0-aa48-98240e36adda", - "rule_id": "d8ab1ec1-feeb-48b9-89e7-c12e189448aa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "driver where host.os.type == \"windows\" and process.pid == 4 and\n dll.code_signature.trusted != true and \n not dll.code_signature.status : (\"errorExpired\", \"errorRevoked\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Code Signing Policy Modification Through Registry", - "description": "Identifies attempts to disable/modify the code signing policy through the registry. Code signing provides authenticity on a program, and grants the user with the ability to check whether the program has been tampered with. By allowing the execution of unsigned or self-signed code, threat actors can craft and execute malicious code.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Code Signing Policy Modification Through Registry\n\nMicrosoft created the Windows Driver Signature Enforcement (DSE) security feature to prevent drivers with invalid signatures from loading and executing into the kernel (ring 0). DSE aims to protect systems by blocking attackers from loading malicious drivers on targets. \n\nThis protection is essential for maintaining system security. However, attackers or administrators can disable DSE and load untrusted drivers, which can put the system at risk. Therefore, it's important to keep this feature enabled and only load drivers from trusted sources to ensure system integrity and security.\n\nThis rule identifies registry modifications that can disable DSE.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Use Osquery and endpoint driver events (`event.category = \"driver\"`) to investigate if suspicious drivers were loaded into the system after the registry was modified.\n - !{osquery{\"label\":\"Osquery - Retrieve All Non-Microsoft Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE NOT (provider == \\\"Microsoft\\\" AND signed == \\\"1\\\")\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Unsigned Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE signed == \\\"0\\\"\\n\"}}\n- Identify the driver's `Device Name` and `Service Name`.\n- Check for alerts from the rules specified in the `Related Rules` section.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Related Rules\n\n- First Time Seen Driver Loaded - df0fd41e-5590-4965-ad5e-cd079ec22fa9\n- Untrusted Driver Loaded - d8ab1ec1-feeb-48b9-89e7-c12e189448aa\n- Code Signing Policy Modification Through Built-in tools - b43570de-a908-4f7f-8bdb-b2df6ffd8c80\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Disable and uninstall all suspicious drivers found in the system. This can be done via Device Manager. (Note that this step may require you to boot the system into Safe Mode.)\n- Remove the related services and registry keys found in the system. Note that the service will probably not stop if the driver is still installed.\n - This can be done via PowerShell `Remove-Service` cmdlet.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Remove and block malicious artifacts identified during triage.\n- Ensure that the Driver Signature Enforcement is enabled on the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1553", - "name": "Subvert Trust Controls", - "reference": "https://attack.mitre.org/techniques/T1553/", - "subtechnique": [ - { - "id": "T1553.006", - "name": "Code Signing Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1553/006/" - } - ] - }, - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "f17ccb64-bcb6-4bf8-80b3-16c798c729d2", - "rule_id": "da7733b1-fe08-487e-b536-0a04c6d8b0cd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.value", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type : (\"creation\", \"change\") and\n(\n registry.path : \"HKEY_USERS\\\\*\\\\Software\\\\Policies\\\\Microsoft\\\\Windows NT\\\\Driver Signing\\\\BehaviorOnFailedVerify\" and\n registry.value: \"BehaviorOnFailedVerify\" and\n registry.data.strings : (\"0\", \"0x00000000\", \"1\", \"0x00000001\")\n)\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Service was Installed in the System", - "description": "Identifies the creation of a new Windows service with suspicious Service command values. Windows services typically run as SYSTEM and can be used for privilege escalation and persistence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Service was Installed in the System\n\nAttackers may create new services to execute system shells and other command execution utilities to elevate their privileges from administrator to SYSTEM. They can also configure services to execute these utilities with persistence payloads.\n\nThis rule looks for suspicious services being created with suspicious traits compatible with the above behavior.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify how the service was created or modified. Look for registry changes events or Windows events related to service activities (for example, 4697 and/or 7045).\n - Examine the created and existent services, the executables or drivers referenced, and command line arguments for suspicious entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Non-Microsoft Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE NOT (provider == \\\"Microsoft\\\" AND signed == \\\"1\\\")\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Unsigned Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE signed == \\\"0\\\"\\n\"}}\n - Retrieve the referenced files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n\n### False positive analysis\n\n- Certain services such as PSEXECSVC may happen legitimately. The security team should address any potential benign true positive (B-TP) by excluding the relevant FP by pattern.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the service.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 8, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - } - ], - "id": "8e52b41c-87c4-4d8d-ba0a-356416fb7828", - "rule_id": "da87eee1-129c-4661-a7aa-57d0b9645fad", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.ImagePath", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.ServiceFileName", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "any where\n (event.code : \"4697\" and\n (winlog.event_data.ServiceFileName : \n (\"*COMSPEC*\", \"*\\\\127.0.0.1*\", \"*Admin$*\", \"*powershell*\", \"*rundll32*\", \"*cmd.exe*\", \"*PSEXESVC*\", \n \"*echo*\", \"*RemComSvc*\", \"*.bat*\", \"*.cmd*\", \"*certutil*\", \"*vssadmin*\", \"*certmgr*\", \"*bitsadmin*\", \n \"*\\\\Users\\\\*\", \"*\\\\Windows\\\\Temp\\\\*\", \"*\\\\Windows\\\\Tasks\\\\*\", \"*\\\\PerfLogs\\\\*\", \"*\\\\Windows\\\\Debug\\\\*\",\n \"*regsvr32*\", \"*msbuild*\") or\n winlog.event_data.ServiceFileName regex~ \"\"\"%systemroot%\\\\[a-z0-9]+\\.exe\"\"\")) or\n\n (event.code : \"7045\" and\n winlog.event_data.ImagePath : (\n \"*COMSPEC*\", \"*\\\\127.0.0.1*\", \"*Admin$*\", \"*powershell*\", \"*rundll32*\", \"*cmd.exe*\", \"*PSEXESVC*\",\n \"*echo*\", \"*RemComSvc*\", \"*.bat*\", \"*.cmd*\", \"*certutil*\", \"*vssadmin*\", \"*certmgr*\", \"*bitsadmin*\",\n \"*\\\\Users\\\\*\", \"*\\\\Windows\\\\Temp\\\\*\", \"*\\\\Windows\\\\Tasks\\\\*\", \"*\\\\PerfLogs\\\\*\", \"*\\\\Windows\\\\Debug\\\\*\",\n \"*regsvr32*\", \"*msbuild*\"))\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Unusual Country For an AWS Command", - "description": "A machine learning job detected AWS command activity that, while not inherently suspicious or abnormal, is sourcing from a geolocation (country) that is unusual for the command. This can be the result of compromised credentials or keys being used by a threat actor in a different geography than the authorized user(s).", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Country For an AWS Command\n\nCloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.\n\nThis rule uses a machine learning job to detect an AWS API command that while not inherently suspicious or abnormal, is sourcing from a geolocation (country) that is unusual for the command. This can be the result of compromised credentials or keys used by a threat actor in a different geography than the authorized user(s).\n\nDetection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation of the source IP address.\n\n#### Possible investigation steps\n\n- Identify the user account involved and the action performed. Verify whether it should perform this kind of action.\n - Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context.\n - The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate the activity is not related to planned patches, updates, or network administrator activity.\n- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Contact the account owner and confirm whether they are aware of this activity if suspicious.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False Positive Analysis\n\n- False positives can occur if activity is coming from new employees based in a country with no previous history in AWS.\n- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.\n\n### Related Rules\n\n- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276\n- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1\n- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff\n- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-2h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "New or unusual command and user geolocation activity can be due to manual troubleshooting or reconfiguration; changes in cloud automation scripts or workflows; adoption of new services; expansion into new regions; increased adoption of work from home policies; or users who travel frequently." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "459d3345-4c70-44e0-9e76-e900a09cc65b", - "rule_id": "dca28dee-c999-400f-b640-50a081cc0fd1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": "rare_method_for_a_country" - }, - { - "name": "First Time Seen Driver Loaded", - "description": "Identifies the load of a driver with an original file name and signature values that were observed for the first time during the last 30 days. This rule type can help baseline drivers installation within your environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating First Time Seen Driver Loaded\n\nA driver is a software component that allows the operating system to communicate with hardware devices. It works at a high privilege level, the kernel level, having high control over the system's security and stability.\n\nAttackers may exploit known good but vulnerable drivers to execute code in their context because once an attacker can execute code in the kernel, security tools can no longer effectively protect the host. They can leverage these drivers to tamper, bypass and terminate security software, elevate privileges, create persistence mechanisms, and disable operating system protections and monitoring features. Attackers were seen in the wild conducting these actions before acting on their objectives, such as ransomware.\n\nRead the complete research on \"Stopping Vulnerable Driver Attacks\" done by Elastic Security Labs [here](https://www.elastic.co/kr/security-labs/stopping-vulnerable-driver-attacks).\n\nThis rule identifies the load of a driver with an original file name and signature values observed for the first time during the last 30 days. This rule type can help baseline drivers installation within your environment.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the driver loaded to identify potentially suspicious characteristics. The following actions can help you gain context:\n - Identify the path that the driver was loaded from. If using Elastic Defend, this information can be found in the `dll.path` field.\n - Examine the digital signature of the driver, and check if it's valid.\n - Examine the creation and modification timestamps of the file:\n - On Elastic Defend, those can be found in the `dll.Ext.relative_file_creation_time` and `\"dll.Ext.relative_file_name_modify_time\"` fields, with the values being seconds.\n - Search for file creation events sharing the same file name as the `dll.name` field and identify the process responsible for the operation.\n - Investigate any other abnormal behavior by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n - Use the driver SHA-256 (`dll.hash.sha256` field) hash value to search for the existence and reputation in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Use Osquery to investigate the drivers loaded into the system.\n - !{osquery{\"label\":\"Osquery - Retrieve All Non-Microsoft Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE NOT (provider == \\\"Microsoft\\\" AND signed == \\\"1\\\")\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Unsigned Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE signed == \\\"0\\\"\\n\"}}\n- Identify the driver's `Device Name` and `Service Name`.\n- Check for alerts from the rules specified in the `Related Rules` section.\n\n### False positive analysis\n\n- Matches derived from these rules are not inherently malicious. The security team should investigate them to ensure they are legitimate and needed, then include them in an allowlist only if required. The security team should address any vulnerable driver installation as it can put the user and the domain at risk.\n\n### Related Rules\n\n- Untrusted Driver Loaded - d8ab1ec1-feeb-48b9-89e7-c12e189448aa\n- Code Signing Policy Modification Through Registry - da7733b1-fe08-487e-b536-0a04c6d8b0cd\n- Code Signing Policy Modification Through Built-in tools - b43570de-a908-4f7f-8bdb-b2df6ffd8c80\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Disable and uninstall all suspicious drivers found in the system. This can be done via Device Manager. (Note that this step may require you to boot the system into Safe Mode)\n- Remove the related services and registry keys found in the system. Note that the service will probably not stop if the driver is still installed.\n - This can be done via PowerShell `Remove-Service` cmdlet.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Ensure that the Driver Signature Enforcement is enabled on the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Persistence", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/kr/security-labs/stopping-vulnerable-driver-attacks" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - } - ], - "id": "d9f3b024-e6ef-4dd9-8d86-e0d1c7b0204e", - "rule_id": "df0fd41e-5590-4965-ad5e-cd079ec22fa9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "new_terms", - "query": "event.category:\"driver\" and host.os.type:windows and event.action:\"load\"\n", - "new_terms_fields": [ - "dll.pe.original_file_name", - "dll.code_signature.subject_name" - ], - "history_window_start": "now-30d", - "index": [ - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "Suspicious .NET Reflection via PowerShell", - "description": "Detects the use of Reflection.Assembly to load PEs and DLLs in memory in PowerShell scripts. Attackers use this method to load executables and DLLs without writing to the disk, bypassing security solutions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious .NET Reflection via PowerShell\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can use .NET reflection to load PEs and DLLs in memory. These payloads are commonly embedded in the script, which can circumvent file-based security protections.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the script using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately outside engineering or IT business units. As long as the analyst did not identify malware or suspicious activity related to the user or host, this alert can be dismissed.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n- PowerShell Suspicious Payload Encoded and Compressed - 81fe9dc6-a2d7-4192-a2d8-eed98afc766a\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 109, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assembly.load" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1620", - "name": "Reflective Code Loading", - "reference": "https://attack.mitre.org/techniques/T1620/" - }, - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/", - "subtechnique": [ - { - "id": "T1055.001", - "name": "Dynamic-link Library Injection", - "reference": "https://attack.mitre.org/techniques/T1055/001/" - }, - { - "id": "T1055.002", - "name": "Portable Executable Injection", - "reference": "https://attack.mitre.org/techniques/T1055/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "c492b623-1e97-4096-914b-c7265c90533b", - "rule_id": "e26f042e-c590-4e82-8e05-41e81bd822ad", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"[System.Reflection.Assembly]::Load\" or\n \"[Reflection.Assembly]::Load\"\n ) and not \n powershell.file.script_block_text : (\n (\"CommonWorkflowParameters\" or \"RelatedLinksHelpInfo\") and\n \"HelpDisplayStrings\"\n ) and not \n (powershell.file.script_block_text :\n (\"Get-SolutionFiles\" or \"Get-VisualStudio\" or \"Select-MSBuildPath\") and\n not file.name : \"PathFunctions.ps1\"\n )\n and not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "Suspicious Process Execution via Renamed PsExec Executable", - "description": "Identifies suspicious psexec activity which is executing from the psexec service that has been renamed, possibly to evade detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Process Execution via Renamed PsExec Executable\n\nPsExec is a remote administration tool that enables the execution of commands with both regular and SYSTEM privileges on Windows systems. It operates by executing a service component `Psexecsvc` on a remote system, which then runs a specified process and returns the results to the local system. Microsoft develops PsExec as part of the Sysinternals Suite. Although commonly used by administrators, PsExec is frequently used by attackers to enable lateral movement and execute commands as SYSTEM to disable defenses and bypass security protections.\n\nThis rule identifies instances where the PsExec service component is executed using a custom name. This behavior can indicate an attempt to bypass security controls or detections that look for the default PsExec service component name.\n\n#### Possible investigation steps\n\n- Check if the usage of this tool complies with the organization's administration policy.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Identify the target computer and its role in the IT environment.\n- Investigate what commands were run, and assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. As long as the analyst did not identify suspicious activity related to the user or involved hosts, and the tool is allowed by the organization's policy, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n - Prioritize cases involving critical servers and users.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1569", - "name": "System Services", - "reference": "https://attack.mitre.org/techniques/T1569/", - "subtechnique": [ - { - "id": "T1569.002", - "name": "Service Execution", - "reference": "https://attack.mitre.org/techniques/T1569/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.003", - "name": "Rename System Utilities", - "reference": "https://attack.mitre.org/techniques/T1036/003/" - } - ] - } - ] - } - ], - "id": "cb29a73e-d0a1-45cb-9855-188d0584aaf6", - "rule_id": "e2f9fdf5-8076-45ad-9427-41e0e03dc9c2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name : \"psexesvc.exe\" and not process.name : \"PSEXESVC.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Persistence via KDE AutoStart Script or Desktop File Modification", - "description": "Identifies the creation or modification of a K Desktop Environment (KDE) AutoStart script or desktop file that will execute upon each user logon. Adversaries may abuse this method for persistence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://userbase.kde.org/System_Settings/Autostart", - "https://www.amnesty.org/en/latest/research/2020/09/german-made-finspy-spyware-found-in-egypt-and-mac-and-linux-versions-revealed/", - "https://www.intezer.com/blog/research/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/" - } - ] - } - ], - "id": "33a361e9-429f-4cca-9f13-b5115a2c409d", - "rule_id": "e3e904b3-0a8e-4e68-86a8-977a163e21d3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", - "type": "eql", - "query": "file where host.os.type == \"linux\" and event.type != \"deletion\" and\n file.extension in (\"sh\", \"desktop\") and\n file.path :\n (\n \"/home/*/.config/autostart/*\", \"/root/.config/autostart/*\",\n \"/home/*/.kde/Autostart/*\", \"/root/.kde/Autostart/*\",\n \"/home/*/.kde4/Autostart/*\", \"/root/.kde4/Autostart/*\",\n \"/home/*/.kde/share/autostart/*\", \"/root/.kde/share/autostart/*\",\n \"/home/*/.kde4/share/autostart/*\", \"/root/.kde4/share/autostart/*\",\n \"/home/*/.local/share/autostart/*\", \"/root/.local/share/autostart/*\",\n \"/home/*/.config/autostart-scripts/*\", \"/root/.config/autostart-scripts/*\",\n \"/etc/xdg/autostart/*\", \"/usr/share/autostart/*\"\n ) and\n not process.name in (\"yum\", \"dpkg\", \"install\", \"dnf\", \"teams\", \"yum-cron\", \"dnf-automatic\", \"docker\", \"dockerd\", \n \"rpm\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Attempt to Modify an Okta Network Zone", - "description": "Detects attempts to modify an Okta network zone. Okta network zones can be configured to limit or restrict access to a network based on IP addresses or geolocations. An adversary may attempt to modify, delete, or deactivate an Okta network zone in order to remove or weaken an organization's security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Modify an Okta Network Zone\n\nThe modification of an Okta network zone is a critical event as it could potentially allow an adversary to gain unrestricted access to your network. This rule detects attempts to modify, delete, or deactivate an Okta network zone, which may suggest an attempt to remove or weaken an organization's security controls.\n\n#### Possible investigation steps:\n\n- Identify the actor related to the alert by reviewing `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, or `okta.actor.display_name` fields in the alert.\n- Review the `okta.client.user_agent.raw_user_agent` field to understand the device and software used by the actor.\n- Examine the `okta.outcome.reason` field for additional context around the modification attempt.\n- Check the `okta.outcome.result` field to confirm the network zone modification attempt.\n- Check if there are multiple network zone modification attempts from the same actor or IP address (`okta.client.ip`).\n- Check for successful logins immediately following the modification attempt.\n- Verify whether the actor's activity aligns with typical behavior or if any unusual activity took place around the time of the modification attempt.\n\n### False positive analysis:\n\n- Check if there were issues with the Okta system at the time of the modification attempt. This could indicate a system error rather than a genuine threat activity.\n- Check the geographical location (`okta.request.ip_chain.geographical_context`) and time of the modification attempt. If these match the actor's normal behavior, it might be a false positive.\n- Verify the actor's administrative rights to ensure they are correctly configured.\n\n### Response and remediation:\n\n- If unauthorized modification is confirmed, initiate the incident response process.\n- Immediately lock the affected actor account and require a password change.\n- Consider resetting MFA tokens for the actor and require re-enrollment.\n- Check if the compromised account was used to access or alter any sensitive data or systems.\n- If a specific modification technique was used, ensure your systems are patched or configured to prevent such techniques.\n- Assess the criticality of affected services and servers.\n- Work with your IT team to minimize the impact on users and maintain business continuity.\n- If multiple accounts are affected, consider a broader reset or audit of MFA tokens.\n- Implement security best practices [outlined](https://www.okta.com/blog/2019/10/9-admin-best-practices-to-keep-your-org-secure/) by Okta.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 206, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Use Case: Network Security Monitoring", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if Oyour organization's Okta network zones are regularly modified." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/network/network-zones.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "09433b01-dabd-4a10-b453-7100ea215372", - "rule_id": "e48236ca-b67a-4b4e-840c-fdc7782bc0c3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:(zone.update or network_zone.rule.disabled or zone.remove_blacklist)\n", - "language": "kuery" - }, - { - "name": "Potential Linux Credential Dumping via Unshadow", - "description": "Identifies the execution of the unshadow utility which is part of John the Ripper, a password-cracking tool on the host machine. Malicious actors can use the utility to retrieve the combined contents of the '/etc/shadow' and '/etc/password' files. Using the combined file generated from the utility, the malicious threat actors can use them as input for password-cracking utilities or prepare themselves for future operations by gathering credential information of the victim.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Data Source: Elastic Endgame", - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.cyberciti.biz/faq/unix-linux-password-cracking-john-the-ripper/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.008", - "name": "/etc/passwd and /etc/shadow", - "reference": "https://attack.mitre.org/techniques/T1003/008/" - } - ] - } - ] - } - ], - "id": "b9a627eb-6cfb-474f-b82f-3aa2520eddbc", - "rule_id": "e7cb3cfd-aaa3-4d7b-af18-23b89955062c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and process.name == \"unshadow\" and\n event.type == \"start\" and event.action in (\"exec\", \"exec_event\") and process.args_count >= 2\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Service Control Spawned via Script Interpreter", - "description": "Identifies Service Control (sc.exe) spawning from script interpreter processes to create, modify, or start services. This can potentially indicate an attempt to elevate privileges or maintain persistence.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Service Control Spawned via Script Interpreter\n\nWindows services are background processes that run with SYSTEM privileges and provide specific functionality or support to other applications and system components.\n\nThe `sc.exe` command line utility is used to manage and control Windows services on a local or remote computer. Attackers may use `sc.exe` to create, modify, and start services to elevate their privileges from administrator to SYSTEM.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine the command line, registry changes events, and Windows events related to service activities (for example, 4697 and/or 7045) for suspicious characteristics.\n - Examine the created and existent services, the executables or drivers referenced, and command line arguments for suspicious entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the referenced files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This activity is not inherently malicious if it occurs in isolation. As long as the analyst did not identify suspicious activity related to the user, host, and service, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Delete the service or restore it to the original configuration.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - }, - { - "id": "T1059.005", - "name": "Visual Basic", - "reference": "https://attack.mitre.org/techniques/T1059/005/" - } - ] - }, - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.010", - "name": "Regsvr32", - "reference": "https://attack.mitre.org/techniques/T1218/010/" - }, - { - "id": "T1218.011", - "name": "Rundll32", - "reference": "https://attack.mitre.org/techniques/T1218/011/" - } - ] - } - ] - } - ], - "id": "9d898be7-41e4-428f-8d9c-b911d1a441a2", - "rule_id": "e8571d5f-bea1-46c2-9f56-998de2d3ed95", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "/* This rule is not compatible with Sysmon due to user.id issues */\n\nprocess where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"sc.exe\" or process.pe.original_file_name == \"sc.exe\") and\n process.parent.name : (\"cmd.exe\", \"wscript.exe\", \"rundll32.exe\", \"regsvr32.exe\",\n \"wmic.exe\", \"mshta.exe\",\"powershell.exe\", \"pwsh.exe\") and\n process.args:(\"config\", \"create\", \"start\", \"delete\", \"stop\", \"pause\") and\n /* exclude SYSTEM SID - look for service creations by non-SYSTEM user */\n not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "logs-system.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Unusual Executable File Creation by a System Critical Process", - "description": "Identifies an unexpected executable file being created or modified by a Windows system critical process, which may indicate activity related to remote code execution or other forms of exploitation.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Executable File Creation by a System Critical Process\n\nWindows internal/system processes have some characteristics that can be used to spot suspicious activities. One of these characteristics is file operations.\n\nThis rule looks for the creation of executable files done by system-critical processes. This can indicate the exploitation of a vulnerability or a malicious process masquerading as a system-critical process.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1211", - "name": "Exploitation for Defense Evasion", - "reference": "https://attack.mitre.org/techniques/T1211/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1203", - "name": "Exploitation for Client Execution", - "reference": "https://attack.mitre.org/techniques/T1203/" - } - ] - } - ], - "id": "9e6439fb-f39f-4651-b703-ffc26f3f06fb", - "rule_id": "e94262f2-c1e9-4d3f-a907-aeab16712e1a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.extension : (\"exe\", \"dll\") and\n process.name : (\"smss.exe\",\n \"autochk.exe\",\n \"csrss.exe\",\n \"wininit.exe\",\n \"services.exe\",\n \"lsass.exe\",\n \"winlogon.exe\",\n \"userinit.exe\",\n \"LogonUI.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Attempt to Deactivate an Okta Application", - "description": "Detects attempts to deactivate an Okta application. An adversary may attempt to modify, deactivate, or delete an Okta application in order to weaken an organization's security controls or disrupt their business operations.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Attempt to Deactivate an Okta Application\n\nThis rule detects attempts to deactivate an Okta application. Unauthorized deactivation could lead to disruption of services and pose a significant risk to the organization.\n\n#### Possible investigation steps:\n- Identify the actor associated with the deactivation attempt by examining the `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, and `okta.actor.display_name` fields.\n- Determine the client used by the actor. Review the `okta.client.ip`, `okta.client.user_agent.raw_user_agent`, `okta.client.zone`, `okta.client.device`, and `okta.client.id` fields.\n- If the client is a device, check the `okta.device.id`, `okta.device.name`, `okta.device.os_platform`, `okta.device.os_version`, and `okta.device.managed` fields.\n- Understand the context of the event from the `okta.debug_context.debug_data` and `okta.authentication_context` fields.\n- Check the `okta.outcome.result` and `okta.outcome.reason` fields to see if the attempt was successful or failed.\n- Review the past activities of the actor involved in this action by checking their previous actions logged in the `okta.target` field.\n- Analyze the `okta.transaction.id` and `okta.transaction.type` fields to understand the context of the transaction.\n- Evaluate the actions that happened just before and after this event in the `okta.event_type` field to help understand the full context of the activity.\n\n### False positive analysis:\n- It might be a false positive if the action was part of a planned activity, performed by an authorized person, or if the `okta.outcome.result` field shows a failure.\n- An unsuccessful attempt might also indicate an authorized user having trouble rather than a malicious activity.\n\n### Response and remediation:\n- If unauthorized deactivation attempts are confirmed, initiate the incident response process.\n- Block the IP address or device used in the attempts if they appear suspicious, using the data from the `okta.client.ip` and `okta.device.id` fields.\n- Reset the user's password and enforce MFA re-enrollment, if applicable.\n- Conduct a review of Okta policies and ensure they are in accordance with security best practices.\n- If the deactivated application was crucial for business operations, coordinate with the relevant team to reactivate it and minimize the impact.", - "version": 206, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if your organization's Okta applications are regularly deactivated and the behavior is expected." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Apps/Apps_Apps.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1489", - "name": "Service Stop", - "reference": "https://attack.mitre.org/techniques/T1489/" - } - ] - } - ], - "id": "bb55a64f-a999-44be-ab40-dd884caf506b", - "rule_id": "edb91186-1c7e-4db8-b53e-bfa33a1a0a8a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:application.lifecycle.deactivate\n", - "language": "kuery" - }, - { - "name": "Potential Remote Code Execution via Web Server", - "description": "Identifies suspicious commands executed via a web server, which may suggest a vulnerability and remote shell access. Attackers may exploit a vulnerability in a web application to execute commands via a web server, or place a backdoor file that can be abused to gain code execution as a mechanism for persistence.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Remote Code Execution via Web Server\n\nAdversaries may backdoor web servers with web shells to establish persistent access to systems. A web shell is a malicious script, often embedded into a compromised web server, that grants an attacker remote access and control over the server. This enables the execution of arbitrary commands, data exfiltration, and further exploitation of the target network.\n\nThis rule detects a web server process spawning script and command line interface programs, potentially indicating attackers executing commands using the web shell.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible investigation steps\n\n- Investigate abnormal behaviors by the subject process such as network connections, file modifications, and any other spawned child processes.\n - Investigate listening ports and open sockets to look for potential reverse shells or data exfiltration.\n - !{osquery{\"label\":\"Osquery - Retrieve Listening Ports\",\"query\":\"SELECT pid, address, port, socket, protocol, path FROM listening_ports\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Open Sockets\",\"query\":\"SELECT pid, family, remote_address, remote_port, socket, state FROM process_open_sockets\"}}\n - Investigate the process information for malicious or uncommon processes/process trees.\n - !{osquery{\"label\":\"Osquery - Retrieve Process Info\",\"query\":\"SELECT name, cmdline, parent, path, uid FROM processes\"}}\n - Investigate the process tree spawned from the user that is used to run the web application service. A user that is running a web application should not spawn other child processes.\n - !{osquery{\"label\":\"Osquery - Retrieve Process Info for Webapp User\",\"query\":\"SELECT name, cmdline, parent, path, uid FROM processes WHERE uid = {{process.user.id}}\"}}\n- Examine the command line to determine which commands or scripts were executed.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - File access, modification, and creation activities.\n - Cron jobs, services and other persistence mechanisms.\n - !{osquery{\"label\":\"Osquery - Retrieve Crontab Information\",\"query\":\"SELECT * FROM crontab\"}}\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Initial Access", - "Data Source: Elastic Endgame", - "Use Case: Vulnerability", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Network monitoring or management products may have a web server component that runs shell commands as part of normal behavior." - ], - "references": [ - "https://pentestlab.blog/tag/web-shell/", - "https://www.elastic.co/security-labs/elastic-response-to-the-the-spring4shell-vulnerability-cve-2022-22965" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1505", - "name": "Server Software Component", - "reference": "https://attack.mitre.org/techniques/T1505/", - "subtechnique": [ - { - "id": "T1505.003", - "name": "Web Shell", - "reference": "https://attack.mitre.org/techniques/T1505/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - } - ], - "id": "e70c2051-812e-4048-a03c-8dc87d5d1f9e", - "rule_id": "f16fca20-4d6c-43f9-aec1-20b6de3b0aeb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and\nevent.action in (\"exec\", \"exec_event\") and process.parent.executable : (\n \"/usr/sbin/nginx\", \"/usr/local/sbin/nginx\",\n \"/usr/sbin/apache\", \"/usr/local/sbin/apache\",\n \"/usr/sbin/apache2\", \"/usr/local/sbin/apache2\",\n \"/usr/sbin/php*\", \"/usr/local/sbin/php*\",\n \"/usr/sbin/lighttpd\", \"/usr/local/sbin/lighttpd\",\n \"/usr/sbin/hiawatha\", \"/usr/local/sbin/hiawatha\",\n \"/usr/local/bin/caddy\", \n \"/usr/local/lsws/bin/lswsctrl\",\n \"*/bin/catalina.sh\"\n) and\nprocess.name : (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"python*\", \"perl\", \"php*\", \"tmux\") and\nprocess.args : (\"whoami\", \"id\", \"uname\", \"cat\", \"hostname\", \"ip\", \"curl\", \"wget\", \"pwd\") and\nnot process.name == \"phpquery\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Potential OpenSSH Backdoor Logging Activity", - "description": "Identifies a Secure Shell (SSH) client or server process creating or writing to a known SSH backdoor log file. Adversaries may modify SSH related binaries for persistence or credential access via patching sensitive functions to enable unauthorized access or to log SSH credentials for exfiltration.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Updates to approved and trusted SSH executables can trigger this rule." - ], - "references": [ - "https://github.com/eset/malware-ioc/tree/master/sshdoor", - "https://www.welivesecurity.com/wp-content/uploads/2021/01/ESET_Kobalos.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1556", - "name": "Modify Authentication Process", - "reference": "https://attack.mitre.org/techniques/T1556/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1554", - "name": "Compromise Client Software Binary", - "reference": "https://attack.mitre.org/techniques/T1554/" - } - ] - } - ], - "id": "dc9c6c43-346e-4c44-9677-7b77aec9bc1d", - "rule_id": "f28e2be4-6eca-4349-bdd9-381573730c22", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n#### Custom Ingest Pipeline\nFor versions <8.2, you need to add a custom ingest pipeline to populate `event.ingested` with @timestamp for non-elastic-agent indexes, like auditbeats/filebeat/winlogbeat etc. For more details to add a custom ingest pipeline refer to the [guide](https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html).\n\n", - "type": "eql", - "query": "file where host.os.type == \"linux\" and event.type == \"change\" and process.executable : (\"/usr/sbin/sshd\", \"/usr/bin/ssh\") and\n (\n (file.name : (\".*\", \"~*\", \"*~\") and not file.name : (\".cache\", \".viminfo\", \".bash_history\", \".google_authenticator\",\n \".jelenv\", \".csvignore\", \".rtreport\")) or\n file.extension : (\"in\", \"out\", \"ini\", \"h\", \"gz\", \"so\", \"sock\", \"sync\", \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\") or\n file.path :\n (\n \"/private/etc/*--\",\n \"/usr/share/*\",\n \"/usr/include/*\",\n \"/usr/local/include/*\",\n \"/private/tmp/*\",\n \"/private/var/tmp/*\",\n \"/usr/tmp/*\",\n \"/usr/share/man/*\",\n \"/usr/local/share/*\",\n \"/usr/lib/*.so.*\",\n \"/private/etc/ssh/.sshd_auth\",\n \"/usr/bin/ssd\",\n \"/private/var/opt/power\",\n \"/private/etc/ssh/ssh_known_hosts\",\n \"/private/var/html/lol\",\n \"/private/var/log/utmp\",\n \"/private/var/lib\",\n \"/var/run/sshd/sshd.pid\",\n \"/var/run/nscd/ns.pid\",\n \"/var/run/udev/ud.pid\",\n \"/var/run/udevd.pid\"\n )\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Persistent Scripts in the Startup Directory", - "description": "Identifies script engines creating files in the Startup folder, or the creation of script files in the Startup folder. Adversaries may abuse this technique to maintain persistence in an environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Persistent Scripts in the Startup Directory\n\nThe Windows Startup folder is a special folder in Windows. Programs added to this folder are executed during account logon, without user interaction, providing an excellent way for attackers to maintain persistence.\n\nThis rule looks for shortcuts created by wscript.exe or cscript.exe, or js/vbs scripts created by any process.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- Suspicious Startup Shell Folder Modification - c8b150f0-0164-475b-a75e-74b47800a9ff\n- Startup Folder Persistence via Unsigned Process - 2fba96c0-ade5-4bce-b92f-a5df2509da3f\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - }, - { - "id": "T1547.009", - "name": "Shortcut Modification", - "reference": "https://attack.mitre.org/techniques/T1547/009/" - } - ] - } - ] - } - ], - "id": "9307153b-458d-4572-8a29-ca496ba2ec67", - "rule_id": "f7c4dc5a-a58d-491d-9f14-9b66507121c0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and user.domain != \"NT AUTHORITY\" and\n\n /* detect shortcuts created by wscript.exe or cscript.exe */\n (file.path : \"C:\\\\*\\\\Programs\\\\Startup\\\\*.lnk\" and\n process.name : (\"wscript.exe\", \"cscript.exe\")) or\n\n /* detect vbs or js files created by any process */\n file.path : (\"C:\\\\*\\\\Programs\\\\Startup\\\\*.vbs\",\n \"C:\\\\*\\\\Programs\\\\Startup\\\\*.vbe\",\n \"C:\\\\*\\\\Programs\\\\Startup\\\\*.wsh\",\n \"C:\\\\*\\\\Programs\\\\Startup\\\\*.wsf\",\n \"C:\\\\*\\\\Programs\\\\Startup\\\\*.js\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Reverse Shell via Suspicious Binary", - "description": "This detection rule detects the creation of a shell through a chain consisting of the execution of a suspicious binary (located in a commonly abused location or executed manually) followed by a network event and ending with a shell being spawned. Stageless reverse tcp shells display this behaviour. Attackers may spawn reverse shells to establish persistence onto a target system.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - } - ], - "id": "b117ff56-336a-47d2-b7a9-83c1de5c1bdd", - "rule_id": "fa3a59dc-33c3-43bf-80a9-e8437a922c7f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=1s\n[ process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and\n process.executable : (\n \"./*\", \"/tmp/*\", \"/var/tmp/*\", \"/var/www/*\", \"/dev/shm/*\", \"/etc/init.d/*\", \"/etc/rc*.d/*\",\n \"/etc/crontab\", \"/etc/cron.*\", \"/etc/update-motd.d/*\", \"/usr/lib/update-notifier/*\",\n \"/boot/*\", \"/srv/*\", \"/run/*\", \"/root/*\", \"/etc/rc.local\"\n ) and\n process.parent.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and not\n process.name : (\"curl\", \"wget\", \"ping\", \"apt\", \"dpkg\", \"yum\", \"rpm\", \"dnf\", \"dockerd\") ]\n[ network where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"connection_attempted\", \"connection_accepted\") and\n process.executable : (\n \"./*\", \"/tmp/*\", \"/var/tmp/*\", \"/var/www/*\", \"/dev/shm/*\", \"/etc/init.d/*\", \"/etc/rc*.d/*\",\n \"/etc/crontab\", \"/etc/cron.*\", \"/etc/update-motd.d/*\", \"/usr/lib/update-notifier/*\",\n \"/boot/*\", \"/srv/*\", \"/run/*\", \"/root/*\", \"/etc/rc.local\"\n ) and destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\" ]\n[ process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and \n process.parent.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") ]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Antimalware Scan Interface DLL", - "description": "Identifies the creation of the Antimalware Scan Interface (AMSI) DLL in an unusual location. This may indicate an attempt to bypass AMSI by loading a rogue AMSI module instead of the legit one.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Antimalware Scan Interface DLL\n\nThe Windows Antimalware Scan Interface (AMSI) is a versatile interface standard that allows your applications and services to integrate with any antimalware product on a machine. AMSI integrates with multiple Windows components, ranging from User Account Control (UAC) to VBA macros and PowerShell.\n\nAttackers might copy a rogue AMSI DLL to an unusual location to prevent the process from loading the legitimate module, achieving a bypass to execute malicious code.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the process that created the DLL and which account was used.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the execution of scripts and macros after the registry modification.\n- Investigate other processes launched from the directory that the DLL was created.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe:\n - Observe and collect information about the following activities in the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n\n### False positive analysis\n\n- This modification should not happen legitimately. Any potential benign true positive (B-TP) should be mapped and monitored by the security team as these modifications expose the host to malware infections.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/S3cur3Th1sSh1t/Amsi-Bypass-Powershell" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - }, - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.001", - "name": "DLL Search Order Hijacking", - "reference": "https://attack.mitre.org/techniques/T1574/001/" - } - ] - } - ] - } - ], - "id": "d87bc7a0-2543-4b94-b247-96d8062db862", - "rule_id": "fa488440-04cc-41d7-9279-539387bf2a17", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.action != \"deletion\" and file.path != null and\n file.name : (\"amsi.dll\", \"amsi\") and not file.path : (\"?:\\\\Windows\\\\system32\\\\amsi.dll\", \"?:\\\\Windows\\\\Syswow64\\\\amsi.dll\", \"?:\\\\$WINDOWS.~BT\\\\NewOS\\\\Windows\\\\WinSXS\\\\*\", \"?:\\\\$WINDOWS.~BT\\\\NewOS\\\\Windows\\\\servicing\\\\LCU\\\\*\", \"?:\\\\$WINDOWS.~BT\\\\Work\\\\*\\\\*\", \"?:\\\\Windows\\\\SoftwareDistribution\\\\Download\\\\*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Network Connection via Registration Utility", - "description": "Identifies the native Windows tools regsvr32.exe, regsvr64.exe, RegSvcs.exe, or RegAsm.exe making a network connection. This may be indicative of an attacker bypassing allowlists or running arbitrary scripts via a signed Microsoft binary.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Network Connection via Registration Utility\n\nBy examining the specific traits of Windows binaries -- such as process trees, command lines, network connections, registry modifications, and so on -- it's possible to establish a baseline of normal activity. Deviations from this baseline can indicate malicious activity such as masquerading, and deserve further investigation.\n\nThis rule looks for the execution of `regsvr32.exe`, `RegAsm.exe`, or `RegSvcs.exe` utilities followed by a network connection to an external address. Attackers can abuse utilities to execute malicious files or masquerade as those utilities in order to bypass detections and evade defenses.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n - Investigate the file digital signature and process original filename, if suspicious, treat it as potential malware.\n- Investigate the target host that the signed binary is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of destination IP address and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Security testing may produce events like this. Activity of this kind performed by non-engineers and ordinary users is unusual." - ], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.009", - "name": "Regsvcs/Regasm", - "reference": "https://attack.mitre.org/techniques/T1218/009/" - }, - { - "id": "T1218.010", - "name": "Regsvr32", - "reference": "https://attack.mitre.org/techniques/T1218/010/" - } - ] - } - ] - } - ], - "id": "6304d664-792d-4be3-8d0f-88d9247df5d8", - "rule_id": "fb02b8d3-71ee-4af1-bacd-215d23f17efa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.token.integrity_level_name", - "type": "unknown", - "ecs": false - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.IntegrityLevel", - "type": "keyword", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"regsvr32.exe\", \"RegAsm.exe\", \"RegSvcs.exe\") and\n not (\n (?process.Ext.token.integrity_level_name : \"System\" or ?winlog.event_data.IntegrityLevel : \"System\") and\n (process.parent.name : \"msiexec.exe\" or process.parent.executable : (\"C:\\\\Program Files (x86)\\\\*.exe\", \"C:\\\\Program Files\\\\*.exe\"))\n )\n ]\n [network where host.os.type == \"windows\" and process.name : (\"regsvr32.exe\", \"RegAsm.exe\", \"RegSvcs.exe\") and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\") and network.protocol != \"dns\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Svchost spawning Cmd", - "description": "Identifies a suspicious parent child process relationship with cmd.exe descending from svchost.exe", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "timeline_id": "e70679c2-6cde-4510-9764-4823df18f7db", - "timeline_title": "Comprehensive Process Timeline", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Svchost spawning Cmd\n\nThe Service Host process (SvcHost) is a system process that can host one, or multiple, Windows services in the Windows NT family of operating systems. Note that `Svchost.exe` is reserved for use by the operating system and should not be used by non-Windows services.\n\nThis rule looks for the creation of the `cmd.exe` process with `svchost.exe` as its parent process. This is an unusual behavior that can indicate the masquerading of a malicious process as `svchost.exe` or exploitation for privilege escalation.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 207, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://nasbench.medium.com/demystifying-the-svchost-exe-process-and-its-command-line-options-508e9114e747" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "d2ff29df-7547-4be6-87a8-fa25ae374ce4", - "rule_id": "fd7a6052-58fa-4397-93c3-4795249ccfa2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name.caseless", - "type": "unknown", - "ecs": false - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "new_terms", - "query": "host.os.type:windows and event.category:process and event.type:start and process.parent.name:\"svchost.exe\" and \nprocess.name.caseless:\"cmd.exe\"\n", - "new_terms_fields": [ - "host.id", - "process.command_line", - "user.id" - ], - "history_window_start": "now-14d", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ], - "language": "kuery" - }, - { - "name": "Cron Job Created or Changed by Previously Unknown Process", - "description": "Linux cron jobs are scheduled tasks that can be leveraged by malicious actors for persistence, privilege escalation and command execution. By creating or modifying cron job configurations, attackers can execute malicious commands or scripts at predefined intervals, ensuring their continued presence and enabling unauthorized activities.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://pberba.github.io/security/2022/01/30/linux-threat-hunting-for-persistence-systemd-timers-cron/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.003", - "name": "Cron", - "reference": "https://attack.mitre.org/techniques/T1053/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.003", - "name": "Cron", - "reference": "https://attack.mitre.org/techniques/T1053/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.003", - "name": "Cron", - "reference": "https://attack.mitre.org/techniques/T1053/003/" - } - ] - } - ] - } - ], - "id": "651d95d7-b334-4501-b27a-31f4fcee0002", - "rule_id": "ff10d4d8-fea7-422d-afb1-e5a2702369a9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "host.os.type : \"linux\" and event.action : (\"change\" or \"file_modify_event\" or \"creation\" or \"file_create_event\") and \nfile.path : (/etc/cron.allow or /etc/cron.deny or /etc/cron.d/* or /etc/cron.hourly/* or /etc/cron.daily/* or \n/etc/cron.weekly/* or /etc/cron.monthly/* or /etc/crontab or /usr/sbin/cron or /usr/sbin/anacron) \nand not (process.name : (\"dpkg\" or \"dockerd\" or \"rpm\" or \"snapd\" or \"yum\" or \"exe\" or \"dnf\" or \"5\") or \nfile.extension : (\"swp\" or \"swpx\"))\n", - "new_terms_fields": [ - "host.id", - "file.path", - "process.executable" - ], - "history_window_start": "now-10d", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "AWS Redshift Cluster Creation", - "description": "Identifies the creation of an Amazon Redshift cluster. Unexpected creation of this cluster by a non-administrative user may indicate a permission or role issue with current users. If unexpected, the resource may not properly be configured and could introduce security vulnerabilities.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Valid clusters may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Cluster creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateCluster.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - } - ], - "id": "1cf65ca0-9e98-40d4-837c-2fe1dc5684fa", - "rule_id": "015cca13-8832-49ac-a01b-a396114809f6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:redshift.amazonaws.com and event.action:CreateCluster and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential Network Scan Detected", - "description": "This rule identifies a potential port scan. A port scan is a method utilized by attackers to systematically scan a target system or network for open ports, allowing them to identify available services and potential vulnerabilities. By mapping out the open ports, attackers can gather critical information to plan and execute targeted attacks, gaining unauthorized access, compromising security, and potentially leading to data breaches, unauthorized control, or further exploitation of the targeted system or network. This rule proposes threshold logic to check for connection attempts from one source host to 20 or more destination ports.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Network", - "Tactic: Discovery", - "Tactic: Reconnaissance", - "Use Case: Network Security Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 5, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1046", - "name": "Network Service Discovery", - "reference": "https://attack.mitre.org/techniques/T1046/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0043", - "name": "Reconnaissance", - "reference": "https://attack.mitre.org/tactics/TA0043/" - }, - "technique": [ - { - "id": "T1595", - "name": "Active Scanning", - "reference": "https://attack.mitre.org/techniques/T1595/", - "subtechnique": [ - { - "id": "T1595.001", - "name": "Scanning IP Blocks", - "reference": "https://attack.mitre.org/techniques/T1595/001/" - } - ] - } - ] - } - ], - "id": "d5bb9994-9843-43f2-910e-37ac457fb8c7", - "rule_id": "0171f283-ade7-4f87-9521-ac346c68cc9b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "destination.port : * and event.action : \"network_flow\" and source.ip : (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n", - "threshold": { - "field": [ - "destination.ip", - "source.ip" - ], - "value": 1, - "cardinality": [ - { - "field": "destination.port", - "value": 250 - } - ] - }, - "index": [ - "logs-endpoint.events.network-*", - "logs-network_traffic.*", - "packetbeat-*", - "filebeat-*", - "auditbeat-*" - ], - "language": "kuery" - }, - { - "name": "Potential Credential Access via DuplicateHandle in LSASS", - "description": "Identifies suspicious access to an LSASS handle via DuplicateHandle from an unknown call trace module. This may indicate an attempt to bypass the NtOpenProcess API to evade detection and dump LSASS memory for credential access.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 206, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/CCob/MirrorDump" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "b853cc99-ba41-4990-86fe-3763b94a0c0c", - "rule_id": "02a4576a-7480-4284-9327-548a806b5e48", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.CallTrace", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.GrantedAccess", - "type": "keyword", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.code == \"10\" and\n\n /* LSASS requesting DuplicateHandle access right to another process */\n process.name : \"lsass.exe\" and winlog.event_data.GrantedAccess == \"0x40\" and\n\n /* call is coming from an unknown executable region */\n winlog.event_data.CallTrace : \"*UNKNOWN*\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Modification of OpenSSH Binaries", - "description": "Adversaries may modify SSH related binaries for persistence or credential access by patching sensitive functions to enable unauthorized access or by logging SSH credentials for exfiltration.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Persistence", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trusted OpenSSH executable updates. It's recommended to verify the integrity of OpenSSH binary changes." - ], - "references": [ - "https://blog.angelalonso.es/2016/09/anatomy-of-real-linux-intrusion-part-ii.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1556", - "name": "Modify Authentication Process", - "reference": "https://attack.mitre.org/techniques/T1556/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.004", - "name": "SSH", - "reference": "https://attack.mitre.org/techniques/T1021/004/" - } - ] - }, - { - "id": "T1563", - "name": "Remote Service Session Hijacking", - "reference": "https://attack.mitre.org/techniques/T1563/", - "subtechnique": [ - { - "id": "T1563.001", - "name": "SSH Hijacking", - "reference": "https://attack.mitre.org/techniques/T1563/001/" - } - ] - } - ] - } - ], - "id": "3289f22a-a614-42e6-9657-51bce6600285", - "rule_id": "0415f22a-2336-45fa-ba07-618a5942e22c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ], - "query": "event.category:file and host.os.type:linux and event.type:change and \n process.name:(* and not (dnf or dnf-automatic or dpkg or yum or rpm or yum-cron or anacron)) and \n (file.path:(/usr/bin/scp or \n /usr/bin/sftp or \n /usr/bin/ssh or \n /usr/sbin/sshd) or \n file.name:libkeyutils.so) and\n not process.executable:/usr/share/elasticsearch/*\n", - "language": "kuery" - }, - { - "name": "Potential DLL Side-Loading via Microsoft Antimalware Service Executable", - "description": "Identifies a Windows trusted program that is known to be vulnerable to DLL Search Order Hijacking starting after being renamed or from a non-standard path. This is uncommon behavior and may indicate an attempt to evade defenses via side-loading a malicious DLL within the memory space of one of those processes.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Dennis Perto" - ], - "false_positives": [ - "Microsoft Antimalware Service Executable installed on non default installation path." - ], - "references": [ - "https://news.sophos.com/en-us/2021/07/04/independence-day-revil-uses-supply-chain-exploit-to-attack-hundreds-of-businesses/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.002", - "name": "DLL Side-Loading", - "reference": "https://attack.mitre.org/techniques/T1574/002/" - } - ] - } - ] - } - ], - "id": "e1ea400d-63cf-4dd9-93b9-216343491c1d", - "rule_id": "053a0387-f3b5-4ba5-8245-8002cca2bd08", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (process.pe.original_file_name == \"MsMpEng.exe\" and not process.name : \"MsMpEng.exe\") or\n (process.name : \"MsMpEng.exe\" and not\n process.executable : (\"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Program Files\\\\Microsoft Security Client\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Security Client\\\\*.exe\"))\n)\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Conhost Spawned By Suspicious Parent Process", - "description": "Detects when the Console Window Host (conhost.exe) process is spawned by a suspicious parent process, which could be indicative of code injection.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Conhost Spawned By Suspicious Parent Process\n\nThe Windows Console Host, or `conhost.exe`, is both the server application for all of the Windows Console APIs as well as the classic Windows user interface for working with command-line applications.\n\nAttackers often rely on custom shell implementations to avoid using built-in command interpreters like `cmd.exe` and `PowerShell.exe` and bypass application allowlisting and security features. Attackers commonly inject these implementations into legitimate system processes.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Retrieve the parent process executable and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- Suspicious Process from Conhost - 28896382-7d4f-4d50-9b72-67091901fd26\n- Suspicious PowerShell Engine ImageLoad - 852c1f19-68e8-43a6-9dce-340771fe1be3\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Defense Evasion", - "Tactic: Privilege Escalation", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.fireeye.com/blog/threat-research/2017/08/monitoring-windows-console-activity-part-one.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - } - ], - "id": "9dcb59e5-41a3-46a5-ad15-58af3af4794b", - "rule_id": "05b358de-aa6d-4f6c-89e6-78f74018b43b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"conhost.exe\" and\n process.parent.name : (\"lsass.exe\", \"services.exe\", \"smss.exe\", \"winlogon.exe\", \"explorer.exe\", \"dllhost.exe\", \"rundll32.exe\",\n \"regsvr32.exe\", \"userinit.exe\", \"wininit.exe\", \"spoolsv.exe\", \"ctfmon.exe\") and\n not (process.parent.name : \"rundll32.exe\" and\n process.parent.args : (\"?:\\\\Windows\\\\Installer\\\\MSI*.tmp,zzzzInvokeManagedCustomActionOutOfProc\",\n \"?:\\\\WINDOWS\\\\system32\\\\PcaSvc.dll,PcaPatchSdbTask\",\n \"?:\\\\WINDOWS\\\\system32\\\\davclnt.dll,DavSetCookie\"))\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Interactive Terminal Spawned via Perl", - "description": "Identifies when a terminal (tty) is spawned via Perl. Attackers may upgrade a simple reverse shell to a fully interactive tty after obtaining initial access to a host.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "83d1ddb5-688b-4b85-83f3-b990f714f8e4", - "rule_id": "05e5a668-7b51-4a67-93ab-e9af405c9ef3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ], - "query": "event.category:process and host.os.type:linux and event.type:(start or process_started) and process.name:perl and\n process.args:(\"exec \\\"/bin/sh\\\";\" or \"exec \\\"/bin/dash\\\";\" or \"exec \\\"/bin/bash\\\";\")\n", - "language": "kuery" - }, - { - "name": "System Time Discovery", - "description": "Detects the usage of commonly used system time discovery techniques, which attackers may use during the reconnaissance phase after compromising a system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend", - "Data Source: Elastic Endgame", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1124", - "name": "System Time Discovery", - "reference": "https://attack.mitre.org/techniques/T1124/" - } - ] - } - ], - "id": "7eb9b41c-6665-42d3-abad-1eaf52c9685c", - "rule_id": "06568a02-af29-4f20-929c-f3af281e41aa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n ((process.name: \"net.exe\" or (process.name : \"net1.exe\" and not process.parent.name : \"net.exe\")) and \n process.args : \"time\") or \n (process.name: \"w32tm.exe\" and process.args: \"/tz\") or \n (process.name: \"tzutil.exe\" and process.args: \"/g\")\n) and not user.id : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Enumerating Domain Trusts via DSQUERY.EXE", - "description": "Identifies the use of dsquery.exe for domain trust discovery purposes. Adversaries may use this command-line utility to enumerate trust relationships that may be used for Lateral Movement opportunities in Windows multi-domain forest environments.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Enumerating Domain Trusts via DSQUERY.EXE\n\nActive Directory (AD) domain trusts define relationships between domains within a Windows AD environment. In this setup, a \"trusting\" domain permits users from a \"trusted\" domain to access resources. These trust relationships can be configurable as one-way, two-way, transitive, or non-transitive, enabling controlled access and resource sharing across domains.\n\nThis rule identifies the usage of the `dsquery.exe` utility to enumerate domain trusts. Attackers can use this information to enable the next actions in a target environment, such as lateral movement.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation and are done within the user business context (e.g., an administrator in this context). As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Related rules\n\n- Enumerating Domain Trusts via NLTEST.EXE - 84da2554-e12a-11ec-b896-f661ea17fbcd\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Domain administrators may use this command-line utility for legitimate information gathering purposes." - ], - "references": [ - "https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc732952(v=ws.11)", - "https://posts.specterops.io/a-guide-to-attacking-domain-trusts-971e52cb2944" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1482", - "name": "Domain Trust Discovery", - "reference": "https://attack.mitre.org/techniques/T1482/" - }, - { - "id": "T1018", - "name": "Remote System Discovery", - "reference": "https://attack.mitre.org/techniques/T1018/" - } - ] - } - ], - "id": "462e6a72-b1cf-4804-9056-a4f49bb60b8d", - "rule_id": "06a7a03c-c735-47a6-a313-51c354aef6c3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"dsquery.exe\" or process.pe.original_file_name: \"dsquery.exe\") and \n process.args : \"*objectClass=trustedDomain*\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Evasion via Filter Manager", - "description": "The Filter Manager Control Program (fltMC.exe) binary may be abused by adversaries to unload a filter driver and evade defenses.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Evasion via Filter Manager\n\nA file system filter driver, or minifilter, is a specialized type of filter driver designed to intercept and modify I/O requests sent to a file system or another filter driver. Minifilters are used by a wide range of security software, including EDR, antivirus, backup agents, encryption products, etc.\n\nAttackers may try to unload minifilters to avoid protections such as malware detection, file system monitoring, and behavior-based detections.\n\nThis rule identifies the attempt to unload a minifilter using the `fltmc.exe` command-line utility, a tool used to manage and query the filter drivers loaded on Windows systems.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Examine the command line event to identify the target driver.\n - Identify the minifilter's role in the environment and if it is security-related. Microsoft provides a [list](https://learn.microsoft.com/en-us/windows-hardware/drivers/ifs/allocated-altitudes) of allocated altitudes that may provide more context, such as the manufacturer.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Observe and collect information about the following activities in the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and there are justifications for the action.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "d79f18b2-62e4-42a4-b518-91216979c476", - "rule_id": "06dceabf-adca-48af-ac79-ffdf4c3b1e9a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"fltMC.exe\" and process.args : \"unload\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Proc Pseudo File System Enumeration", - "description": "This rule monitors for a rapid enumeration of 25 different proc cmd, stat, and exe files, which suggests an abnormal activity pattern. Such behavior could be an indicator of a malicious process scanning or gathering information about running processes, potentially for reconnaissance, privilege escalation, or identifying vulnerable targets.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Setup\nThis rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system. \n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from. \n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /proc/ -p r -k audit_proc\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", - "building_block_type": "default", - "version": 4, - "tags": [ - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1057", - "name": "Process Discovery", - "reference": "https://attack.mitre.org/techniques/T1057/" - }, - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "af14ae14-1492-49cd-9a13-3cfcdb6be14e", - "rule_id": "0787daa6-f8c5-453b-a4ec-048037f6c1cd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.pid", - "type": "long", - "ecs": true - } - ], - "setup": "This rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system.\n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /proc/ -p r -k audit_proc\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", - "type": "threshold", - "query": "host.os.type:linux and event.category:file and event.action:\"opened-file\" and \nfile.path : (/proc/*/cmdline or /proc/*/stat or /proc/*/exe) and not process.name : (\n ps or netstat or landscape-sysin or w or pgrep or pidof or needrestart or apparmor_status\n) and not process.parent.pid : 1\n", - "threshold": { - "field": [ - "host.id", - "process.pid", - "process.name" - ], - "value": 1, - "cardinality": [ - { - "field": "file.path", - "value": 100 - } - ] - }, - "index": [ - "auditbeat-*", - "logs-auditd_manager.auditd-*" - ], - "language": "kuery" - }, - { - "name": "Local Account TokenFilter Policy Disabled", - "description": "Identifies registry modification to the LocalAccountTokenFilterPolicy policy. If this value exists (which doesn't by default) and is set to 1, then remote connections from all local members of Administrators are granted full high-integrity tokens during negotiation.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.stigviewer.com/stig/windows_server_2008_r2_member_server/2014-04-02/finding/V-36439", - "https://posts.specterops.io/pass-the-hash-is-dead-long-live-localaccounttokenfilterpolicy-506c25a7c167", - "https://www.welivesecurity.com/wp-content/uploads/2018/01/ESET_Turla_Mosquito.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - }, - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1550", - "name": "Use Alternate Authentication Material", - "reference": "https://attack.mitre.org/techniques/T1550/", - "subtechnique": [ - { - "id": "T1550.002", - "name": "Pass the Hash", - "reference": "https://attack.mitre.org/techniques/T1550/002/" - } - ] - } - ] - } - ], - "id": "736b7cc3-30d5-45b8-ac57-ad5b30504c99", - "rule_id": "07b1ef73-1fde-4a49-a34a-5dd40011b076", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\*\\\\LocalAccountTokenFilterPolicy\",\n \"\\\\REGISTRY\\\\MACHINE\\\\*\\\\LocalAccountTokenFilterPolicy\") and\n registry.data.strings : (\"1\", \"0x00000001\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Anomalous Windows Process Creation", - "description": "Identifies unusual parent-child process relationships that can indicate malware execution or persistence mechanisms. Malicious scripts often call on other applications and processes as part of their exploit payload. For example, when a malicious Office document runs scripts as part of an exploit payload, Excel or Word may start a script interpreter process, which, in turn, runs a script that downloads and executes malware. Another common scenario is Outlook running an unusual process when malware is downloaded in an email. Monitoring and identifying anomalous process relationships is a method of detecting new and emerging malware that is not yet recognized by anti-virus scanners.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Anomalous Windows Process Creation\n\nSearching for abnormal Windows processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.\n\nThis rule uses a machine learning job to detect an anomalous Windows process with an unusual parent-child relationship, which could indicate malware execution or persistence activities on the host machine.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.\n - Investigate the process metadata — such as the digital signature, directory, etc. — to obtain more context that can indicate whether the executable is associated with an expected software vendor or package.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.\n- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Retrieve Service Unisgned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Related Rules\n\n- Unusual Process For a Windows Host - 6d448b96-c922-4adb-b51c-b767f1ea5b76\n- Unusual Windows Path Activity - 445a342e-03fb-42d0-8656-0367eb2dead5\n- Unusual Windows Process Calling the Metadata Service - abae61a8-c560-4dbd-acca-1e1438bff36b\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Users running scripts in the course of technical support operations of software upgrades could trigger this alert. A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/" - } - ] - } - ], - "id": "9d8e27a9-bfce-4cda-a3c2-43e5f398234b", - "rule_id": "0b29cab4-dbbd-4a3f-9e8e-1287c7c11ae5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_windows_anomalous_process_creation" - ] - }, - { - "name": "Nping Process Activity", - "description": "Nping ran on a Linux host. Nping is part of the Nmap tool suite and has the ability to construct raw packets for a wide variety of security testing applications, including denial of service testing.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Some normal use of this command may originate from security engineers and network or server administrators, but this is usually not routine or unannounced. Use of `Nping` by non-engineers or ordinary users is uncommon." - ], - "references": [ - "https://en.wikipedia.org/wiki/Nmap" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1046", - "name": "Network Service Discovery", - "reference": "https://attack.mitre.org/techniques/T1046/" - } - ] - } - ], - "id": "4a319643-a92a-4089-98c5-a692d7099449", - "rule_id": "0d69150b-96f8-467c-a86d-a67a3378ce77", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and process.name == \"nping\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Execution of File Written or Modified by Microsoft Office", - "description": "Identifies an executable created by a Microsoft Office application and subsequently executed. These processes are often launched via scripts inside documents or during exploitation of Microsoft Office applications.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Execution of File Written or Modified by Microsoft Office\n\nMicrosoft Office is a suite of applications designed to help with productivity and completing common tasks on a computer. You can create and edit documents containing text and images, work with data in spreadsheets and databases, and create presentations and posters. As it is some of the most-used software across companies, MS Office is frequently targeted for initial access. It also has a wide variety of capabilities that attackers can take advantage of.\n\nThis rule searches for executable files written by MS Office applications executed in sequence. This is most likely the result of the execution of malicious documents or exploitation for initial access or privilege escalation. This rule can also detect suspicious processes masquerading as the MS Office applications.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve MS Office documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-120m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - }, - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - } - ], - "id": "313ce46c-5f84-4db8-9660-bcf2d25fa9fb", - "rule_id": "0d8ad79f-9025-45d8-80c1-4f0cd3c5e8e5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=2h\n [file where host.os.type == \"windows\" and event.type != \"deletion\" and file.extension : \"exe\" and\n (process.name : \"WINWORD.EXE\" or\n process.name : \"EXCEL.EXE\" or\n process.name : \"OUTLOOK.EXE\" or\n process.name : \"POWERPNT.EXE\" or\n process.name : \"eqnedt32.exe\" or\n process.name : \"fltldr.exe\" or\n process.name : \"MSPUB.EXE\" or\n process.name : \"MSACCESS.EXE\")\n ] by host.id, file.path\n [process where host.os.type == \"windows\" and event.type == \"start\" and \n not (process.name : \"NewOutlookInstaller.exe\" and process.code_signature.subject_name : \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ] by host.id, process.executable\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "MsBuild Making Network Connections", - "description": "Identifies MsBuild.exe making outbound network connections. This may indicate adversarial activity as MsBuild is often leveraged by adversaries to execute code and evade detection.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating MsBuild Making Network Connections\n\nBy examining the specific traits of Windows binaries (such as process trees, command lines, network connections, registry modifications, and so on) it's possible to establish a baseline of normal activity. Deviations from this baseline can indicate malicious activity, such as masquerading and deserve further investigation.\n\nThe Microsoft Build Engine, also known as MSBuild, is a platform for building applications. This engine provides an XML schema for a project file that controls how the build platform processes and builds software, and can be abused to proxy code execution.\n\nThis rule looks for the `Msbuild.exe` utility execution, followed by a network connection to an external address. Attackers can abuse MsBuild to execute malicious files or masquerade as those utilities in order to bypass detections and evade defenses.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n - Investigate the file digital signature and process original filename, if suspicious, treat it as potential malware.\n- Investigate the target host that the signed binary is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of destination IP address and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/", - "subtechnique": [ - { - "id": "T1127.001", - "name": "MSBuild", - "reference": "https://attack.mitre.org/techniques/T1127/001/" - } - ] - } - ] - } - ], - "id": "543a7be3-a7cd-4cd4-bf67-e9f4cbeed98d", - "rule_id": "0e79980b-4250-4a50-a509-69294c14e84b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"MSBuild.exe\" and event.type == \"start\"]\n [network where host.os.type == \"windows\" and process.name : \"MSBuild.exe\" and\n not cidrmatch(destination.ip, \"127.0.0.1\", \"::1\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Potential LSASS Memory Dump via PssCaptureSnapShot", - "description": "Identifies suspicious access to an LSASS handle via PssCaptureSnapShot where two successive process accesses are performed by the same process and target two different instances of LSASS. This may indicate an attempt to evade detection and dump LSASS memory for credential access.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 206, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.matteomalvica.com/blog/2019/12/02/win-defender-atp-cred-bypass/", - "https://twitter.com/sbousseaden/status/1280619931516747777?lang=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "d418e099-15b4-4b51-bbd6-d9e60d6d3eed", - "rule_id": "0f93cb9a-1931-48c2-8cd0-f173fd3e5283", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.TargetImage", - "type": "keyword", - "ecs": false - } - ], - "setup": "This is meant to run only on datasources using Elastic Agent 7.14+ since versions prior to that will be missing the threshold\nrule cardinality feature.", - "type": "threshold", - "query": "event.category:process and host.os.type:windows and event.code:10 and\n winlog.event_data.TargetImage:(\"C:\\\\Windows\\\\system32\\\\lsass.exe\" or\n \"c:\\\\Windows\\\\system32\\\\lsass.exe\" or\n \"c:\\\\Windows\\\\System32\\\\lsass.exe\")\n", - "threshold": { - "field": [ - "process.entity_id" - ], - "value": 2, - "cardinality": [ - { - "field": "winlog.event_data.TargetProcessId", - "value": 2 - } - ] - }, - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "language": "kuery" - }, - { - "name": "AWS RDS Snapshot Export", - "description": "Identifies the export of an Amazon Relational Database Service (RDS) Aurora database snapshot.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Exporting snapshots may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Snapshot exports from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_StartExportTask.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [] - } - ], - "id": "7848be55-3bb3-4db2-920b-d1260908f250", - "rule_id": "119c8877-8613-416d-a98a-96b6664ee73a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:StartExportTask and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "AWS Route 53 Domain Transfer Lock Disabled", - "description": "Identifies when a transfer lock was removed from a Route 53 domain. It is recommended to refrain from performing this action unless intending to transfer the domain to a different registrar.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "A domain transfer lock may be disabled by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Activity from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/Route53/latest/APIReference/API_Operations_Amazon_Route_53.html", - "https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_DisableDomainTransferLock.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [] - } - ], - "id": "ee2bb706-2f3b-4c81-a26f-bf4911a14ec3", - "rule_id": "12051077-0124-4394-9522-8f4f4db1d674", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:route53.amazonaws.com and event.action:DisableDomainTransferLock and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Suspicious Lsass Process Access", - "description": "Identifies access attempts to LSASS handle, this may indicate an attempt to dump credentials from Lsass memory.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Setup", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.001/T1003.001.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "a162221f-7589-4b50-9ca1-b64b27753825", - "rule_id": "128468bf-cab1-4637-99ea-fdf3780a4609", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.CallTrace", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.GrantedAccess", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetImage", - "type": "keyword", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.code == \"10\" and\n winlog.event_data.TargetImage : \"?:\\\\WINDOWS\\\\system32\\\\lsass.exe\" and\n not winlog.event_data.GrantedAccess :\n (\"0x1000\", \"0x1400\", \"0x101400\", \"0x101000\", \"0x101001\", \"0x100000\", \"0x100040\", \"0x3200\", \"0x40\", \"0x3200\") and\n not process.name : (\"procexp64.exe\", \"procmon.exe\", \"procexp.exe\", \"Microsoft.Identity.AadConnect.Health.AadSync.Host.ex\") and\n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\lsm.exe\",\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\CCM\\\\CcmExec.exe\",\n \"?:\\\\Windows\\\\system32\\\\csrss.exe\",\n \"?:\\\\Windows\\\\system32\\\\wininit.exe\",\n \"?:\\\\Windows\\\\system32\\\\wbem\\\\wmiprvse.exe\",\n \"?:\\\\Windows\\\\system32\\\\MRT.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\platform\\\\*\",\n \"?:\\\\ProgramData\\\\WebEx\\\\webex\\\\*\",\n \"?:\\\\Windows\\\\LTSvc\\\\LTSVC.exe\") and\n not winlog.event_data.CallTrace : (\"*mpengine.dll*\", \"*appresolver.dll*\", \"*sysmain.dll*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Suspicious Cmd Execution via WMI", - "description": "Identifies suspicious command execution (cmd) via Windows Management Instrumentation (WMI) on a remote host. This could be indicative of adversary lateral movement.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - }, - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - } - ], - "id": "c88de52c-ef4c-4f69-9036-d1545bf3d28e", - "rule_id": "12f07955-1674-44f7-86b5-c35da0a6f41a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"WmiPrvSE.exe\" and process.name : \"cmd.exe\" and\n process.args : \"\\\\\\\\127.0.0.1\\\\*\" and process.args : (\"2>&1\", \"1>\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "RPC (Remote Procedure Call) from the Internet", - "description": "This rule detects network events that may indicate the use of RPC traffic from the Internet. RPC is commonly used by system administrators to remotely control a system for maintenance or to use shared resources. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Tactic: Initial Access", - "Domain: Endpoint", - "Use Case: Threat Detection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - } - ], - "id": "c9cfe092-223b-43e9-967c-2ee0271a7d12", - "rule_id": "143cb236-0956-4f42-a706-814bcaa0cf5a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and (destination.port:135 or event.dataset:zeek.dce_rpc) and\n not source.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n ) and\n destination.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n )\n", - "language": "kuery" - }, - { - "name": "Potential Persistence via Time Provider Modification", - "description": "Identifies modification of the Time Provider. Adversaries may establish persistence by registering and enabling a malicious DLL as a time provider. Windows uses the time provider architecture to obtain accurate time stamps from other network devices or clients in the network. Time providers are implemented in the form of a DLL file which resides in the System32 folder. The service W32Time initiates during the startup of Windows and loads w32time.dll.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://pentestlab.blog/2019/10/22/persistence-time-providers/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.003", - "name": "Time Providers", - "reference": "https://attack.mitre.org/techniques/T1547/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.003", - "name": "Time Providers", - "reference": "https://attack.mitre.org/techniques/T1547/003/" - } - ] - } - ] - } - ], - "id": "2343cbee-b044-4c85-85bf-e504fdd54557", - "rule_id": "14ed1aa9-ebfd-4cf9-a463-0ac59ec55204", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type:\"change\" and\n registry.path: (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\W32Time\\\\TimeProviders\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\W32Time\\\\TimeProviders\\\\*\"\n ) and\n registry.data.strings:\"*.dll\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Scheduled Task Execution at Scale via GPO", - "description": "Detects the modification of Group Policy Object attributes to execute a scheduled task in the objects controlled by the GPO.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Scheduled Task Execution at Scale via GPO\n\nGroup Policy Objects (GPOs) can be used by attackers to execute scheduled tasks at scale to compromise objects controlled by a given GPO. This is done by changing the contents of the `\\Machine\\Preferences\\ScheduledTasks\\ScheduledTasks.xml` file.\n\n#### Possible investigation steps\n\n- This attack abuses a legitimate mechanism of Active Directory, so it is important to determine whether the activity is legitimate and the administrator is authorized to perform this operation.\n- Retrieve the contents of the `ScheduledTasks.xml` file, and check the `` and `` XML tags for any potentially malicious commands or binaries.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Scope which objects may be compromised by retrieving information about which objects are controlled by the GPO.\n\n### False positive analysis\n\n- Verify if the execution is allowed and done under change management, and if the execution is legitimate.\n\n### Related rules\n\n- Group Policy Abuse for Privilege Addition - b9554892-5e0e-424b-83a0-5aef95aa43bf\n- Startup/Logon Script added to Group Policy Object - 16fac1a1-21ee-4ca6-b720-458e3855d046\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- The investigation and containment must be performed in every computer controlled by the GPO, where necessary.\n- Remove the script from the GPO.\n- Check if other GPOs have suspicious scheduled tasks attached.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Lateral Movement", - "Data Source: Active Directory", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0025_windows_audit_directory_service_changes.md", - "https://github.com/atc-project/atc-data/blob/f2bbb51ecf68e2c9f488e3c70dcdd3df51d2a46b/docs/Logging_Policies/LP_0029_windows_audit_detailed_file_share.md", - "https://labs.f-secure.com/tools/sharpgpoabuse", - "https://twitter.com/menasec1/status/1106899890377052160", - "https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_gpo_scheduledtasks.yml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - }, - { - "id": "T1484", - "name": "Domain Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1484/", - "subtechnique": [ - { - "id": "T1484.001", - "name": "Group Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1484/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1570", - "name": "Lateral Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1570/" - } - ] - } - ], - "id": "d1f3516b-1399-4f2a-847c-279105dbf87a", - "rule_id": "15a8ba77-1c13-4274-88fe-6bd14133861e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "message", - "type": "match_only_text", - "ecs": true - }, - { - "name": "winlog.event_data.AccessList", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.AttributeLDAPDisplayName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.AttributeValue", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.RelativeTargetName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.ShareName", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'Audit Detailed File Share' audit policy must be configured (Success Failure).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nObject Access >\nAudit Detailed File Share (Success,Failure)\n```\n\nThe 'Audit Directory Service Changes' audit policy must be configured (Success Failure).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "(event.code: \"5136\" and winlog.event_data.AttributeLDAPDisplayName:(\"gPCMachineExtensionNames\" or \"gPCUserExtensionNames\") and\n winlog.event_data.AttributeValue:(*CAB54552-DEEA-4691-817E-ED4A4D1AFC72* and *AADCED64-746C-4633-A97C-D61349046527*))\nor\n(event.code: \"5145\" and winlog.event_data.ShareName: \"\\\\\\\\*\\\\SYSVOL\" and winlog.event_data.RelativeTargetName: *ScheduledTasks.xml and\n (message: WriteData or winlog.event_data.AccessList: *%%4417*))\n", - "language": "kuery" - }, - { - "name": "Remote File Download via Desktopimgdownldr Utility", - "description": "Identifies the desktopimgdownldr utility being used to download a remote file. An adversary may use desktopimgdownldr to download arbitrary files as an alternative to certutil.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remote File Download via Desktopimgdownldr Utility\n\nAttackers commonly transfer tooling or malware from external systems into a compromised environment using the command and control channel. However, they can also abuse signed utilities to drop these files.\n\nThe `Desktopimgdownldr.exe` utility is used to to configure lockscreen/desktop image, and can be abused with the `lockscreenurl` argument to download remote files and tools, this rule looks for this behavior.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Check the reputation of the domain or IP address used to host the downloaded file or if the user downloaded the file from an internal system.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unusual but can be done by administrators. Benign true positives (B-TPs) can be added as exceptions if necessary.\n- Analysts can dismiss the alert if the downloaded file is a legitimate image.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://labs.sentinelone.com/living-off-windows-land-a-new-native-file-downldr/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - } - ], - "id": "ac92c806-dcb3-483f-94d1-55f4afc47177", - "rule_id": "15c0b7a7-9c34-4869-b25b-fa6518414899", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"desktopimgdownldr.exe\" or process.pe.original_file_name == \"desktopimgdownldr.exe\") and\n process.args : \"/lockscreenurl:http*\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS IAM Group Creation", - "description": "Identifies the creation of a group in AWS Identity and Access Management (IAM). Groups specify permissions for multiple users. Any user in a group automatically has the permissions that are assigned to the group.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Group creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/create-group.html", - "https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateGroup.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/", - "subtechnique": [ - { - "id": "T1136.003", - "name": "Cloud Account", - "reference": "https://attack.mitre.org/techniques/T1136/003/" - } - ] - } - ] - } - ], - "id": "5f985014-9eaf-432e-a598-93a3ed349919", - "rule_id": "169f3a93-efc7-4df2-94d6-0d9438c310d1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:CreateGroup and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Renamed Utility Executed with Short Program Name", - "description": "Identifies the execution of a process with a single character process name, differing from the original file name. This is often done by adversaries while staging, executing temporary utilities, or trying to bypass security detections based on the process name.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Renamed Utility Executed with Short Program Name\n\nIdentifies the execution of a process with a single character process name, differing from the original file name. This is often done by adversaries while staging, executing temporary utilities, or trying to bypass security detections based on the process name.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, command line and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.003", - "name": "Rename System Utilities", - "reference": "https://attack.mitre.org/techniques/T1036/003/" - } - ] - } - ] - } - ], - "id": "445d780e-49e4-4186-92f3-48c813a75ce4", - "rule_id": "17c7f6a5-5bc9-4e1f-92bf-13632d24384d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and length(process.name) > 0 and\n length(process.name) == 5 and length(process.pe.original_file_name) > 5\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS CloudTrail Log Suspended", - "description": "Identifies suspending the recording of AWS API calls and log file delivery for the specified trail. An adversary may suspend trails in an attempt to evade defenses.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS CloudTrail Log Suspended\n\nAmazon CloudTrail is a service that enables governance, compliance, operational auditing, and risk auditing of your Amazon Web Services account. With CloudTrail, you can log, continuously monitor, and retain account activity related to actions across your Amazon Web Services infrastructure. CloudTrail provides event history of your Amazon Web Services account activity, including actions taken through the Amazon Management Console, Amazon SDKs, command line tools, and other Amazon Web Services services. This event history simplifies security analysis, resource change tracking, and troubleshooting.\n\nThis rule identifies the suspension of an AWS log trail using the API `StopLogging` action. Attackers can do this to cover their tracks and impact security monitoring that relies on this source.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Investigate the deleted log trail's criticality and whether the responsible team is aware of the deletion.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Log Auditing", - "Resources: Investigation Guide", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Suspending the recording of a trail may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Trail suspensions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_StopLogging.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/stop-logging.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "29799629-08cc-4c05-99cd-16f38adddf5f", - "rule_id": "1aa8fa52-44a7-4dae-b058-f3333b91c8d7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:StopLogging and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Connection to Internal Network via Telnet", - "description": "Telnet provides a command line interface for communication with a remote device or server. This rule identifies Telnet network connections to non-publicly routable IP addresses.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Telnet can be used for both benign or malicious purposes. Telnet is included by default in some Linux distributions, so its presence is not inherently suspicious. The use of Telnet to manage devices remotely has declined in recent years in favor of more secure protocols such as SSH. Telnet usage by non-automated tools or frameworks may be suspicious." - ], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - } - ], - "id": "2f7b550c-d85a-4c55-9cf5-165673e3d47b", - "rule_id": "1b21abcc-4d9f-4b08-a7f5-316f5f94b973", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"linux\" and process.name == \"telnet\" and event.type == \"start\"]\n [network where host.os.type == \"linux\" and process.name == \"telnet\" and\n cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\",\n \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\",\n \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "AWS ElastiCache Security Group Modified or Deleted", - "description": "Identifies when an ElastiCache security group has been modified or deleted.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "A ElastiCache security group deletion may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security Group deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/Welcome.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "54b7d487-ca03-42bb-8746-4a4f41d15dd8", - "rule_id": "1ba5160d-f5a2-4624-b0ff-6a1dc55d2516", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:elasticache.amazonaws.com and event.action:(\"Delete Cache Security Group\" or\n\"Authorize Cache Security Group Ingress\" or \"Revoke Cache Security Group Ingress\" or \"AuthorizeCacheSecurityGroupEgress\" or\n\"RevokeCacheSecurityGroupEgress\") and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Incoming Execution via WinRM Remote Shell", - "description": "Identifies remote execution via Windows Remote Management (WinRM) remote shell on a target host. This could be an indication of lateral movement.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "WinRM is a dual-use protocol that can be used for benign or malicious activity. It's important to baseline your environment to determine the amount of noise to expect from this tool." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.006", - "name": "Windows Remote Management", - "reference": "https://attack.mitre.org/techniques/T1021/006/" - } - ] - } - ] - } - ], - "id": "0341afc4-892d-4d40-bb5b-da696dd5a1de", - "rule_id": "1cd01db9-be24-4bef-8e7c-e923f0ff78ab", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=30s\n [network where host.os.type == \"windows\" and process.pid == 4 and network.direction : (\"incoming\", \"ingress\") and\n destination.port in (5985, 5986) and network.protocol == \"http\" and source.ip != \"127.0.0.1\" and source.ip != \"::1\"]\n [process where host.os.type == \"windows\" and \n event.type == \"start\" and process.parent.name : \"winrshost.exe\" and not process.executable : \"?:\\\\Windows\\\\System32\\\\conhost.exe\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "External IP Lookup from Non-Browser Process", - "description": "Identifies domains commonly used by adversaries for post-exploitation IP lookups. It is common for adversaries to test for Internet access and acquire their external IP address after they have gained access to a system. Among others, this has been observed in campaigns leveraging the information stealer, Trickbot.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating External IP Lookup from Non-Browser Process\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for connections to known IP lookup services through non-browser processes or non-installed programs. Using only the IP address of the compromised system, attackers can obtain valuable information such as the system's geographic location, the company that owns the IP, whether the system is cloud-hosted, and more.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Use the data collected through the analysis to investigate other machines affected in the environment.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "building_block_type": "default", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Resources: Investigation Guide", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "If the domains listed in this rule are used as part of an authorized workflow, this rule will be triggered by those events. Validate that this is expected activity and tune the rule to fit your environment variables." - ], - "references": [ - "https://community.jisc.ac.uk/blogs/csirt/article/trickbot-analysis-and-mitigation", - "https://www.cybereason.com/blog/dropping-anchor-from-a-trickbot-infection-to-the-discovery-of-the-anchor-malware" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1016", - "name": "System Network Configuration Discovery", - "reference": "https://attack.mitre.org/techniques/T1016/", - "subtechnique": [ - { - "id": "T1016.001", - "name": "Internet Connection Discovery", - "reference": "https://attack.mitre.org/techniques/T1016/001/" - } - ] - }, - { - "id": "T1614", - "name": "System Location Discovery", - "reference": "https://attack.mitre.org/techniques/T1614/" - } - ] - } - ], - "id": "2fb10292-a5f9-4ca0-9be3-b3ddecb0fa99", - "rule_id": "1d72d014-e2ab-4707-b056-9b96abe7b511", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dns.question.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "network where host.os.type == \"windows\" and network.protocol == \"dns\" and\n process.name != null and user.id not in (\"S-1-5-19\", \"S-1-5-20\") and\n event.action == \"lookup_requested\" and\n /* Add new external IP lookup services here */\n dns.question.name :\n (\n \"*api.ipify.org\",\n \"*freegeoip.app\",\n \"*checkip.amazonaws.com\",\n \"*checkip.dyndns.org\",\n \"*freegeoip.app\",\n \"*icanhazip.com\",\n \"*ifconfig.*\",\n \"*ipecho.net\",\n \"*ipgeoapi.com\",\n \"*ipinfo.io\",\n \"*ip.anysrc.net\",\n \"*myexternalip.com\",\n \"*myipaddress.com\",\n \"*showipaddress.com\",\n \"*whatismyipaddress.com\",\n \"*wtfismyip.com\",\n \"*ipapi.co\",\n \"*ip-lookup.net\",\n \"*ipstack.com\"\n ) and\n /* Insert noisy false positives here */\n not process.executable :\n (\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\WWAHost.exe\",\n \"?:\\\\Windows\\\\System32\\\\smartscreen.exe\",\n \"?:\\\\Windows\\\\System32\\\\MicrosoftEdgeCP.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\*\\\\MsMpEng.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Programs\\\\Fiddler\\\\Fiddler.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\Code.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\OneDrive.exe\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "PowerShell Script with Encryption/Decryption Capabilities", - "description": "Identifies the use of Cmdlets and methods related to encryption/decryption of files in PowerShell scripts, which malware and offensive security tools can abuse to encrypt data or decrypt payloads to bypass security solutions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Script with Encryption/Decryption Capabilities\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks, making it available for use in various environments, creating an attractive way for attackers to execute code.\n\nPowerShell offers encryption and decryption functionalities that attackers can abuse for various purposes, such as concealing payloads, C2 communications, and encrypting data as part of ransomware operations.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n\n### False positive analysis\n\n- This is a dual-use mechanism, meaning its usage is not inherently malicious. Analysts can dismiss the alert if the script doesn't contain malicious functions or potential for abuse, no other suspicious activity was identified, and there are justifications for the execution.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: PowerShell Logs", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate PowerShell Scripts which makes use of encryption." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1027", - "name": "Obfuscated Files or Information", - "reference": "https://attack.mitre.org/techniques/T1027/" - }, - { - "id": "T1140", - "name": "Deobfuscate/Decode Files or Information", - "reference": "https://attack.mitre.org/techniques/T1140/" - } - ] - } - ], - "id": "218809ed-3c95-47fd-9513-b63e742bcb92", - "rule_id": "1d9aeb0b-9549-46f6-a32d-05e2a001b7fd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n (\n \"Cryptography.AESManaged\" or\n \"Cryptography.RijndaelManaged\" or\n \"Cryptography.SHA1Managed\" or\n \"Cryptography.SHA256Managed\" or\n \"Cryptography.SHA384Managed\" or\n \"Cryptography.SHA512Managed\" or\n \"Cryptography.SymmetricAlgorithm\" or\n \"PasswordDeriveBytes\" or\n \"Rfc2898DeriveBytes\"\n ) and\n (\n CipherMode and PaddingMode\n ) and\n (\n \".CreateEncryptor\" or\n \".CreateDecryptor\"\n )\n ) and not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "UAC Bypass via DiskCleanup Scheduled Task Hijack", - "description": "Identifies User Account Control (UAC) bypass via hijacking DiskCleanup Scheduled Task. Attackers bypass UAC to stealthily execute code with elevated permissions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "a356fa74-df16-4bab-99fd-2210cea096eb", - "rule_id": "1dcc51f6-ba26-49e7-9ef4-2655abb2361e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.args : \"/autoclean\" and process.args : \"/d\" and\n not process.executable : (\"C:\\\\Windows\\\\System32\\\\cleanmgr.exe\",\n \"C:\\\\Windows\\\\SysWOW64\\\\cleanmgr.exe\",\n \"C:\\\\Windows\\\\System32\\\\taskhostw.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious .NET Code Compilation", - "description": "Identifies executions of .NET compilers with suspicious parent processes, which can indicate an attacker's attempt to compile code after delivery in order to bypass security mechanisms.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1027", - "name": "Obfuscated Files or Information", - "reference": "https://attack.mitre.org/techniques/T1027/", - "subtechnique": [ - { - "id": "T1027.004", - "name": "Compile After Delivery", - "reference": "https://attack.mitre.org/techniques/T1027/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.005", - "name": "Visual Basic", - "reference": "https://attack.mitre.org/techniques/T1059/005/" - } - ] - } - ] - } - ], - "id": "2c6a2b52-1967-4e3e-8a53-06d39a80bf3f", - "rule_id": "201200f1-a99b-43fb-88ed-f65a45c4972c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"csc.exe\", \"vbc.exe\") and\n process.parent.name : (\"wscript.exe\", \"mshta.exe\", \"cscript.exe\", \"wmic.exe\", \"svchost.exe\", \"rundll32.exe\", \"cmstp.exe\", \"regsvr32.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS Route 53 Domain Transferred to Another Account", - "description": "Identifies when a request has been made to transfer a Route 53 domain to another AWS account.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "A domain may be transferred to another AWS account by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Domain transfers from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/Route53/latest/APIReference/API_Operations_Amazon_Route_53.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [] - } - ], - "id": "175cfaac-bcc7-48fb-8a29-01bcd5c69c8f", - "rule_id": "2045567e-b0af-444a-8c0b-0b6e2dae9e13", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:route53.amazonaws.com and event.action:TransferDomainToAnotherAwsAccount and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "LSASS Memory Dump Handle Access", - "description": "Identifies handle requests for the Local Security Authority Subsystem Service (LSASS) object access with specific access masks that many tools with a capability to dump memory to disk use (0x1fffff, 0x1010, 0x120089). This rule is tool agnostic as it has been validated against a host of various LSASS dump tools such as SharpDump, Procdump, Mimikatz, Comsvcs etc. It detects this behavior at a low level and does not depend on a specific tool or dump file name.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating LSASS Memory Dump Handle Access\n\nLocal Security Authority Server Service (LSASS) is a process in Microsoft Windows operating systems that is responsible for enforcing security policy on the system. It verifies users logging on to a Windows computer or server, handles password changes, and creates access tokens.\n\nAdversaries may attempt to access credential material stored in LSASS process memory. After a user logs on, the system generates and stores a variety of credential materials in LSASS process memory. This is meant to facilitate single sign-on (SSO) ensuring a user isn’t prompted each time resource access is requested. These credential materials can be harvested by an adversary using administrative user or SYSTEM privileges to conduct lateral movement using [alternate authentication material](https://attack.mitre.org/techniques/T1550/).\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- There should be very few or no false positives for this rule. If this activity is expected or noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n- If the process is related to antivirus or endpoint detection and response solutions, validate that it is installed on the correct path and signed with the company's valid digital signature.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Scope compromised credentials and disable the accounts.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nEnsure advanced audit policies for Windows are enabled, specifically:\nObject Access policies [Event ID 4656](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4656) (Handle to an Object was Requested)\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nSystem Audit Policies >\nObject Access >\nAudit File System (Success,Failure)\nAudit Handle Manipulation (Success,Failure)\n```\n\nAlso, this event generates only if the object’s [SACL](https://docs.microsoft.com/en-us/windows/win32/secauthz/access-control-lists) has the required access control entry (ACE) to handle the use of specific access rights.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4656", - "https://twitter.com/jsecurity101/status/1227987828534956033?s=20", - "https://attack.mitre.org/techniques/T1003/001/", - "https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-170105221010.html", - "http://findingbad.blogspot.com/2017/", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "d38196f1-9394-431b-84ce-6cfdf55411aa", - "rule_id": "208dbe77-01ed-4954-8d44-1e5751cb20de", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.AccessMask", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.AccessMaskDescription", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.ObjectName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.ProcessName", - "type": "keyword", - "ecs": false - } - ], - "setup": "Ensure advanced audit policies for Windows are enabled, specifically:\nObject Access policies Event ID 4656 (Handle to an Object was Requested)\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nSystem Audit Policies >\nObject Access >\nAudit File System (Success,Failure)\nAudit Handle Manipulation (Success,Failure)\n```\n\nAlso, this event generates only if the object’s SACL has the required access control entry (ACE) to handle the use of specific access rights.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "any where event.action == \"File System\" and event.code == \"4656\" and\n\n winlog.event_data.ObjectName : (\n \"?:\\\\Windows\\\\System32\\\\lsass.exe\",\n \"\\\\Device\\\\HarddiskVolume?\\\\Windows\\\\System32\\\\lsass.exe\",\n \"\\\\Device\\\\HarddiskVolume??\\\\Windows\\\\System32\\\\lsass.exe\") and\n\n /* The right to perform an operation controlled by an extended access right. */\n\n (winlog.event_data.AccessMask : (\"0x1fffff\" , \"0x1010\", \"0x120089\", \"0x1F3FFF\") or\n winlog.event_data.AccessMaskDescription : (\"READ_CONTROL\", \"Read from process memory\"))\n\n /* Common Noisy False Positives */\n\n and not winlog.event_data.ProcessName : (\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\system32\\\\wbem\\\\WmiPrvSE.exe\",\n \"?:\\\\Windows\\\\System32\\\\dllhost.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\*.exe\",\n \"?:\\\\Windows\\\\explorer.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "SSH Authorized Keys File Modification", - "description": "The Secure Shell (SSH) authorized_keys file specifies which users are allowed to log into a server using public key authentication. Adversaries may modify it to maintain persistence on a victim host by adding their own public key(s).", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 204, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/", - "subtechnique": [ - { - "id": "T1098.004", - "name": "SSH Authorized Keys", - "reference": "https://attack.mitre.org/techniques/T1098/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1563", - "name": "Remote Service Session Hijacking", - "reference": "https://attack.mitre.org/techniques/T1563/", - "subtechnique": [ - { - "id": "T1563.001", - "name": "SSH Hijacking", - "reference": "https://attack.mitre.org/techniques/T1563/001/" - } - ] - }, - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.004", - "name": "SSH", - "reference": "https://attack.mitre.org/techniques/T1021/004/" - } - ] - } - ] - } - ], - "id": "34002828-d58f-4f18-adf7-0c244a3a53b1", - "rule_id": "2215b8bd-1759-4ffa-8ab8-55c8e6b32e7f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "new_terms", - "query": "event.category:file and event.type:(change or creation) and\n file.name:(\"authorized_keys\" or \"authorized_keys2\" or \"/etc/ssh/sshd_config\" or \"/root/.ssh\") and\n not process.executable:\n (/Library/Developer/CommandLineTools/usr/bin/git or\n /usr/local/Cellar/maven/*/libexec/bin/mvn or\n /Library/Java/JavaVirtualMachines/jdk*.jdk/Contents/Home/bin/java or\n /usr/bin/vim or\n /usr/local/Cellar/coreutils/*/bin/gcat or\n /usr/bin/bsdtar or\n /usr/bin/nautilus or\n /usr/bin/scp or\n /usr/bin/touch or\n /var/lib/docker/* or\n /usr/bin/google_guest_agent or \n /opt/jc/bin/jumpcloud-agent)\n", - "new_terms_fields": [ - "host.id", - "process.executable", - "file.path" - ], - "history_window_start": "now-7d", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "SUNBURST Command and Control Activity", - "description": "The malware known as SUNBURST targets the SolarWind's Orion business software for command and control. This rule detects post-exploitation command and control activity of the SUNBURST backdoor.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating SUNBURST Command and Control Activity\n\nSUNBURST is a trojanized version of a digitally signed SolarWinds Orion plugin called SolarWinds.Orion.Core.BusinessLayer.dll. The plugin contains a backdoor that communicates via HTTP to third-party servers. After an initial dormant period of up to two weeks, SUNBURST may retrieve and execute commands that instruct the backdoor to transfer files, execute files, profile the system, reboot the system, and disable system services. The malware's network traffic attempts to blend in with legitimate SolarWinds activity by imitating the Orion Improvement Program (OIP) protocol, and the malware stores persistent state data within legitimate plugin configuration files. The backdoor uses multiple obfuscated blocklists to identify processes, services, and drivers associated with forensic and anti-virus tools.\n\nMore details on SUNBURST can be found on the [Mandiant Report](https://www.mandiant.com/resources/sunburst-additional-technical-details).\n\nThis rule identifies suspicious network connections that attempt to blend in with legitimate SolarWinds activity by imitating the Orion Improvement Program (OIP) protocol behavior.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the executable involved using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the environment at risk.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Reimage the host operating system and restore compromised files to clean versions.\n- Upgrade SolarWinds systems to the latest version to eradicate the chance of reinfection by abusing the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/", - "subtechnique": [ - { - "id": "T1071.001", - "name": "Web Protocols", - "reference": "https://attack.mitre.org/techniques/T1071/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1195", - "name": "Supply Chain Compromise", - "reference": "https://attack.mitre.org/techniques/T1195/", - "subtechnique": [ - { - "id": "T1195.002", - "name": "Compromise Software Supply Chain", - "reference": "https://attack.mitre.org/techniques/T1195/002/" - } - ] - } - ] - } - ], - "id": "1013700a-96d3-4ab2-aae5-0074f43c1ead", - "rule_id": "22599847-5d13-48cb-8872-5796fee8692b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "http.request.body.content", - "type": "wildcard", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "network where host.os.type == \"windows\" and event.type == \"protocol\" and network.protocol == \"http\" and\n process.name : (\"ConfigurationWizard.exe\",\n \"NetFlowService.exe\",\n \"NetflowDatabaseMaintenance.exe\",\n \"SolarWinds.Administration.exe\",\n \"SolarWinds.BusinessLayerHost.exe\",\n \"SolarWinds.BusinessLayerHostx64.exe\",\n \"SolarWinds.Collector.Service.exe\",\n \"SolarwindsDiagnostics.exe\") and\n (\n (\n (http.request.body.content : \"*/swip/Upload.ashx*\" and http.request.body.content : (\"POST*\", \"PUT*\")) or\n (http.request.body.content : (\"*/swip/SystemDescription*\", \"*/swip/Events*\") and http.request.body.content : (\"GET*\", \"HEAD*\"))\n ) and\n not http.request.body.content : \"*solarwinds.com*\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "AWS S3 Bucket Configuration Deletion", - "description": "Identifies the deletion of various Amazon Simple Storage Service (S3) bucket configuration components.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 206, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Bucket components may be deleted by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Bucket component deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketPolicy.html", - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html", - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html", - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html", - "https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/" - } - ] - } - ], - "id": "2ba25dec-9c05-4325-bc31-1934718c2548", - "rule_id": "227dc608-e558-43d9-b521-150772250bae", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:s3.amazonaws.com and\n event.action:(DeleteBucketPolicy or DeleteBucketReplication or DeleteBucketCors or\n DeleteBucketEncryption or DeleteBucketLifecycle)\n and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Kernel Module Load via insmod", - "description": "Detects the use of the insmod binary to load a Linux kernel object file. Threat actors can use this binary, given they have root privileges, to load a rootkit on a system providing them with complete control and the ability to hide from security products. Manually loading a kernel module in this manner should not be at all common and can indicate suspcious or malicious behavior.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Threat: Rootkit", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://decoded.avast.io/davidalvarez/linux-threat-hunting-syslogk-a-kernel-rootkit-found-under-development-in-the-wild/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.006", - "name": "Kernel Modules and Extensions", - "reference": "https://attack.mitre.org/techniques/T1547/006/" - } - ] - } - ] - } - ], - "id": "8b4d5c6e-668a-4c83-a8cb-49e29801cdde", - "rule_id": "2339f03c-f53f-40fa-834b-40c5983fc41f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and process.name == \"insmod\" and process.args : \"*.ko\"\nand not process.parent.name in (\"cisco-amp-helper\", \"ksplice-apply\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Lateral Movement via Startup Folder", - "description": "Identifies suspicious file creations in the startup folder of a remote system. An adversary could abuse this to move laterally by dropping a malicious script or executable that will be executed after a reboot or user logon.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.mdsec.co.uk/2017/06/rdpinception/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.001", - "name": "Remote Desktop Protocol", - "reference": "https://attack.mitre.org/techniques/T1021/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - } - ] - } - ] - } - ], - "id": "f9af7b8a-129f-40c1-a062-76955c30286b", - "rule_id": "25224a80-5a4a-4b8a-991e-6ab390465c4f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n\n /* via RDP TSClient mounted share or SMB */\n (process.name : \"mstsc.exe\" or process.pid == 4) and\n\n file.path : (\"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\*\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Account Password Reset Remotely", - "description": "Identifies an attempt to reset a potentially privileged account password remotely. Adversaries may manipulate account passwords to maintain access or evade password duration policies and preserve compromised credentials.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate remote account administration." - ], - "references": [ - "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4724", - "https://stealthbits.com/blog/manipulating-user-passwords-with-mimikatz/", - "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Credential%20Access/remote_pwd_reset_rpc_mimikatz_postzerologon_target_DC.evtx", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1531", - "name": "Account Access Removal", - "reference": "https://attack.mitre.org/techniques/T1531/" - } - ] - } - ], - "id": "6b32b3b4-7f1d-4a8f-93d1-5851fb71f8e3", - "rule_id": "2820c9c2-bcd7-4d6e-9eba-faf3891ba450", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectLogonId", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetLogonId", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetSid", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.TargetUserName", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.logon.type", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "sequence by winlog.computer_name with maxspan=5m\n [authentication where event.action == \"logged-in\" and\n /* event 4624 need to be logged */\n winlog.logon.type : \"Network\" and event.outcome == \"success\" and source.ip != null and\n source.ip != \"127.0.0.1\" and source.ip != \"::1\"] by winlog.event_data.TargetLogonId\n /* event 4724 need to be logged */\n [iam where event.action == \"reset-password\" and\n (\n /*\n This rule is very noisy if not scoped to privileged accounts, duplicate the\n rule and add your own naming convention and accounts of interest here.\n */\n winlog.event_data.TargetUserName: (\"*Admin*\", \"*super*\", \"*SVC*\", \"*DC0*\", \"*service*\", \"*DMZ*\", \"*ADM*\") or\n winlog.event_data.TargetSid : (\"S-1-5-21-*-500\", \"S-1-12-1-*-500\")\n )\n ] by winlog.event_data.SubjectLogonId\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Account Discovery Command via SYSTEM Account", - "description": "Identifies when the SYSTEM account uses an account discovery utility. This could be a sign of discovery activity after an adversary has achieved privilege escalation.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Account Discovery Command via SYSTEM Account\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of account discovery utilities using the SYSTEM account, which is commonly observed after attackers successfully perform privilege escalation or exploit web applications.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - If the process tree includes a web-application server process such as w3wp, httpd.exe, nginx.exe and alike, investigate any suspicious file creation or modification in the last 48 hours to assess the presence of any potential webshell backdoor.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Determine how the SYSTEM account is being used. For example, users with administrator privileges can spawn a system shell using Windows services, scheduled tasks or other third party utilities.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n- Use the data collected through the analysis to investigate other machines affected in the environment.", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Tactic: Privilege Escalation", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1033", - "name": "System Owner/User Discovery", - "reference": "https://attack.mitre.org/techniques/T1033/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.003", - "name": "Local Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/003/" - } - ] - } - ] - } - ], - "id": "e4a2449d-a1a9-49d2-b1fc-2c4d5b70652e", - "rule_id": "2856446a-34e6-435b-9fb5-f8f040bfa7ed", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.token.integrity_level_name", - "type": "unknown", - "ecs": false - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.IntegrityLevel", - "type": "keyword", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (?process.Ext.token.integrity_level_name : \"System\" or\n ?winlog.event_data.IntegrityLevel : \"System\") and\n (process.name : \"whoami.exe\" or\n (process.name : \"net1.exe\" and not process.parent.name : \"net.exe\"))\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "AWS Security Group Configuration Change Detection", - "description": "Identifies a change to an AWS Security Group Configuration. A security group is like a virtual firewall, and modifying configurations may allow unauthorized access. Threat actors may abuse this to establish persistence, exfiltrate data, or pivot in an AWS environment.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Network Security Monitoring", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "A security group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security group creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-security-groups.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "b9df25b1-040e-4d91-a8d6-d649081c16db", - "rule_id": "29052c19-ff3e-42fd-8363-7be14d7c5469", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:(AuthorizeSecurityGroupEgress or\nCreateSecurityGroup or ModifyInstanceAttribute or ModifySecurityGroupRules or RevokeSecurityGroupEgress or\nRevokeSecurityGroupIngress) and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Web Shell Detection: Script Process Child of Common Web Processes", - "description": "Identifies suspicious commands executed via a web server, which may suggest a vulnerability and remote shell access.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Web Shell Detection: Script Process Child of Common Web Processes\n\nAdversaries may backdoor web servers with web shells to establish persistent access to systems. A web shell is a web script that is placed on an openly accessible web server to allow an adversary to use the web server as a gateway into a network. A web shell may provide a set of functions to execute or a command-line interface on the system that hosts the web server.\n\nThis rule detects a web server process spawning script and command-line interface programs, potentially indicating attackers executing commands using the web shell.\n\n#### Possible investigation steps\n\n- Investigate abnormal behaviors observed by the subject process such as network connections, registry or file modifications, and any other spawned child processes.\n- Examine the command line to determine which commands or scripts were executed.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- If scripts or executables were dropped, retrieve the files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Initial Access", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Security audits, maintenance, and network administrative scripts may trigger this alert when run under web processes." - ], - "references": [ - "https://www.microsoft.com/security/blog/2020/02/04/ghost-in-the-shell-investigating-web-shell-attacks/", - "https://www.elastic.co/security-labs/elastic-response-to-the-the-spring4shell-vulnerability-cve-2022-22965", - "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1505", - "name": "Server Software Component", - "reference": "https://attack.mitre.org/techniques/T1505/", - "subtechnique": [ - { - "id": "T1505.003", - "name": "Web Shell", - "reference": "https://attack.mitre.org/techniques/T1505/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - }, - { - "id": "T1059.005", - "name": "Visual Basic", - "reference": "https://attack.mitre.org/techniques/T1059/005/" - } - ] - }, - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "c3996978-c3ce-4a5b-8401-b527f825e240", - "rule_id": "2917d495-59bd-4250-b395-c29409b76086", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"w3wp.exe\", \"httpd.exe\", \"nginx.exe\", \"php.exe\", \"php-cgi.exe\", \"tomcat.exe\") and\n process.name : (\"cmd.exe\", \"cscript.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\", \"wmic.exe\", \"wscript.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Code Execution via Postgresql", - "description": "This rule monitors for suspicious activities that may indicate an attacker attempting to execute arbitrary code within a PostgreSQL environment. Attackers can execute code via PostgreSQL as a result of gaining unauthorized access to a public facing PostgreSQL database or exploiting vulnerabilities, such as remote command execution and SQL injection attacks, which can result in unauthorized access and malicious actions, and facilitate post-exploitation activities for unauthorized access and malicious actions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "58beac82-514a-497e-a604-dbc51983cff7", - "rule_id": "2a692072-d78d-42f3-a48a-775677d79c4e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\", \"fork\", \"fork_event\") and \nevent.type == \"start\" and user.name == \"postgres\" and (\n (process.parent.args : \"*sh\" and process.parent.args : \"echo*\") or \n (process.args : \"*sh\" and process.args : \"echo*\")\n) and not process.parent.name : \"puppet\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "ESXI Discovery via Grep", - "description": "Identifies instances where a process named 'grep', 'egrep', or 'pgrep' is started on a Linux system with arguments related to virtual machine (VM) files, such as \"vmdk\", \"vmx\", \"vmxf\", \"vmsd\", \"vmsn\", \"vswp\", \"vmss\", \"nvram\", or \"vmem\". These file extensions are associated with VM-related file formats, and their presence in grep command arguments may indicate that a threat actor is attempting to search for, analyze, or manipulate VM files on the system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1518", - "name": "Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/" - } - ] - } - ], - "id": "8d37bbdc-99e4-4fbe-bf19-cfd4e21305d4", - "rule_id": "2b662e21-dc6e-461e-b5cf-a6eb9b235ec4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and\nprocess.name in (\"grep\", \"egrep\", \"pgrep\") and\nprocess.args in (\"vmdk\", \"vmx\", \"vmxf\", \"vmsd\", \"vmsn\", \"vswp\", \"vmss\", \"nvram\", \"vmem\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Wireless Credential Dumping using Netsh Command", - "description": "Identifies attempts to dump Wireless saved access keys in clear text using the Windows built-in utility Netsh.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Wireless Credential Dumping using Netsh Command\n\nNetsh is a Windows command line tool used for network configuration and troubleshooting. It enables the management of network settings and adapters, wireless network profiles, and other network-related tasks.\n\nThis rule looks for patterns used to dump credentials from wireless network profiles using Netsh, which can enable attackers to bring their own devices to the network.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe:\n - Observe and collect information about the following activities in the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Discovery", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-contexts", - "https://www.geeksforgeeks.org/how-to-find-the-wi-fi-password-using-cmd-in-windows/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - }, - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "5c8d961f-e5a1-42cd-b932-124d539e703a", - "rule_id": "2de87d72-ee0c-43e2-b975-5f0b029ac600", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"netsh.exe\" or process.pe.original_file_name == \"netsh.exe\") and\n process.args : \"wlan\" and process.args : \"key*clear\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Renamed AutoIt Scripts Interpreter", - "description": "Identifies a suspicious AutoIt process execution. Malware written as an AutoIt script tends to rename the AutoIt executable to avoid detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Renamed AutoIt Scripts Interpreter\n\nThe OriginalFileName attribute of a PE (Portable Executable) file is a metadata field that contains the original name of the executable file when compiled or linked. By using this attribute, analysts can identify renamed instances that attackers can use with the intent of evading detections, application allowlists, and other security protections.\n\nAutoIt is a scripting language and tool for automating tasks on Microsoft Windows operating systems. Due to its capabilities, malicious threat actors can abuse it to create malicious scripts and distribute malware.\n\nThis rule checks for renamed instances of AutoIt, which can indicate an attempt of evading detections, application allowlists, and other security protections.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.003", - "name": "Rename System Utilities", - "reference": "https://attack.mitre.org/techniques/T1036/003/" - } - ] - } - ] - } - ], - "id": "07db42e0-4a49-4629-b75f-9a8c7aea2252", - "rule_id": "2e1e835d-01e5-48ca-b9fc-7a61f7f11902", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name : \"AutoIt*.exe\" and not process.name : \"AutoIt*.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Process Injection via PowerShell", - "description": "Detects the use of Windows API functions that are commonly abused by malware and security tools to load malicious code or inject it into remote processes.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Process Injection via PowerShell\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nPowerShell also has solid capabilities to make the interaction with the Win32 API in an uncomplicated and reliable way, like the execution of inline C# code, PSReflect, Get-ProcAddress, etc.\n\nRed Team tooling and malware developers take advantage of these capabilities to develop stagers and loaders that inject payloads directly into the memory without touching the disk to circumvent file-based security protections.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Check if the imported function was executed and which process it targeted.\n- Check if the injected code can be retrieved (hardcoded in the script or on command line logs).\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate PowerShell scripts that make use of these functions." - ], - "references": [ - "https://github.com/EmpireProject/Empire/blob/master/data/module_source/management/Invoke-PSInject.ps1", - "https://github.com/EmpireProject/Empire/blob/master/data/module_source/management/Invoke-ReflectivePEInjection.ps1", - "https://github.com/BC-SECURITY/Empire/blob/master/empire/server/data/module_source/credentials/Invoke-Mimikatz.ps1", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/", - "subtechnique": [ - { - "id": "T1055.001", - "name": "Dynamic-link Library Injection", - "reference": "https://attack.mitre.org/techniques/T1055/001/" - }, - { - "id": "T1055.002", - "name": "Portable Executable Injection", - "reference": "https://attack.mitre.org/techniques/T1055/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - }, - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - } - ], - "id": "dd27a06b-69ca-4d8b-90b1-1251a70c41b4", - "rule_id": "2e29e96a-b67c-455a-afe4-de6183431d0d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.directory", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n (VirtualAlloc or VirtualAllocEx or VirtualProtect or LdrLoadDll or LoadLibrary or LoadLibraryA or\n LoadLibraryEx or GetProcAddress or OpenProcess or OpenProcessToken or AdjustTokenPrivileges) and\n (WriteProcessMemory or CreateRemoteThread or NtCreateThreadEx or CreateThread or QueueUserAPC or\n SuspendThread or ResumeThread or GetDelegateForFunctionPointer)\n ) and not \n (user.id:(\"S-1-5-18\" or \"S-1-5-19\") and\n file.directory: \"C:\\\\ProgramData\\\\Microsoft\\\\Windows Defender Advanced Threat Protection\\\\SenseCM\")\n", - "language": "kuery" - }, - { - "name": "Halfbaked Command and Control Beacon", - "description": "Halfbaked is a malware family used to establish persistence in a contested network. This rule detects a network activity algorithm leveraged by Halfbaked implant beacons for command and control.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Threat intel\n\nThis activity has been observed in FIN7 campaigns.", - "version": 104, - "tags": [ - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Domain: Endpoint" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "This rule should be tailored to exclude systems, either as sources or destinations, in which this behavior is expected." - ], - "references": [ - "https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html", - "https://attack.mitre.org/software/S0151/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - }, - { - "id": "T1568", - "name": "Dynamic Resolution", - "reference": "https://attack.mitre.org/techniques/T1568/", - "subtechnique": [ - { - "id": "T1568.002", - "name": "Domain Generation Algorithms", - "reference": "https://attack.mitre.org/techniques/T1568/002/" - } - ] - } - ] - } - ], - "id": "b709add9-8b03-4854-a58c-92ba7e2f0497", - "rule_id": "2e580225-2a58-48ef-938b-572933be06fe", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: (network_traffic.tls OR network_traffic.http) OR\n (event.category: (network OR network_traffic) AND network.protocol: http)) AND\n network.transport:tcp AND url.full:/http:\\/\\/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}\\/cd/ AND\n destination.port:(53 OR 80 OR 8080 OR 443)\n", - "language": "lucene" - }, - { - "name": "PowerShell Suspicious Script with Audio Capture Capabilities", - "description": "Detects PowerShell scripts that can record audio, a common feature in popular post-exploitation tooling.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Suspicious Script with Audio Capture Capabilities\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can use PowerShell to interact with the Windows API with the intent of capturing audio from input devices connected to the victim's computer.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Investigate if the script stores the recorded data locally and determine if anything was recorded.\n- Investigate whether the script contains exfiltration capabilities and identify the exfiltration server.\n- Assess network data to determine if the host communicated with the exfiltration server.\n\n### False positive analysis\n\n- Regular users should not need scripts to capture audio, which makes false positives unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Prioritize the response if this alert involves key executives or potentially valuable targets for espionage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/PowerShellMafia/PowerSploit/blob/master/Exfiltration/Get-MicrophoneAudio.ps1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1123", - "name": "Audio Capture", - "reference": "https://attack.mitre.org/techniques/T1123/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - }, - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - } - ], - "id": "67ab7041-b86a-4924-b82f-7b69ac7e9f33", - "rule_id": "2f2f4939-0b34-40c2-a0a3-844eb7889f43", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"Get-MicrophoneAudio\" or\n \"WindowsAudioDevice-Powershell-Cmdlet\" or\n (waveInGetNumDevs and mciSendStringA)\n )\n and not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n and not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "Windows Defender Disabled via Registry Modification", - "description": "Identifies modifications to the Windows Defender registry settings to disable the service or set the service to be started manually.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Windows Defender Disabled via Registry Modification\n\nMicrosoft Windows Defender is an antivirus product built into Microsoft Windows, which makes it popular across multiple environments. Disabling it is a common step in threat actor playbooks.\n\nThis rule monitors the registry for configurations that disable Windows Defender or the start of its service.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check if this operation was approved and performed according to the organization's change management policy.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity, the configuration is justified (for example, it is being used to deploy other security solutions or troubleshooting), and no other suspicious activity has been observed.\n\n### Related rules\n\n- Disabling Windows Defender Security Settings via PowerShell - c8cccb06-faf2-4cd5-886e-2c9636cfcb87\n- Microsoft Windows Defender Tampering - fe794edd-487f-4a90-b285-3ee54f2af2d3\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Re-enable Windows Defender and restore the service configurations to automatic start.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://thedfirreport.com/2020/12/13/defender-control/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - }, - { - "id": "T1562.006", - "name": "Indicator Blocking", - "reference": "https://attack.mitre.org/techniques/T1562/006/" - } - ] - }, - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "3df3709d-1d13-419a-84f3-935f372bce59", - "rule_id": "2ffa1f1e-b6db-47fa-994b-1512743847eb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n (\n (\n registry.path: (\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\DisableAntiSpyware\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\DisableAntiSpyware\"\n ) and\n registry.data.strings: (\"1\", \"0x00000001\")\n ) or\n (\n registry.path: (\n \"HKLM\\\\System\\\\*ControlSet*\\\\Services\\\\WinDefend\\\\Start\",\n \"\\\\REGISTRY\\\\MACHINE\\\\System\\\\*ControlSet*\\\\Services\\\\WinDefend\\\\Start\"\n ) and\n registry.data.strings in (\"3\", \"4\", \"0x00000003\", \"0x00000004\")\n )\n ) and\n\n not process.executable :\n (\"?:\\\\WINDOWS\\\\system32\\\\services.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Program Files (x86)\\\\Trend Micro\\\\Security Agent\\\\NTRmv.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "ESXI Timestomping using Touch Command", - "description": "Identifies instances where the 'touch' command is executed on a Linux system with the \"-r\" flag, which is used to modify the timestamp of a file based on another file's timestamp. The rule targets specific VM-related paths, such as \"/etc/vmware/\", \"/usr/lib/vmware/\", or \"/vmfs/*\". These paths are associated with VMware virtualization software, and their presence in the touch command arguments may indicate that a threat actor is attempting to tamper with timestamps of VM-related files and configurations on the system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.006", - "name": "Timestomp", - "reference": "https://attack.mitre.org/techniques/T1070/006/" - } - ] - } - ] - } - ], - "id": "f49f4be8-1406-4023-873c-10fc478f9f51", - "rule_id": "30bfddd7-2954-4c9d-bbc6-19a99ca47e23", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and\nprocess.name : \"touch\" and process.args : \"-r\" and process.args : (\"/etc/vmware/*\", \"/usr/lib/vmware/*\", \"/vmfs/*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Inbound Connection to an Unsecure Elasticsearch Node", - "description": "Identifies Elasticsearch nodes that do not have Transport Layer Security (TLS), and/or lack authentication, and are accepting inbound network connections over the default Elasticsearch port.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Domain: Endpoint" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "If you have front-facing proxies that provide authentication and TLS, this rule would need to be tuned to eliminate the source IP address of your reverse-proxy." - ], - "references": [ - "https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-security.html", - "https://www.elastic.co/guide/en/beats/packetbeat/current/packetbeat-http-options.html#_send_all_headers" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - } - ], - "id": "4bb80573-0e6b-4a51-9e74-defd467c35ea", - "rule_id": "31295df3-277b-4c56-a1fb-84e31b4222a9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [], - "setup": "This rule requires the addition of port `9200` and `send_all_headers` to the `HTTP` protocol configuration in `packetbeat.yml`. See the References section for additional configuration documentation.", - "type": "query", - "index": [ - "packetbeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.http OR (event.category: network_traffic AND network.protocol: http)) AND\n status:OK AND destination.port:9200 AND network.direction:inbound AND NOT http.response.headers.content-type:\"image/x-icon\" AND NOT\n _exists_:http.request.headers.authorization\n", - "language": "lucene" - }, - { - "name": "RPC (Remote Procedure Call) to the Internet", - "description": "This rule detects network events that may indicate the use of RPC traffic to the Internet. RPC is commonly used by system administrators to remotely control a system for maintenance or to use shared resources. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Tactic: Initial Access", - "Domain: Endpoint", - "Use Case: Threat Detection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - } - ], - "id": "7764f3b3-53a4-4262-a913-a46d6b8bff18", - "rule_id": "32923416-763a-4531-bb35-f33b9232ecdb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and (destination.port:135 or event.dataset:zeek.dce_rpc) and\n source.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n ) and\n not destination.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n )\n", - "language": "kuery" - }, - { - "name": "Suspicious MS Outlook Child Process", - "description": "Identifies suspicious child processes of Microsoft Outlook. These child processes are often associated with spear phishing activity.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious MS Outlook Child Process\n\nMicrosoft Outlook is an email client that provides contact, email calendar, and task management features. Outlook is widely used, either standalone or as part of the Office suite.\n\nThis rule looks for suspicious processes spawned by MS Outlook, which can be the result of the execution of malicious documents and/or exploitation for initial access.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve recently opened files received via email and opened by the user that could cause this behavior. Common locations include but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "6b5df1e7-8bf3-40c3-9952-65614aabd347", - "rule_id": "32f4675e-6c49-4ace-80f9-97c9259dca2e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"outlook.exe\" and\n process.name : (\"Microsoft.Workflow.Compiler.exe\", \"arp.exe\", \"atbroker.exe\", \"bginfo.exe\", \"bitsadmin.exe\",\n \"cdb.exe\", \"certutil.exe\", \"cmd.exe\", \"cmstp.exe\", \"cscript.exe\", \"csi.exe\", \"dnx.exe\", \"dsget.exe\",\n \"dsquery.exe\", \"forfiles.exe\", \"fsi.exe\", \"ftp.exe\", \"gpresult.exe\", \"hostname.exe\", \"ieexec.exe\",\n \"iexpress.exe\", \"installutil.exe\", \"ipconfig.exe\", \"mshta.exe\", \"msxsl.exe\", \"nbtstat.exe\", \"net.exe\",\n \"net1.exe\", \"netsh.exe\", \"netstat.exe\", \"nltest.exe\", \"odbcconf.exe\", \"ping.exe\", \"powershell.exe\",\n \"pwsh.exe\", \"qprocess.exe\", \"quser.exe\", \"qwinsta.exe\", \"rcsi.exe\", \"reg.exe\", \"regasm.exe\",\n \"regsvcs.exe\", \"regsvr32.exe\", \"sc.exe\", \"schtasks.exe\", \"systeminfo.exe\", \"tasklist.exe\",\n \"tracert.exe\", \"whoami.exe\", \"wmic.exe\", \"wscript.exe\", \"xwizard.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS IAM User Addition to Group", - "description": "Identifies the addition of a user to a specified group in AWS Identity and Access Management (IAM).", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS IAM User Addition to Group\n\nAWS Identity and Access Management (IAM) provides fine-grained access control across all of AWS. With IAM, you can specify who can access which services and resources, and under which conditions. With IAM policies, you manage permissions to your workforce and systems to ensure least-privilege permissions.\n\nThis rule looks for the addition of users to a specified user group.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- False positives may occur due to the intended usage of the service. Tuning is needed in order to have higher confidence. Consider adding exceptions — preferably with a combination of user agent and IP address conditions — to reduce noise from onboarding processes and administrator activities.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Tactic: Credential Access", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Adding users to a specified group may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. User additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/IAM/latest/APIReference/API_AddUserToGroup.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "5be9dc6c-c098-4ba6-837c-64640f10143b", - "rule_id": "333de828-8190-4cf5-8d7c-7575846f6fe0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:AddUserToGroup and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "ESXI Discovery via Find", - "description": "Identifies instances where the 'find' command is started on a Linux system with arguments targeting specific VM-related paths, such as \"/etc/vmware/\", \"/usr/lib/vmware/\", or \"/vmfs/*\". These paths are associated with VMware virtualization software, and their presence in the find command arguments may indicate that a threat actor is attempting to search for, analyze, or manipulate VM-related files and configurations on the system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1518", - "name": "Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/" - } - ] - } - ], - "id": "553328a1-c4d6-4a47-8583-ac698195184d", - "rule_id": "33a6752b-da5e-45f8-b13a-5f094c09522f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and process.name : \"find\" and\nprocess.args : (\"/etc/vmware/*\", \"/usr/lib/vmware/*\", \"/vmfs/*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Remote File Download via PowerShell", - "description": "Identifies powershell.exe being used to download an executable file from an untrusted remote destination.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remote File Download via PowerShell\n\nAttackers commonly transfer tooling or malware from external systems into a compromised environment using the command and control channel. However, they can also abuse signed utilities to drop these files.\n\nPowerShell is one of system administrators' main tools for automation, report routines, and other tasks. This makes it available for use in various environments and creates an attractive way for attackers to execute code and perform actions. This rule correlates network and file events to detect downloads of executable and script files performed using PowerShell.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check the reputation of the domain or IP address used to host the downloaded file.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- Administrators can use PowerShell legitimately to download executable and script files. Analysts can dismiss the alert if the Administrator is aware of the activity and the triage has not identified suspicious or malicious files.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "2b0b0a02-13ce-4847-81ba-08fd883125b1", - "rule_id": "33f306e8-417c-411b-965c-c2812d6d3f4d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dns.question.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=30s\n [network where host.os.type == \"windows\" and process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and network.protocol == \"dns\" and\n not dns.question.name : (\"localhost\", \"*.microsoft.com\", \"*.azureedge.net\", \"*.powershellgallery.com\", \"*.windowsupdate.com\", \"metadata.google.internal\") and\n not user.domain : \"NT AUTHORITY\"]\n [file where host.os.type == \"windows\" and process.name : \"powershell.exe\" and event.type == \"creation\" and file.extension : (\"exe\", \"dll\", \"ps1\", \"bat\") and\n not file.name : \"__PSScriptPolicy*.ps1\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Port Forwarding Rule Addition", - "description": "Identifies the creation of a new port forwarding rule. An adversary may abuse this technique to bypass network segmentation restrictions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Port Forwarding Rule Addition\n\nNetwork port forwarding is a mechanism to redirect incoming TCP connections (IPv4 or IPv6) from the local TCP port to any other port number, or even to a port on a remote computer.\n\nAttackers may configure port forwarding rules to bypass network segmentation restrictions, using the host as a jump box to access previously unreachable systems.\n\nThis rule monitors the modifications to the `HKLM\\SYSTEM\\*ControlSet*\\Services\\PortProxy\\v4tov4\\` subkeys.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Identify the target host IP address, check the connections originating from the host where the modification occurred, and inspect the credentials used.\n - Investigate suspicious login activity, such as unauthorized access and logins from outside working hours and unusual locations.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the Administrator is aware of the activity and there are justifications for this configuration.\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Delete the port forwarding rule.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.fireeye.com/blog/threat-research/2019/01/bypassing-network-restrictions-through-rdp-tunneling.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "3ec9fa3c-5fa4-4ea6-a9ee-6adb122bd45d", - "rule_id": "3535c8bb-3bd5-40f4-ae32-b7cd589d5372", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\PortProxy\\\\v4tov4\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\PortProxy\\\\v4tov4\\\\*\"\n)\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Unusual Parent-Child Relationship", - "description": "Identifies Windows programs run from unexpected parent processes. This could indicate masquerading or other strange activity on a system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Parent-Child Relationship\n\nWindows internal/system processes have some characteristics that can be used to spot suspicious activities. One of these characteristics is parent-child relationships. These relationships can be used to baseline the typical behavior of the system and then alert on occurrences that don't comply with the baseline.\n\nThis rule uses this information to spot suspicious parent and child processes.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/sbousseaden/Slides/blob/master/Hunting%20MindMaps/PNG/Windows%20Processes%20TH.map.png", - "https://www.andreafortuna.org/2017/06/15/standard-windows-processes-a-brief-reference/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/", - "subtechnique": [ - { - "id": "T1055.012", - "name": "Process Hollowing", - "reference": "https://attack.mitre.org/techniques/T1055/012/" - } - ] - } - ] - } - ], - "id": "1a022e5f-8840-4345-94be-ab68d2c98e2a", - "rule_id": "35df0dd8-092d-4a83-88c1-5151a804f31b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\nprocess.parent.name != null and\n (\n /* suspicious parent processes */\n (process.name:\"autochk.exe\" and not process.parent.name:\"smss.exe\") or\n (process.name:(\"fontdrvhost.exe\", \"dwm.exe\") and not process.parent.name:(\"wininit.exe\", \"winlogon.exe\")) or\n (process.name:(\"consent.exe\", \"RuntimeBroker.exe\", \"TiWorker.exe\") and not process.parent.name:\"svchost.exe\") or\n (process.name:\"SearchIndexer.exe\" and not process.parent.name:\"services.exe\") or\n (process.name:\"SearchProtocolHost.exe\" and not process.parent.name:(\"SearchIndexer.exe\", \"dllhost.exe\")) or\n (process.name:\"dllhost.exe\" and not process.parent.name:(\"services.exe\", \"svchost.exe\")) or\n (process.name:\"smss.exe\" and not process.parent.name:(\"System\", \"smss.exe\")) or\n (process.name:\"csrss.exe\" and not process.parent.name:(\"smss.exe\", \"svchost.exe\")) or\n (process.name:\"wininit.exe\" and not process.parent.name:\"smss.exe\") or\n (process.name:\"winlogon.exe\" and not process.parent.name:\"smss.exe\") or\n (process.name:(\"lsass.exe\", \"LsaIso.exe\") and not process.parent.name:\"wininit.exe\") or\n (process.name:\"LogonUI.exe\" and not process.parent.name:(\"wininit.exe\", \"winlogon.exe\")) or\n (process.name:\"services.exe\" and not process.parent.name:\"wininit.exe\") or\n (process.name:\"svchost.exe\" and not process.parent.name:(\"MsMpEng.exe\", \"services.exe\")) or\n (process.name:\"spoolsv.exe\" and not process.parent.name:\"services.exe\") or\n (process.name:\"taskhost.exe\" and not process.parent.name:(\"services.exe\", \"svchost.exe\")) or\n (process.name:\"taskhostw.exe\" and not process.parent.name:(\"services.exe\", \"svchost.exe\")) or\n (process.name:\"userinit.exe\" and not process.parent.name:(\"dwm.exe\", \"winlogon.exe\")) or\n (process.name:(\"wmiprvse.exe\", \"wsmprovhost.exe\", \"winrshost.exe\") and not process.parent.name:\"svchost.exe\") or\n /* suspicious child processes */\n (process.parent.name:(\"SearchProtocolHost.exe\", \"taskhost.exe\", \"csrss.exe\") and not process.name:(\"werfault.exe\", \"wermgr.exe\", \"WerFaultSecure.exe\")) or\n (process.parent.name:\"autochk.exe\" and not process.name:(\"chkdsk.exe\", \"doskey.exe\", \"WerFault.exe\")) or\n (process.parent.name:\"smss.exe\" and not process.name:(\"autochk.exe\", \"smss.exe\", \"csrss.exe\", \"wininit.exe\", \"winlogon.exe\", \"setupcl.exe\", \"WerFault.exe\")) or\n (process.parent.name:\"wermgr.exe\" and not process.name:(\"WerFaultSecure.exe\", \"wermgr.exe\", \"WerFault.exe\")) or\n (process.parent.name:\"conhost.exe\" and not process.name:(\"mscorsvw.exe\", \"wermgr.exe\", \"WerFault.exe\", \"WerFaultSecure.exe\"))\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Process Started from Process ID (PID) File", - "description": "Identifies a new process starting from a process ID (PID), lock or reboot file within the temporary file storage paradigm (tmpfs) directory /var/run directory. On Linux, the PID files typically hold the process ID to track previous copies running and manage other tasks. Certain Linux malware use the /var/run directory for holding data, executables and other tasks, disguising itself or these files as legitimate PID files.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Process Started from Process ID (PID) File\nDetection alerts from this rule indicate a process spawned from an executable masqueraded as a legitimate PID file which is very unusual and should not occur. Here are some possible avenues of investigation:\n- Examine parent and child process relationships of the new process to determine if other processes are running.\n- Examine the /var/run directory using Osquery to determine other potential PID files with unsually large file sizes, indicative of it being an executable: \"SELECT f.size, f.uid, f.type, f.path from file f WHERE path like '/var/run/%%';\"\n- Examine the reputation of the SHA256 hash from the PID file in a database like VirusTotal to identify additional pivots and artifacts for investigation.\n\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Threat: BPFDoor", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "False-Positives (FP) should be at a minimum with this detection as PID files are meant to hold process IDs, not inherently be executables that spawn processes." - ], - "references": [ - "https://www.sandflysecurity.com/blog/linux-file-masquerading-and-malicious-pids-sandfly-1-2-6-update/", - "https://twitter.com/GossiTheDog/status/1522964028284411907", - "https://exatrack.com/public/Tricephalic_Hellkeeper.pdf", - "https://www.elastic.co/security-labs/a-peek-behind-the-bpfdoor" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "c1603ac5-ed49-4005-99f7-7152ceb45302", - "rule_id": "3688577a-d196-11ec-90b0-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and user.id == \"0\" and\n process.executable regex~ \"\"\"/var/run/\\w+\\.(pid|lock|reboot)\"\"\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Suspicious ImagePath Service Creation", - "description": "Identifies the creation of a suspicious ImagePath value. This could be an indication of an adversary attempting to stealthily persist or escalate privileges through abnormal service creation.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "70cfd3a2-3528-45bc-a3e7-b97c0fc503ca", - "rule_id": "36a8e048-d888-4f61-a8b9-0f9e2e40f317", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ImagePath\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ImagePath\"\n ) and\n /* add suspicious registry ImagePath values here */\n registry.data.strings : (\"%COMSPEC%*\", \"*\\\\.\\\\pipe\\\\*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "AWS RDS Security Group Creation", - "description": "Identifies the creation of an Amazon Relational Database Service (RDS) Security group.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "An RDS security group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security group creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBSecurityGroup.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/", - "subtechnique": [ - { - "id": "T1136.003", - "name": "Cloud Account", - "reference": "https://attack.mitre.org/techniques/T1136/003/" - } - ] - } - ] - } - ], - "id": "0363f16f-4151-4332-b9ba-ad83604c27ca", - "rule_id": "378f9024-8a0c-46a5-aa08-ce147ac73a4e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:CreateDBSecurityGroup and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "AWS Execution via System Manager", - "description": "Identifies the execution of commands and scripts via System Manager. Execution methods such as RunShellScript, RunPowerShellScript, and alike can be abused by an authenticated attacker to install a backdoor or to interact with a compromised instance via reverse-shell using system only commands.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS Execution via System Manager\n\nAmazon EC2 Systems Manager is a management service designed to help users automatically collect software inventory, apply operating system patches, create system images, and configure Windows and Linux operating systems.\n\nThis rule looks for the execution of commands and scripts using System Manager. Note that the actual contents of these scripts and commands are not included in the event, so analysts must gain visibility using an host-level security product.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Validate that the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Investigate the commands or scripts using host-level visibility.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences involving other users.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Log Auditing", - "Tactic: Initial Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Suspicious commands from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-plugins.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - } - ], - "id": "4e67408f-dff8-4226-b51d-5c7376f33826", - "rule_id": "37b211e8-4e2f-440f-86d8-06cc8f158cfa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:ssm.amazonaws.com and event.action:SendCommand and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Network Connection via Certutil", - "description": "Identifies certutil.exe making a network connection. Adversaries could abuse certutil.exe to download a certificate, or malware, from a remote URL.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Network Connection via Certutil\n\nAttackers can abuse `certutil.exe` to download malware, offensive security tools, and certificates from external sources in order to take the next steps in a compromised environment.\n\nThis rule looks for network events where `certutil.exe` contacts IP ranges other than the ones specified in [IANA IPv4 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml)\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate if the downloaded file was executed.\n- Determine the context in which `certutil.exe` and the file were run.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the downloaded file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. If trusted software uses this command and the triage has not identified anything suspicious, this alert can be closed as a false positive.\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml", - "https://frsecure.com/malware-incident-response-playbook/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - } - ], - "id": "e3b8080a-9767-417f-8ccc-421ab050aad1", - "rule_id": "3838e0e3-1850-4850-a411-2e8c5ba40ba8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"certutil.exe\" and event.type == \"start\"]\n [network where host.os.type == \"windows\" and process.name : \"certutil.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\",\n \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\",\n \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "AWS EC2 Network Access Control List Creation", - "description": "Identifies the creation of an AWS Elastic Compute Cloud (EC2) network access control list (ACL) or an entry in a network ACL with a specified rule number.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Network Security Monitoring", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Network ACL's may be created by a network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Network ACL creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/create-network-acl.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkAcl.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/create-network-acl-entry.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkAclEntry.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1133", - "name": "External Remote Services", - "reference": "https://attack.mitre.org/techniques/T1133/" - } - ] - } - ], - "id": "be5fa359-1488-4c83-8ab7-e3ff051f1b53", - "rule_id": "39144f38-5284-4f8e-a2ae-e3fd628d90b0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:(CreateNetworkAcl or CreateNetworkAclEntry) and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential DNS Tunneling via NsLookup", - "description": "This rule identifies a large number (15) of nslookup.exe executions with an explicit query type from the same host. This may indicate command and control activity utilizing the DNS protocol.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential DNS Tunneling via NsLookup\n\nAttackers can abuse existing network rules that allow DNS communication with external resources to use the protocol as their command and control and/or exfiltration channel.\n\nDNS queries can be used to infiltrate data such as commands to be run, malicious files, etc., and also for exfiltration, since queries can be used to send data to the attacker-controlled DNS server. This process is commonly known as DNS tunneling.\n\nMore information on how tunneling works and how it can be abused can be found on [Palo Alto Unit42 Research](https://unit42.paloaltonetworks.com/dns-tunneling-how-dns-can-be-abused-by-malicious-actors).\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the DNS query and identify the information sent.\n- Extract this communication's indicators of compromise (IoCs) and use traffic logs to search for other potentially compromised hosts.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. If the parent process is trusted and the data sent is not sensitive nor command and control related, this alert can be closed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Immediately block the identified indicators of compromise (IoCs).\n- Implement any temporary network rules, procedures, and segmentation required to contain the attack.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Update firewall rules to be more restrictive.\n- Reimage the host operating system or restore the compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://unit42.paloaltonetworks.com/dns-tunneling-in-the-wild-overview-of-oilrigs-dns-tunneling/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/", - "subtechnique": [ - { - "id": "T1071.004", - "name": "DNS", - "reference": "https://attack.mitre.org/techniques/T1071/004/" - } - ] - }, - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - } - ], - "id": "4cc5f31b-3b8a-4467-a761-5e7e5acf247f", - "rule_id": "3a59fc81-99d3-47ea-8cd6-d48d561fca20", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "event.category:process and host.os.type:windows and event.type:start and process.name:nslookup.exe and process.args:(-querytype=* or -qt=* or -q=* or -type=*)\n", - "threshold": { - "field": [ - "host.id" - ], - "value": 15 - }, - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "VNC (Virtual Network Computing) to the Internet", - "description": "This rule detects network events that may indicate the use of VNC traffic to the Internet. VNC is commonly used by system administrators to remotely control a system for maintenance or to use shared resources. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Tactic: Command and Control", - "Domain: Endpoint", - "Use Case: Threat Detection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "VNC connections may be made directly to Linux cloud server instances but such connections are usually made only by engineers. VNC is less common than SSH or RDP but may be required by some work flows such as remote access and support for specialized software products or servers. Such work-flows are usually known and not unexpected. Usage that is unfamiliar to server or network owners can be unexpected and suspicious." - ], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1219", - "name": "Remote Access Software", - "reference": "https://attack.mitre.org/techniques/T1219/" - } - ] - } - ], - "id": "7965ed9b-7262-4031-8efd-40afb01bb9e6", - "rule_id": "3ad49c61-7adc-42c1-b788-732eda2f5abf", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and destination.port >= 5800 and destination.port <= 5810 and\n source.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n ) and\n not destination.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n )\n", - "language": "kuery" - }, - { - "name": "Unusual Parent Process for cmd.exe", - "description": "Identifies a suspicious parent child process relationship with cmd.exe descending from an unusual process.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "25b6146a-2439-44d2-86ba-900c1fec4510", - "rule_id": "3b47900d-e793-49e8-968f-c90dc3526aa1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"cmd.exe\" and\n process.parent.name : (\"lsass.exe\",\n \"csrss.exe\",\n \"epad.exe\",\n \"regsvr32.exe\",\n \"dllhost.exe\",\n \"LogonUI.exe\",\n \"wermgr.exe\",\n \"spoolsv.exe\",\n \"jucheck.exe\",\n \"jusched.exe\",\n \"ctfmon.exe\",\n \"taskhostw.exe\",\n \"GoogleUpdate.exe\",\n \"sppsvc.exe\",\n \"sihost.exe\",\n \"slui.exe\",\n \"SIHClient.exe\",\n \"SearchIndexer.exe\",\n \"SearchProtocolHost.exe\",\n \"FlashPlayerUpdateService.exe\",\n \"WerFault.exe\",\n \"WUDFHost.exe\",\n \"unsecapp.exe\",\n \"wlanext.exe\" ) and\n not (process.parent.name : \"dllhost.exe\" and process.parent.args : \"/Processid:{CA8C87C1-929D-45BA-94DB-EF8E6CB346AD}\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "NTDS or SAM Database File Copied", - "description": "Identifies a copy operation of the Active Directory Domain Database (ntds.dit) or Security Account Manager (SAM) files. Those files contain sensitive information including hashed domain and/or local credentials.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://thedfirreport.com/2020/11/23/pysa-mespinoza-ransomware/", - "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.002/T1003.002.md#atomic-test-3---esentutlexe-sam-copy", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 33, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.002", - "name": "Security Account Manager", - "reference": "https://attack.mitre.org/techniques/T1003/002/" - }, - { - "id": "T1003.003", - "name": "NTDS", - "reference": "https://attack.mitre.org/techniques/T1003/003/" - } - ] - } - ] - } - ], - "id": "c493a6c4-57bc-4f02-b206-8dc3cca37f6a", - "rule_id": "3bc6deaa-fbd4-433a-ae21-3e892f95624f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n (process.pe.original_file_name in (\"Cmd.Exe\", \"PowerShell.EXE\", \"XCOPY.EXE\") and\n process.args : (\"copy\", \"xcopy\", \"Copy-Item\", \"move\", \"cp\", \"mv\")\n ) or\n (process.pe.original_file_name : \"esentutl.exe\" and process.args : (\"*/y*\", \"*/vss*\", \"*/d*\"))\n ) and\n process.args : (\"*\\\\ntds.dit\", \"*\\\\config\\\\SAM\", \"\\\\*\\\\GLOBALROOT\\\\Device\\\\HarddiskVolumeShadowCopy*\\\\*\", \"*/system32/config/SAM*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS CloudTrail Log Updated", - "description": "Identifies an update to an AWS log trail setting that specifies the delivery of log files.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS CloudTrail Log Updated\n\nAmazon CloudTrail is a service that enables governance, compliance, operational auditing, and risk auditing of your Amazon Web Services account. With CloudTrail, you can log, continuously monitor, and retain account activity related to actions across your Amazon Web Services infrastructure. CloudTrail provides event history of your Amazon Web Services account activity, including actions taken through the Amazon Management Console, Amazon SDKs, command line tools, and other Amazon Web Services services. This event history simplifies security analysis, resource change tracking, and troubleshooting.\n\nThis rule identifies a modification on CloudTrail settings using the API `UpdateTrail` action. Attackers can do this to cover their tracks and impact security monitoring that relies on this source.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Examine the response elements of the event to determine the scope of the changes.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Log Auditing", - "Resources: Investigation Guide", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trail updates may be made by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Trail updates from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_UpdateTrail.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/update-trail.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1565", - "name": "Data Manipulation", - "reference": "https://attack.mitre.org/techniques/T1565/", - "subtechnique": [ - { - "id": "T1565.001", - "name": "Stored Data Manipulation", - "reference": "https://attack.mitre.org/techniques/T1565/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1530", - "name": "Data from Cloud Storage", - "reference": "https://attack.mitre.org/techniques/T1530/" - } - ] - } - ], - "id": "5759c9a2-7b15-4d95-b154-89ef4c303696", - "rule_id": "3e002465-876f-4f04-b016-84ef48ce7e5d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:UpdateTrail and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Privilege Escalation via Named Pipe Impersonation", - "description": "Identifies a privilege escalation attempt via named pipe impersonation. An adversary may abuse this technique by utilizing a framework such Metasploit's meterpreter getsystem command.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Privilege Escalation via Named Pipe Impersonation\n\nA named pipe is a type of inter-process communication (IPC) mechanism used in operating systems like Windows, which allows two or more processes to communicate with each other by sending and receiving data through a well-known point.\n\nAttackers can abuse named pipes to elevate their privileges by impersonating the security context in which they execute code. Metasploit, for example, creates a service and a random pipe, and then uses the service to connect to the pipe and impersonate the service security context, which is SYSTEM.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - If any suspicious processes were found, examine the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.ired.team/offensive-security/privilege-escalation/windows-namedpipes-privilege-escalation", - "https://www.cobaltstrike.com/blog/what-happens-when-i-type-getsystem/", - "https://redcanary.com/blog/getsystem-offsec/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/" - } - ] - } - ], - "id": "f62a471c-ec1d-4aca-94fd-cdab91e6b2b6", - "rule_id": "3ecbdc9e-e4f2-43fa-8cca-63802125e582", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name in (\"Cmd.Exe\", \"PowerShell.EXE\") and\n process.args : \"echo\" and process.args : \">\" and process.args : \"\\\\\\\\.\\\\pipe\\\\*\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Process Creation CallTrace", - "description": "Identifies when a process is created and immediately accessed from an unknown memory code region and by the same parent process. This may indicate a code injection attempt.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Process Creation CallTrace\n\nAttackers may inject code into child processes' memory to hide their actual activity, evade detection mechanisms, and decrease discoverability during forensics. This rule looks for a spawned process by Microsoft Office, scripting, and command line applications, followed by a process access event for an unknown memory region by the parent process, which can indicate a code injection attempt.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Create a memory dump of the child process for analysis.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 207, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - } - ], - "id": "ab9afe25-bbf6-45be-aa23-70f5fd737f90", - "rule_id": "3ed032b2-45d8-4406-bc79-7ad1eabb2c72", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.CallTrace", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetProcessGUID", - "type": "keyword", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=1m\n [process where host.os.type == \"windows\" and event.code == \"1\" and\n /* sysmon process creation */\n process.parent.name : (\"winword.exe\", \"excel.exe\", \"outlook.exe\", \"powerpnt.exe\", \"eqnedt32.exe\", \"fltldr.exe\",\n \"mspub.exe\", \"msaccess.exe\",\"cscript.exe\", \"wscript.exe\", \"rundll32.exe\", \"regsvr32.exe\",\n \"mshta.exe\", \"wmic.exe\", \"cmstp.exe\", \"msxsl.exe\") and\n\n /* noisy FP patterns */\n not (process.parent.name : \"EXCEL.EXE\" and process.executable : \"?:\\\\Program Files\\\\Microsoft Office\\\\root\\\\Office*\\\\ADDINS\\\\*.exe\") and\n not (process.executable : \"?:\\\\Windows\\\\splwow64.exe\" and process.args in (\"8192\", \"12288\") and process.parent.name : (\"winword.exe\", \"excel.exe\", \"outlook.exe\", \"powerpnt.exe\")) and\n not (process.parent.name : \"rundll32.exe\" and process.parent.args : (\"?:\\\\WINDOWS\\\\Installer\\\\MSI*.tmp,zzzzInvokeManagedCustomActionOutOfProc\", \"--no-sandbox\")) and\n not (process.executable :\n (\"?:\\\\Program Files (x86)\\\\Microsoft\\\\EdgeWebView\\\\Application\\\\*\\\\msedgewebview2.exe\",\n \"?:\\\\Program Files\\\\Adobe\\\\Acrobat DC\\\\Acrobat\\\\Acrobat.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\DWWIN.EXE\") and\n process.parent.name : (\"winword.exe\", \"excel.exe\", \"outlook.exe\", \"powerpnt.exe\")) and\n not (process.parent.name : \"regsvr32.exe\" and process.parent.args : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\"))\n ] by process.parent.entity_id, process.entity_id\n [process where host.os.type == \"windows\" and event.code == \"10\" and\n /* Sysmon process access event from unknown module */\n winlog.event_data.CallTrace : \"*UNKNOWN*\"] by process.entity_id, winlog.event_data.TargetProcessGUID\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Binary Executed from Shared Memory Directory", - "description": "Identifies the execution of a binary by root in Linux shared memory directories: (/dev/shm/, /run/shm/, /var/run/, /var/lock/). This activity is to be considered highly abnormal and should be investigated. Threat actors have placed executables used for persistence on high-uptime servers in these directories as system backdoors.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Threat: BPFDoor", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Directories /dev/shm and /run/shm are temporary file storage directories in Linux. They are intended to appear as a mounted file system, but uses virtual memory instead of a persistent storage device and thus are used for mounting file systems in legitimate purposes." - ], - "references": [ - "https://linuxsecurity.com/features/fileless-malware-on-linux", - "https://twitter.com/GossiTheDog/status/1522964028284411907", - "https://www.elastic.co/security-labs/a-peek-behind-the-bpfdoor" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "ee83fa54-bcfa-468e-bb02-aa8073b05a1b", - "rule_id": "3f3f9fe2-d095-11ec-95dc-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action in (\"exec\", \"exec_event\") and\nprocess.executable : (\"/dev/shm/*\", \"/run/shm/*\", \"/var/run/*\", \"/var/lock/*\") and\nnot process.executable : (\"/var/run/docker/*\", \"/var/run/utsns/*\", \"/var/run/s6/*\", \"/var/run/cloudera-scm-agent/*\") and\nuser.id == \"0\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Unusual Persistence via Services Registry", - "description": "Identifies processes modifying the services registry key directly, instead of through the expected Windows APIs. This could be an indication of an adversary attempting to stealthily persist through abnormal service creation or modification of an existing service.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "28cbd55f-e79a-4c9b-9ba7-54f8011b6e9b", - "rule_id": "403ef0d3-8259-40c9-a5b6-d48354712e49", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ServiceDLL\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ImagePath\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ServiceDLL\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\ControlSet*\\\\Services\\\\*\\\\ImagePath\"\n ) and not registry.data.strings : (\n \"?:\\\\windows\\\\system32\\\\Drivers\\\\*.sys\",\n \"\\\\SystemRoot\\\\System32\\\\drivers\\\\*.sys\",\n \"\\\\??\\\\?:\\\\Windows\\\\system32\\\\Drivers\\\\*.SYS\",\n \"system32\\\\DRIVERS\\\\USBSTOR\") and\n not (process.name : \"procexp??.exe\" and registry.data.strings : \"?:\\\\*\\\\procexp*.sys\") and\n not process.executable : (\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Windows\\\\winsxs\\\\*\\\\TiWorker.exe\",\n \"?:\\\\Windows\\\\System32\\\\drvinst.exe\",\n \"?:\\\\Windows\\\\System32\\\\services.exe\",\n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\regsvr32.exe\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Modprobe File Event", - "description": "Detects file events involving kernel modules in modprobe configuration files, which may indicate unauthorized access or manipulation of critical kernel modules. Attackers may tamper with the modprobe files to load malicious or unauthorized kernel modules, potentially bypassing security measures, escalating privileges, or hiding their activities within the system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Setup\nThis rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system. \n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from. \n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /etc/modprobe.conf -p wa -k modprobe\n-w /etc/modprobe.d -p wa -k modprobe\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", - "building_block_type": "default", - "version": 103, - "tags": [ - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "d92cb607-6ed9-4aec-9717-d7be4228c4d1", - "rule_id": "40ddbcc8-6561-44d9-afc8-eefdbfe0cccd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "This rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system.\n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /etc/modprobe.conf -p wa -k modprobe\n-w /etc/modprobe.d -p wa -k modprobe\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", - "type": "new_terms", - "query": "host.os.type:linux and event.category:file and event.action:\"opened-file\" and\nfile.path : (\"/etc/modprobe.conf\" or \"/etc/modprobe.d\" or /etc/modprobe.d/*)\n", - "new_terms_fields": [ - "host.id", - "process.executable", - "file.path" - ], - "history_window_start": "now-7d", - "index": [ - "auditbeat-*", - "logs-auditd_manager.auditd-*" - ], - "language": "kuery" - }, - { - "name": "Control Panel Process with Unusual Arguments", - "description": "Identifies unusual instances of Control Panel with suspicious keywords or paths in the process command line value. Adversaries may abuse control.exe to proxy execution of malicious code.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.joesandbox.com/analysis/476188/1/html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.002", - "name": "Control Panel", - "reference": "https://attack.mitre.org/techniques/T1218/002/" - } - ] - } - ] - } - ], - "id": "364a567c-89be-4a9f-acc3-7f50deefb602", - "rule_id": "416697ae-e468-4093-a93d-59661fa619ec", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.executable : (\"?:\\\\Windows\\\\SysWOW64\\\\control.exe\", \"?:\\\\Windows\\\\System32\\\\control.exe\") and\n process.command_line :\n (\"*.jpg*\",\n \"*.png*\",\n \"*.gif*\",\n \"*.bmp*\",\n \"*.jpeg*\",\n \"*.TIFF*\",\n \"*.inf*\",\n \"*.cpl:*/*\",\n \"*../../..*\",\n \"*/AppData/Local/*\",\n \"*:\\\\Users\\\\Public\\\\*\",\n \"*\\\\AppData\\\\Local\\\\*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Linux User Added to Privileged Group", - "description": "Identifies attempts to add a user to a privileged group. Attackers may add users to a privileged group in order to establish persistence on a system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Linux User User Added to Privileged Group\n\nThe `usermod`, `adduser`, and `gpasswd` commands can be used to assign user accounts to new groups in Linux-based operating systems.\n\nAttackers may add users to a privileged group in order to escalate privileges or establish persistence on a system or domain.\n\nThis rule identifies the usages of `usermod`, `adduser` and `gpasswd` to assign user accounts to a privileged group.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible investigation steps\n\n- Investigate whether the user was succesfully added to the privileged group.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific User\",\"query\":\"SELECT * FROM users WHERE username = {{user.name}}\"}}\n- Investigate whether the user is currently logged in and active.\n - !{osquery{\"label\":\"Osquery - Investigate the Account Authentication Status\",\"query\":\"SELECT * FROM logged_in_users WHERE user = {{user.name}}\"}}\n- Retrieve information about the privileged group to which the user was added.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific Group\",\"query\":\"SELECT * FROM groups WHERE groupname = {{group.name}}\"}}\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Adding accounts to a group is a common administrative task, so there is a high chance of the activity being legitimate. Before investigating further, verify that this activity is not benign.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Delete the account that seems to be involved in malicious activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/", - "subtechnique": [ - { - "id": "T1136.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1136/001/" - } - ] - } - ] - } - ], - "id": "f628cbab-7a65-42b9-a829-f105d56a21fc", - "rule_id": "43d6ec12-2b1c-47b5-8f35-e9de65551d3b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and\nprocess.parent.name == \"sudo\" and\nprocess.args in (\"root\", \"admin\", \"wheel\", \"staff\", \"sudo\",\n \"disk\", \"video\", \"shadow\", \"lxc\", \"lxd\") and\n(\n process.name in (\"usermod\", \"adduser\") or\n process.name == \"gpasswd\" and \n process.args in (\"-a\", \"--add\", \"-M\", \"--members\") \n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Startup Persistence by a Suspicious Process", - "description": "Identifies files written to or modified in the startup folder by commonly abused processes. Adversaries may use this technique to maintain persistence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Startup Persistence by a Suspicious Process\n\nThe Windows Startup folder is a special folder in Windows. Programs added to this folder are executed during account logon, without user interaction, providing an excellent way for attackers to maintain persistence.\n\nThis rule monitors for commonly abused processes writing to the Startup folder locations.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- Administrators may add programs to this mechanism via command-line shells. Before the further investigation, verify that this activity is not benign.\n\n### Related rules\n\n- Suspicious Startup Shell Folder Modification - c8b150f0-0164-475b-a75e-74b47800a9ff\n- Persistent Scripts in the Startup Directory - f7c4dc5a-a58d-491d-9f14-9b66507121c0\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - } - ] - } - ] - } - ], - "id": "b0fb92fd-48ce-418a-8bd6-5085b6f8c53b", - "rule_id": "440e2db4-bc7f-4c96-a068-65b78da59bde", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n user.domain != \"NT AUTHORITY\" and\n file.path : (\"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\*\",\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\StartUp\\\\*\") and\n process.name : (\"cmd.exe\",\n \"powershell.exe\",\n \"wmic.exe\",\n \"mshta.exe\",\n \"pwsh.exe\",\n \"cscript.exe\",\n \"wscript.exe\",\n \"regsvr32.exe\",\n \"RegAsm.exe\",\n \"rundll32.exe\",\n \"EQNEDT32.EXE\",\n \"WINWORD.EXE\",\n \"EXCEL.EXE\",\n \"POWERPNT.EXE\",\n \"MSPUB.EXE\",\n \"MSACCESS.EXE\",\n \"iexplore.exe\",\n \"InstallUtil.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Multiple Vault Web Credentials Read", - "description": "Windows Credential Manager allows you to create, view, or delete saved credentials for signing into websites, connected applications, and networks. An adversary may abuse this to list or dump credentials stored in the Credential Manager for saved usernames and passwords. This may also be performed in preparation of lateral movement.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "", - "version": 8, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=5382", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - }, - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/", - "subtechnique": [ - { - "id": "T1555.004", - "name": "Windows Credential Manager", - "reference": "https://attack.mitre.org/techniques/T1555/004/" - } - ] - } - ] - } - ], - "id": "061a8dd9-fafa-4d36-bd5f-54cfc8f924a9", - "rule_id": "44fc462c-1159-4fa8-b1b7-9b6296ab4f96", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.Resource", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.SchemaFriendlyName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectLogonId", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.process.pid", - "type": "long", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "sequence by winlog.computer_name, winlog.process.pid with maxspan=1s\n\n /* 2 consecutive vault reads from same pid for web creds */\n\n [any where event.code : \"5382\" and\n (winlog.event_data.SchemaFriendlyName : \"Windows Web Password Credential\" and winlog.event_data.Resource : \"http*\") and\n not winlog.event_data.SubjectLogonId : \"0x3e7\" and \n not winlog.event_data.Resource : \"http://localhost/\"]\n\n [any where event.code : \"5382\" and\n (winlog.event_data.SchemaFriendlyName : \"Windows Web Password Credential\" and winlog.event_data.Resource : \"http*\") and\n not winlog.event_data.SubjectLogonId : \"0x3e7\" and \n not winlog.event_data.Resource : \"http://localhost/\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Encrypting Files with WinRar or 7z", - "description": "Identifies use of WinRar or 7z to create an encrypted files. Adversaries will often compress and encrypt data in preparation for exfiltration.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Encrypting Files with WinRar or 7z\n\nAttackers may compress and/or encrypt data collected before exfiltration. Compressing the data can help obfuscate the collected data and minimize the amount of data sent over the network. Encryption can be used to hide information that is being exfiltrated from detection or make exfiltration less apparent upon inspection by a defender.\n\nThese steps are usually done in preparation for exfiltration, meaning the attack may be in its final stages.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Retrieve the encrypted file.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check if the password used in the encryption was included in the command line.\n- Decrypt the `.rar`/`.zip` and check if the information is sensitive.\n- If the password is not available, and the format is `.zip` or the option used in WinRAR is not the `-hp`, list the file names included in the encrypted file.\n- Investigate if the file was transferred to an attacker-controlled server.\n\n### False positive analysis\n\n- Backup software can use these utilities. Check the `process.parent.executable` and `process.parent.command_line` fields to determine what triggered the encryption.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Prioritize cases that involve personally identifiable information (PII) or other classified data.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.welivesecurity.com/2020/12/02/turla-crutch-keeping-back-door-open/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1560", - "name": "Archive Collected Data", - "reference": "https://attack.mitre.org/techniques/T1560/", - "subtechnique": [ - { - "id": "T1560.001", - "name": "Archive via Utility", - "reference": "https://attack.mitre.org/techniques/T1560/001/" - } - ] - }, - { - "id": "T1005", - "name": "Data from Local System", - "reference": "https://attack.mitre.org/techniques/T1005/" - } - ] - } - ], - "id": "1344a997-bf10-4eca-beda-ec2ac69311e5", - "rule_id": "45d273fb-1dca-457d-9855-bcb302180c21", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n ((process.name:\"rar.exe\" or process.code_signature.subject_name == \"win.rar GmbH\" or\n process.pe.original_file_name == \"Command line RAR\") and\n process.args == \"a\" and process.args : (\"-hp*\", \"-p*\", \"-dw\", \"-tb\", \"-ta\", \"/hp*\", \"/p*\", \"/dw\", \"/tb\", \"/ta\"))\n\n or\n (process.pe.original_file_name in (\"7z.exe\", \"7za.exe\") and\n process.args == \"a\" and process.args : (\"-p*\", \"-sdel\"))\n\n /* uncomment if noisy for backup software related FPs */\n /* not process.parent.executable : (\"C:\\\\Program Files\\\\*.exe\", \"C:\\\\Program Files (x86)\\\\*.exe\") */\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Local NTLM Relay via HTTP", - "description": "Identifies attempt to coerce a local NTLM authentication via HTTP using the Windows Printer Spooler service as a target. An adversary may use this primitive in combination with other techniques to elevate privileges on a compromised system.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/med0x2e/NTLMRelay2Self", - "https://github.com/topotam/PetitPotam", - "https://github.com/dirkjanm/krbrelayx/blob/master/printerbug.py" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1212", - "name": "Exploitation for Credential Access", - "reference": "https://attack.mitre.org/techniques/T1212/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.011", - "name": "Rundll32", - "reference": "https://attack.mitre.org/techniques/T1218/011/" - } - ] - } - ] - } - ], - "id": "a2eb0fdd-e3c7-4282-a201-e9a8e5eb2711", - "rule_id": "4682fd2c-cfae-47ed-a543-9bed37657aa6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"rundll32.exe\" and\n\n /* Rundll32 WbeDav Client */\n process.args : (\"?:\\\\Windows\\\\System32\\\\davclnt.dll,DavSetCookie\", \"?:\\\\Windows\\\\SysWOW64\\\\davclnt.dll,DavSetCookie\") and\n\n /* Access to named pipe via http */\n process.args : (\"http*/print/pipe/*\", \"http*/pipe/spoolss\", \"http*/pipe/srvsvc\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Remote Registry Access via SeBackupPrivilege", - "description": "Identifies remote access to the registry using an account with Backup Operators group membership. This may indicate an attempt to exfiltrate credentials by dumping the Security Account Manager (SAM) registry hive in preparation for credential access and privileges elevation.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Remote Registry Access via SeBackupPrivilege\n\nSeBackupPrivilege is a privilege that allows file content retrieval, designed to enable users to create backup copies of the system. Since it is impossible to make a backup of something you cannot read, this privilege comes at the cost of providing the user with full read access to the file system. This privilege must bypass any access control list (ACL) placed in the system.\n\nThis rule identifies remote access to the registry using an account with Backup Operators group membership. This may indicate an attempt to exfiltrate credentials by dumping the Security Account Manager (SAM) registry hive in preparation for credential access and privileges elevation.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the activities done by the subject user the login session. The field `winlog.event_data.SubjectLogonId` can be used to get this data.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate abnormal behaviors observed by the subject user such as network connections, registry or file modifications, and processes created.\n- Investigate if the registry file was retrieved or exfiltrated.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Limit or disable the involved user account to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring", - "Data Source: Active Directory" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/mpgn/BackupOperatorToDA", - "https://raw.githubusercontent.com/Wh04m1001/Random/main/BackupOperators.cpp", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.002", - "name": "Security Account Manager", - "reference": "https://attack.mitre.org/techniques/T1003/002/" - }, - { - "id": "T1003.004", - "name": "LSA Secrets", - "reference": "https://attack.mitre.org/techniques/T1003/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - } - ], - "id": "ab76129b-2529-4288-b804-942c49c4753e", - "rule_id": "47e22836-4a16-4b35-beee-98f6c4ee9bf2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.PrivilegeList", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.RelativeTargetName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectLogonId", - "type": "keyword", - "ecs": false - } - ], - "setup": "The 'Audit Detailed File Share' audit policy is required be configured (Success) on Domain Controllers and Sensitive Windows Servers.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nObject Access >\nAudit Detailed File Share (Success)\n```\n\nThe 'Special Logon' audit policy must be configured (Success).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nLogon/Logoff >\nSpecial Logon (Success)\n```", - "type": "eql", - "query": "sequence by winlog.computer_name, winlog.event_data.SubjectLogonId with maxspan=1m\n [iam where event.action == \"logged-in-special\" and\n winlog.event_data.PrivilegeList : \"SeBackupPrivilege\" and\n\n /* excluding accounts with existing privileged access */\n not winlog.event_data.PrivilegeList : \"SeDebugPrivilege\"]\n [any where event.action == \"Detailed File Share\" and winlog.event_data.RelativeTargetName : \"winreg\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Microsoft Exchange Server UM Spawning Suspicious Processes", - "description": "Identifies suspicious processes being spawned by the Microsoft Exchange Server Unified Messaging (UM) service. This activity has been observed exploiting CVE-2021-26857.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Legitimate processes may be spawned from the Microsoft Exchange Server Unified Messaging (UM) service. If known processes are causing false positives, they can be exempted from the rule." - ], - "references": [ - "https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers", - "https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "ad3c300e-a931-44ba-828d-fa3d9c499aaf", - "rule_id": "483c4daf-b0c6-49e0-adf3-0bfa93231d6b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"UMService.exe\", \"UMWorkerProcess.exe\") and\n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\werfault.exe\",\n \"?:\\\\Windows\\\\System32\\\\wermgr.exe\",\n \"?:\\\\Program Files\\\\Microsoft\\\\Exchange Server\\\\V??\\\\Bin\\\\UMWorkerProcess.exe\",\n \"D:\\\\Exchange 2016\\\\Bin\\\\UMWorkerProcess.exe\",\n \"E:\\\\ExchangeServer\\\\Bin\\\\UMWorkerProcess.exe\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Multiple Logon Failure from the same Source Address", - "description": "Identifies multiple consecutive logon failures from the same source address and within a short time interval. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to accounts.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Multiple Logon Failure from the same Source Address\n\nAdversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to guess the password using a repetitive or iterative mechanism systematically. More details can be found [here](https://attack.mitre.org/techniques/T1110/001/).\n\nThis rule identifies potential password guessing/brute force activity from a single address.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the logon failure reason code and the targeted user names.\n - Prioritize the investigation if the account is critical or has administrative privileges over the domain.\n- Investigate the source IP address of the failed Network Logon attempts.\n - Identify whether these attempts are coming from the internet or are internal.\n- Investigate other alerts associated with the involved users and source host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Examine the source host for derived artifacts that indicate compromise:\n - Observe and collect information about the following activities in the alert source host:\n - Attempts to contact external domains and addresses.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the host which is the source of this activity\n\n### False positive analysis\n\n- Understand the context of the authentications by contacting the asset owners. This activity can be related to a new or existing automation or business process that is in a failing state.\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Domain trust relationship issues.\n- Infrastructure or availability issues.\n\n### Related rules\n\n- Multiple Logon Failure Followed by Logon Success - 4e85dc8a-3e41-40d8-bc28-91af7ac6cf60\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the source host to prevent further post-compromise behavior.\n- If the asset is exposed to the internet with RDP or other remote services available, take the necessary measures to restrict access to the asset. If not possible, limit the access via the firewall to only the needed IP addresses. Also, ensure the system uses robust authentication mechanisms and is patched regularly.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n-", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625", - "https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4624", - "https://social.technet.microsoft.com/Forums/ie/en-US/c82ac4f3-a235-472c-9fd3-53aa646cfcfd/network-information-missing-in-event-id-4624?forum=winserversecurity", - "https://serverfault.com/questions/379092/remote-desktop-failed-logon-event-4625-not-logging-ip-address-on-2008-terminal-s/403638#403638" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/", - "subtechnique": [ - { - "id": "T1110.001", - "name": "Password Guessing", - "reference": "https://attack.mitre.org/techniques/T1110/001/" - }, - { - "id": "T1110.003", - "name": "Password Spraying", - "reference": "https://attack.mitre.org/techniques/T1110/003/" - } - ] - } - ] - } - ], - "id": "365daa9e-557a-4b8e-a2c3-522d08535990", - "rule_id": "48b6edfc-079d-4907-b43c-baffa243270d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.Status", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.logon.type", - "type": "unknown", - "ecs": false - } - ], - "setup": "In some cases the source network address in Windows events 4625/4624 is not populated due to Microsoft logging limitations (examples in the references links). This edge case will break the rule condition and it won't trigger an alert.", - "type": "eql", - "query": "sequence by winlog.computer_name, source.ip with maxspan=10s\n [authentication where event.action == \"logon-failed\" and\n /* event 4625 need to be logged */\n winlog.logon.type : \"Network\" and\n source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and\n not user.name : (\"ANONYMOUS LOGON\", \"-\", \"*$\") and not user.domain == \"NT AUTHORITY\" and\n\n /*\n noisy failure status codes often associated to authentication misconfiguration :\n 0xC000015B - The user has not been granted the requested logon type (also called the logon right) at this machine.\n 0XC000005E\t- There are currently no logon servers available to service the logon request.\n 0XC0000133\t- Clocks between DC and other computer too far out of sync.\n 0XC0000192\tAn attempt was made to logon, but the Netlogon service was not started.\n */\n not winlog.event_data.Status : (\"0xC000015B\", \"0XC000005E\", \"0XC0000133\", \"0XC0000192\")] with runs=10\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Potential Linux Backdoor User Account Creation", - "description": "Identifies the attempt to create a new backdoor user by setting the user's UID to 0. Attackers may alter a user's UID to 0 to establish persistence on a system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Linux Backdoor User Account Creation\n\nThe `usermod` command is used to modify user account attributes and settings in Linux-based operating systems.\n\nAttackers may create new accounts with a UID of 0 to maintain root access to target systems without leveraging the root user account.\n\nThis rule identifies the usage of the `usermod` command to set a user's UID to 0, indicating that the user becomes a root account. \n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible investigation steps\n- Investigate the user account that got assigned a uid of 0, and analyze its corresponding attributes.\n - !{osquery{\"label\":\"Osquery - Retrieve User Accounts with a UID of 0\",\"query\":\"SELECT description, gid, gid_signed, shell, uid, uid_signed, username FROM users WHERE username != 'root' AND uid LIKE '0'\"}}\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Identify the user account that performed the action, analyze it, and check whether it should perform this kind of action.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific User\",\"query\":\"SELECT * FROM users WHERE username = {{user.name}}\"}}\n- Investigate whether the user is currently logged in and active.\n - !{osquery{\"label\":\"Osquery - Investigate the Account Authentication Status\",\"query\":\"SELECT * FROM logged_in_users WHERE user = {{user.name}}\"}}\n- Identify if the account was added to privileged groups or assigned special privileges after creation.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific Group\",\"query\":\"SELECT * FROM groups WHERE groupname = {{group.name}}\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Delete the created account.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/", - "subtechnique": [ - { - "id": "T1136.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1136/001/" - } - ] - } - ] - } - ], - "id": "31c5c7a8-8026-4110-b6eb-3c16f66b6583", - "rule_id": "494ebba4-ecb7-4be4-8c6f-654c686549ad", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and\nevent.action in (\"exec\", \"exec_event\") and process.name == \"usermod\" and\nprocess.args : \"-u\" and process.args : \"0\" and process.args : \"-o\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Possible FIN7 DGA Command and Control Behavior", - "description": "This rule detects a known command and control pattern in network events. The FIN7 threat group is known to use this command and control technique, while maintaining persistence in their target's network.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\nIn the event this rule identifies benign domains in your environment, the `destination.domain` field in the rule can be modified to include those domains. Example: `...AND NOT destination.domain:(zoom.us OR benign.domain1 OR benign.domain2)`.", - "version": 104, - "tags": [ - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Domain: Endpoint" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "This rule could identify benign domains that are formatted similarly to FIN7's command and control algorithm. Alerts should be investigated by an analyst to assess the validity of the individual observations." - ], - "references": [ - "https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - }, - { - "id": "T1568", - "name": "Dynamic Resolution", - "reference": "https://attack.mitre.org/techniques/T1568/", - "subtechnique": [ - { - "id": "T1568.002", - "name": "Domain Generation Algorithms", - "reference": "https://attack.mitre.org/techniques/T1568/002/" - } - ] - } - ] - } - ], - "id": "7d847d49-a1a2-44c6-b197-e659c43b136c", - "rule_id": "4a4e23cf-78a2-449c-bac3-701924c269d3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: (network_traffic.tls OR network_traffic.http) or\n (event.category: (network OR network_traffic) AND type: (tls OR http) AND network.transport: tcp)) AND\ndestination.domain:/[a-zA-Z]{4,5}\\.(pw|us|club|info|site|top)/ AND NOT destination.domain:zoom.us\n", - "language": "lucene" - }, - { - "name": "Kernel Load or Unload via Kexec Detected", - "description": "This detection rule identifies the usage of kexec, helping to uncover unauthorized kernel replacements and potential compromise of the system's integrity. Kexec is a Linux feature that enables the loading and execution of a different kernel without going through the typical boot process. Malicious actors can abuse kexec to bypass security measures, escalate privileges, establish persistence or hide their activities by loading a malicious kernel, enabling them to tamper with the system's trusted state, allowing e.g. a VM Escape.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.crowdstrike.com/blog/venom-vulnerability-details/", - "https://www.makeuseof.com/what-is-venom-vulnerability/", - "https://madaidans-insecurities.github.io/guides/linux-hardening.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1611", - "name": "Escape to Host", - "reference": "https://attack.mitre.org/techniques/T1611/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.006", - "name": "Kernel Modules and Extensions", - "reference": "https://attack.mitre.org/techniques/T1547/006/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1601", - "name": "Modify System Image", - "reference": "https://attack.mitre.org/techniques/T1601/", - "subtechnique": [ - { - "id": "T1601.001", - "name": "Patch System Image", - "reference": "https://attack.mitre.org/techniques/T1601/001/" - } - ] - } - ] - } - ], - "id": "d27c06f6-5e30-4175-9c32-e6cc7a2bbef2", - "rule_id": "4d4c35f4-414e-4d0c-bb7e-6db7c80a6957", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and process.name == \"kexec\" and \nprocess.args in (\"--exec\", \"-e\", \"--load\", \"-l\", \"--unload\", \"-u\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "AWS Management Console Brute Force of Root User Identity", - "description": "Identifies a high number of failed authentication attempts to the AWS management console for the Root user identity. An adversary may attempt to brute force the password for the Root user identity, as it has complete access to all services and resources for the AWS account.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-20m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false positives." - ], - "references": [ - "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "6b8edb3d-de77-41c7-86b3-58481c6b603d", - "rule_id": "4d50a94f-2844-43fa-8395-6afbd5e1c5ef", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "aws.cloudtrail.user_identity.type", - "type": "keyword", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "threshold", - "query": "event.dataset:aws.cloudtrail and event.provider:signin.amazonaws.com and event.action:ConsoleLogin and aws.cloudtrail.user_identity.type:Root and event.outcome:failure\n", - "threshold": { - "field": [ - "cloud.account.id" - ], - "value": 10 - }, - "index": [ - "filebeat-*", - "logs-aws*" - ], - "language": "kuery" - }, - { - "name": "Disable Windows Event and Security Logs Using Built-in Tools", - "description": "Identifies attempts to disable EventLog via the logman Windows utility, PowerShell, or auditpol. This is often done by attackers in an attempt to evade detection on a system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Disable Windows Event and Security Logs Using Built-in Tools\n\nWindows event logs are a fundamental data source for security monitoring, forensics, and incident response. Adversaries can tamper, clear, and delete this data to break SIEM detections, cover their tracks, and slow down incident response.\n\nThis rule looks for the usage of different utilities to disable the EventLog service or specific event logs.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Investigate the event logs prior to the action for suspicious behaviors that an attacker may be trying to cover up.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Re-enable affected logging components, services, and security monitoring.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Ivan Ninichuck", - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/logman", - "https://medium.com/palantir/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.001", - "name": "Clear Windows Event Logs", - "reference": "https://attack.mitre.org/techniques/T1070/001/" - } - ] - }, - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.002", - "name": "Disable Windows Event Logging", - "reference": "https://attack.mitre.org/techniques/T1562/002/" - }, - { - "id": "T1562.006", - "name": "Indicator Blocking", - "reference": "https://attack.mitre.org/techniques/T1562/006/" - } - ] - } - ] - } - ], - "id": "e89951c6-3d4a-45e9-ac6e-7eca2bfe927c", - "rule_id": "4de76544-f0e5-486a-8f84-eae0b6063cdc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n ((process.name:\"logman.exe\" or process.pe.original_file_name == \"Logman.exe\") and\n process.args : \"EventLog-*\" and process.args : (\"stop\", \"delete\")) or\n\n ((process.name : (\"pwsh.exe\", \"powershell.exe\", \"powershell_ise.exe\") or process.pe.original_file_name in\n (\"pwsh.exe\", \"powershell.exe\", \"powershell_ise.exe\")) and\n\tprocess.args : \"Set-Service\" and process.args: \"EventLog\" and process.args : \"Disabled\") or\n\n ((process.name:\"auditpol.exe\" or process.pe.original_file_name == \"AUDITPOL.EXE\") and process.args : \"/success:disable\")\n)\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Multiple Logon Failure Followed by Logon Success", - "description": "Identifies multiple logon failures followed by a successful one from the same source address. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to accounts.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Multiple Logon Failure Followed by Logon Success\n\nAdversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to guess the password using a repetitive or iterative mechanism systematically. More details can be found [here](https://attack.mitre.org/techniques/T1110/001/).\n\nThis rule identifies potential password guessing/brute force activity from a single address, followed by a successful logon, indicating that an attacker potentially successfully compromised the account.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the logon failure reason code and the targeted user name.\n - Prioritize the investigation if the account is critical or has administrative privileges over the domain.\n- Investigate the source IP address of the failed Network Logon attempts.\n - Identify whether these attempts are coming from the internet or are internal.\n- Investigate other alerts associated with the involved users and source host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Examine the source host for derived artifacts that indicate compromise:\n - Observe and collect information about the following activities in the alert source host:\n - Attempts to contact external domains and addresses.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the host which is the source of this activity.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Domain trust relationship issues.\n- Infrastructure or availability issues.\n\n### Related rules\n\n- Multiple Logon Failure from the same Source Address - 48b6edfc-079d-4907-b43c-baffa243270d\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the source host to prevent further post-compromise behavior.\n- If the asset is exposed to the internet with RDP or other remote services available, take the necessary measures to restrict access to the asset. If not possible, limit the access via the firewall to only the needed IP addresses. Also, ensure the system uses robust authentication mechanisms and is patched regularly.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/", - "subtechnique": [ - { - "id": "T1110.001", - "name": "Password Guessing", - "reference": "https://attack.mitre.org/techniques/T1110/001/" - }, - { - "id": "T1110.003", - "name": "Password Spraying", - "reference": "https://attack.mitre.org/techniques/T1110/003/" - } - ] - } - ] - } - ], - "id": "c04339dc-21d5-4f19-ad3f-a62b95330a3b", - "rule_id": "4e85dc8a-3e41-40d8-bc28-91af7ac6cf60", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.Status", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.logon.type", - "type": "unknown", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "sequence by winlog.computer_name, source.ip with maxspan=5s\n [authentication where event.action == \"logon-failed\" and\n /* event 4625 need to be logged */\n winlog.logon.type : \"Network\" and\n source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and\n not user.name : (\"ANONYMOUS LOGON\", \"-\", \"*$\") and not user.domain == \"NT AUTHORITY\" and\n\n /* noisy failure status codes often associated to authentication misconfiguration */\n not winlog.event_data.Status : (\"0xC000015B\", \"0XC000005E\", \"0XC0000133\", \"0XC0000192\")] with runs=5\n [authentication where event.action == \"logged-in\" and\n /* event 4624 need to be logged */\n winlog.logon.type : \"Network\" and\n source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and\n not user.name : (\"ANONYMOUS LOGON\", \"-\", \"*$\") and not user.domain == \"NT AUTHORITY\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Execution via MSSQL xp_cmdshell Stored Procedure", - "description": "Identifies execution via MSSQL xp_cmdshell stored procedure. Malicious users may attempt to elevate their privileges by using xp_cmdshell, which is disabled by default, thus, it's important to review the context of it's use.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Execution via MSSQL xp_cmdshell Stored Procedure\n\nMicrosoft SQL Server (MSSQL) has procedures meant to extend its functionality, the Extended Stored Procedures. These procedures are external functions written in C/C++; some provide interfaces for external programs. This is the case for xp_cmdshell, which spawns a Windows command shell and passes in a string for execution. Attackers can use this to execute commands on the system running the SQL server, commonly to escalate their privileges and establish persistence.\n\nThe xp_cmdshell procedure is disabled by default, but when used, it has the same security context as the MSSQL Server service account, which is often privileged.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the command line to determine if the command executed is potentially harmful or malicious.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n\n### False positive analysis\n\n- This mechanism can be used legitimately, but it brings inherent risk. The security team must monitor any activity of it. If recurrent tasks are being executed using this mechanism, consider adding exceptions — preferably with a full command line.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Ensure that SQL servers are not directly exposed to the internet. If there is a business justification for such, use an allowlist to allow only connections from known legitimate sources.\n- Disable the xp_cmdshell stored procedure.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1505", - "name": "Server Software Component", - "reference": "https://attack.mitre.org/techniques/T1505/", - "subtechnique": [ - { - "id": "T1505.001", - "name": "SQL Stored Procedures", - "reference": "https://attack.mitre.org/techniques/T1505/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - } - ], - "id": "8d657d1e-537f-49a2-ab7d-e95c5c3e7f02", - "rule_id": "4ed493fc-d637-4a36-80ff-ac84937e5461", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"sqlservr.exe\" and \n (\n (process.name : \"cmd.exe\" and \n not process.args : (\"\\\\\\\\*\", \"diskfree\", \"rmdir\", \"mkdir\", \"dir\", \"del\", \"rename\", \"bcp\", \"*XMLNAMESPACES*\", \n \"?:\\\\MSSQL\\\\Backup\\\\Jobs\\\\sql_agent_backup_job.ps1\", \"K:\\\\MSSQL\\\\Backup\\\\msdb\", \"K:\\\\MSSQL\\\\Backup\\\\Logins\")) or \n \n (process.name : \"vpnbridge.exe\" or process.pe.original_file_name : \"vpnbridge.exe\") or \n\n (process.name : \"certutil.exe\" or process.pe.original_file_name == \"CertUtil.exe\") or \n\n (process.name : \"bitsadmin.exe\" or process.pe.original_file_name == \"bitsadmin.exe\")\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Script Object Execution", - "description": "Identifies scrobj.dll loaded into unusual Microsoft processes. This usually means a malicious scriptlet is being executed in the target process.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.010", - "name": "Regsvr32", - "reference": "https://attack.mitre.org/techniques/T1218/010/" - } - ] - } - ] - } - ], - "id": "13c17606-823b-4b55-8547-8aa0ba2fa5e1", - "rule_id": "4ed678a9-3a4f-41fb-9fea-f85a6e0a0dff", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id with maxspan=2m\n [process where host.os.type == \"windows\" and event.type == \"start\"\n and (process.code_signature.subject_name in (\"Microsoft Corporation\", \"Microsoft Windows\") and\n process.code_signature.trusted == true) and\n not process.executable : (\n \"?:\\\\Windows\\\\System32\\\\cscript.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\cscript.exe\",\n \"?:\\\\Program Files (x86)\\\\Internet Explorer\\\\iexplore.exe\",\n \"?:\\\\Program Files\\\\Internet Explorer\\\\iexplore.exe\",\n \"?:\\\\Windows\\\\SystemApps\\\\Microsoft.MicrosoftEdge_*\\\\MicrosoftEdge.exe\",\n \"?:\\\\Windows\\\\system32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\smartscreen.exe\",\n \"?:\\\\Windows\\\\system32\\\\taskhostw.exe\",\n \"?:\\\\windows\\\\system32\\\\inetsrv\\\\w3wp.exe\",\n \"?:\\\\windows\\\\SysWOW64\\\\inetsrv\\\\w3wp.exe\",\n \"?:\\\\Windows\\\\system32\\\\wscript.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\wscript.exe\",\n \"?:\\\\Windows\\\\system32\\\\mobsync.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\mobsync.exe\",\n \"?:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\cmd.exe\")]\n [library where host.os.type == \"windows\" and event.type == \"start\" and dll.name : \"scrobj.dll\"]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Execution via TSClient Mountpoint", - "description": "Identifies execution from the Remote Desktop Protocol (RDP) shared mountpoint tsclient on the target host. This may indicate a lateral movement attempt.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://posts.specterops.io/revisiting-remote-desktop-lateral-movement-8fb905cb46c3" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.001", - "name": "Remote Desktop Protocol", - "reference": "https://attack.mitre.org/techniques/T1021/001/" - } - ] - } - ] - } - ], - "id": "a7ea98bc-d0f8-44c9-9795-a363c220e7ef", - "rule_id": "4fe9d835-40e1-452d-8230-17c147cafad8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.executable : \"\\\\Device\\\\Mup\\\\tsclient\\\\*.exe\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Registry Persistence via AppCert DLL", - "description": "Detects attempts to maintain persistence by creating registry keys using AppCert DLLs. AppCert DLLs are loaded by every process using the common API functions to create processes.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.009", - "name": "AppCert DLLs", - "reference": "https://attack.mitre.org/techniques/T1546/009/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.009", - "name": "AppCert DLLs", - "reference": "https://attack.mitre.org/techniques/T1546/009/" - } - ] - } - ] - } - ], - "id": "6a69eaca-0b68-4c1a-bb57-ba0ce9f64816", - "rule_id": "513f0ffd-b317-4b9c-9494-92ce861f22c7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n/* uncomment once stable length(bytes_written_string) > 0 and */\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Session Manager\\\\AppCertDLLs\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Session Manager\\\\AppCertDLLs\\\\*\"\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Incoming DCOM Lateral Movement with MMC", - "description": "Identifies the use of Distributed Component Object Model (DCOM) to run commands from a remote host, which are launched via the MMC20 Application COM Object. This behavior may indicate an attacker abusing a DCOM application to move laterally.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.003", - "name": "Distributed Component Object Model", - "reference": "https://attack.mitre.org/techniques/T1021/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.014", - "name": "MMC", - "reference": "https://attack.mitre.org/techniques/T1218/014/" - } - ] - } - ] - } - ], - "id": "2973a8d8-0d0b-4207-bfd8-714b0dd6d64d", - "rule_id": "51ce96fb-9e52-4dad-b0ba-99b54440fc9a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "source.port", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=1m\n [network where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"mmc.exe\" and source.port >= 49152 and\n destination.port >= 49152 and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\"\n ] by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"mmc.exe\"\n ] by process.parent.entity_id\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "AWS GuardDuty Detector Deletion", - "description": "Identifies the deletion of an Amazon GuardDuty detector. Upon deletion, GuardDuty stops monitoring the environment and all existing findings are lost.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "The GuardDuty detector may be deleted by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Detector deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/guardduty/delete-detector.html", - "https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DeleteDetector.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "212fb504-849d-4786-ae10-6dc03fd2f6ed", - "rule_id": "523116c0-d89d-4d7c-82c2-39e6845a78ef", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:guardduty.amazonaws.com and event.action:DeleteDetector and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Suspicious Network Activity to the Internet by Previously Unknown Executable", - "description": "This rule monitors for network connectivity to the internet from a previously unknown executable located in a suspicious directory to a previously unknown destination ip. An alert from this rule can indicate the presence of potentially malicious activity, such as the execution of unauthorized or suspicious processes attempting to establish connections to unknown or suspicious destinations such as a command and control server. Detecting and investigating such behavior can help identify and mitigate potential security threats, protecting the system and its data from potential compromise.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-59m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - } - ], - "id": "fa788af4-7309-42ec-aaad-9e502f4c87d4", - "rule_id": "53617418-17b4-4e9c-8a2c-8deb8086ca4b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type:linux and event.category:network and event.action:(connection_attempted or ipv4_connection_attempt_event) and \nprocess.executable:(\n (/etc/crontab or /etc/rc.local or ./* or /boot/* or /dev/shm/* or /etc/cron.*/* or /etc/init.d/* or /etc/rc*.d/* or \n /etc/update-motd.d/* or /home/*/.* or /run/* or /srv/* or /tmp/* or /usr/lib/update-notifier/* or /var/tmp/*\n ) and not (/tmp/newroot/* or /tmp/snap.rootfs*)\n ) and \nsource.ip:(10.0.0.0/8 or 127.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and \nnot process.name:(\n apt or chrome or curl or dnf or dockerd or dpkg or firefox-bin or java or kite-update or kited or node or rpm or\n saml2aws or wget or yum or ansible* or aws* or php* or pip* or python* or steam* or terraform*\n) and \nnot destination.ip:(\n 10.0.0.0/8 or 100.64.0.0/10 or 127.0.0.0/8 or 169.254.0.0/16 or 172.16.0.0/12 or 192.0.0.0/24 or 192.0.0.0/29 or \n 192.0.0.10/32 or 192.0.0.170/32 or 192.0.0.171/32 or 192.0.0.8/32 or 192.0.0.9/32 or 192.0.2.0/24 or \n 192.168.0.0/16 or 192.175.48.0/24 or 192.31.196.0/24 or 192.52.193.0/24 or 192.88.99.0/24 or 198.18.0.0/15 or \n 198.51.100.0/24 or 203.0.113.0/24 or 224.0.0.0/4 or 240.0.0.0/4 or \"::1\" or \"FE80::/10\" or \"FF00::/8\"\n)\n", - "new_terms_fields": [ - "host.id", - "destination.ip", - "process.executable" - ], - "history_window_start": "now-14d", - "index": [ - "auditbeat-*", - "filebeat-*", - "packetbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "AWS EFS File System or Mount Deleted", - "description": "Detects when an EFS File System or Mount is deleted. An adversary could break any file system using the mount target that is being deleted, which might disrupt instances or applications using those mounts. The mount must be deleted prior to deleting the File System, or the adversary will be unable to delete the File System.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "File System or Mount being deleted may be performed by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. File System Mount deletion by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/efs/latest/ug/API_DeleteFileSystem.html", - "https://docs.aws.amazon.com/efs/latest/ug/API_DeleteMountTarget.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - } - ], - "id": "f88d5583-9a3e-4ec1-ac87-3382de3705a1", - "rule_id": "536997f7-ae73-447d-a12d-bff1e8f5f0a0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:elasticfilesystem.amazonaws.com and\nevent.action:(DeleteMountTarget or DeleteFileSystem) and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Suspicious PDF Reader Child Process", - "description": "Identifies suspicious child processes of PDF reader applications. These child processes are often launched via exploitation of PDF applications or social engineering.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious PDF Reader Child Process\n\nPDF is a common file type used in corporate environments and most machines have software to handle these files. This creates a vector where attackers can exploit the engines and technology behind this class of software for initial access or privilege escalation.\n\nThis rule looks for commonly abused built-in utilities spawned by a PDF reader process, which is likely a malicious behavior.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve PDF documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Initial Access", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1203", - "name": "Exploitation for Client Execution", - "reference": "https://attack.mitre.org/techniques/T1203/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - } - ] - } - ] - } - ], - "id": "36bf8c36-3801-475d-a29f-07933c6d5f7d", - "rule_id": "53a26770-9cbd-40c5-8b57-61d01a325e14", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"AcroRd32.exe\",\n \"Acrobat.exe\",\n \"FoxitPhantomPDF.exe\",\n \"FoxitReader.exe\") and\n process.name : (\"arp.exe\", \"dsquery.exe\", \"dsget.exe\", \"gpresult.exe\", \"hostname.exe\", \"ipconfig.exe\", \"nbtstat.exe\",\n \"net.exe\", \"net1.exe\", \"netsh.exe\", \"netstat.exe\", \"nltest.exe\", \"ping.exe\", \"qprocess.exe\",\n \"quser.exe\", \"qwinsta.exe\", \"reg.exe\", \"sc.exe\", \"systeminfo.exe\", \"tasklist.exe\", \"tracert.exe\",\n \"whoami.exe\", \"bginfo.exe\", \"cdb.exe\", \"cmstp.exe\", \"csi.exe\", \"dnx.exe\", \"fsi.exe\", \"ieexec.exe\",\n \"iexpress.exe\", \"installutil.exe\", \"Microsoft.Workflow.Compiler.exe\", \"msbuild.exe\", \"mshta.exe\",\n \"msxsl.exe\", \"odbcconf.exe\", \"rcsi.exe\", \"regsvr32.exe\", \"xwizard.exe\", \"atbroker.exe\",\n \"forfiles.exe\", \"schtasks.exe\", \"regasm.exe\", \"regsvcs.exe\", \"cmd.exe\", \"cscript.exe\",\n \"powershell.exe\", \"pwsh.exe\", \"wmic.exe\", \"wscript.exe\", \"bitsadmin.exe\", \"certutil.exe\", \"ftp.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Uncommon Registry Persistence Change", - "description": "Detects changes to registry persistence keys that are not commonly used or modified by legitimate programs. This could be an indication of an adversary's attempt to persist in a stealthy manner.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "timeline_id": "3e47ef71-ebfc-4520-975c-cb27fc090799", - "timeline_title": "Comprehensive Registry Timeline", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.microsoftpressstore.com/articles/article.aspx?p=2762082&seqNum=2" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - } - ] - }, - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.002", - "name": "Screensaver", - "reference": "https://attack.mitre.org/techniques/T1546/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "189355a5-e010-4eaf-9738-69a8648e9858", - "rule_id": "54902e45-3467-49a4-8abc-529f2c8cfb80", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n /* uncomment once stable length(registry.data.strings) > 0 and */\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Terminal Server\\\\Install\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Terminal Server\\\\Install\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Runonce\\\\*\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\Load\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\Run\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\IconServiceLib\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\AppSetup\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Taskman\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Userinit\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\VmApplet\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\Shell\",\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logoff\\\\Script\",\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logon\\\\Script\",\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Shutdown\\\\Script\",\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Startup\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\Shell\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logoff\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logon\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Shutdown\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Startup\\\\Script\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Active Setup\\\\Installed Components\\\\*\\\\ShellComponent\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows CE Services\\\\AutoStartOnConnect\\\\MicrosoftActiveSync\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows CE Services\\\\AutoStartOnDisconnect\\\\MicrosoftActiveSync\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Ctf\\\\LangBarAddin\\\\*\\\\FilePath\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Exec\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Script\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Command Processor\\\\Autorun\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Ctf\\\\LangBarAddin\\\\*\\\\FilePath\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Exec\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Command Processor\\\\Autorun\",\n \"HKEY_USERS\\\\*\\\\Control Panel\\\\Desktop\\\\scrnsave.exe\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Image File Execution Options\\\\*\\\\VerifierDlls\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\GpExtensions\\\\*\\\\DllName\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\SafeBoot\\\\AlternateShell\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Terminal Server\\\\Wds\\\\rdpwd\\\\StartupPrograms\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Terminal Server\\\\WinStations\\\\RDP-Tcp\\\\InitialProgram\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Session Manager\\\\BootExecute\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Session Manager\\\\SetupExecute\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Session Manager\\\\Execute\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Session Manager\\\\S0InitialCommand\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\ServiceControlManagerExtension\",\n \"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\BootVerificationProgram\\\\ImagePath\",\n \"HKLM\\\\SYSTEM\\\\Setup\\\\CmdLine\",\n \"HKEY_USERS\\\\*\\\\Environment\\\\UserInitMprLogonScript\") and\n\n not registry.data.strings : (\"C:\\\\Windows\\\\system32\\\\userinit.exe\", \"cmd.exe\", \"C:\\\\Program Files (x86)\\\\*.exe\",\n \"C:\\\\Program Files\\\\*.exe\") and\n not (process.name : \"rundll32.exe\" and registry.path : \"*\\\\Software\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Script\") and\n not process.executable : (\"C:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"C:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\",\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\*\\\\MsMpEng.exe\",\n \"C:\\\\Program Files\\\\*.exe\",\n \"C:\\\\Program Files (x86)\\\\*.exe\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "PsExec Network Connection", - "description": "Identifies use of the SysInternals tool PsExec.exe making a network connection. This could be an indication of lateral movement.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PsExec Network Connection\n\nPsExec is a remote administration tool that enables the execution of commands with both regular and SYSTEM privileges on Windows systems. Microsoft develops it as part of the Sysinternals Suite. Although commonly used by administrators, PsExec is frequently used by attackers to enable lateral movement and execute commands as SYSTEM to disable defenses and bypass security protections.\n\nThis rule identifies PsExec execution by looking for the creation of `PsExec.exe`, the default name for the utility, followed by a network connection done by the process.\n\n#### Possible investigation steps\n\n- Check if the usage of this tool complies with the organization's administration policy.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Identify the target computer and its role in the IT environment.\n- Investigate what commands were run, and assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. As long as the analyst did not identify suspicious activity related to the user or involved hosts, and the tool is allowed by the organization's policy, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n - Prioritize cases involving critical servers and users.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Lateral Movement", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "PsExec is a dual-use tool that can be used for benign or malicious activity. It's important to baseline your environment to determine the amount of noise to expect from this tool." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1569", - "name": "System Services", - "reference": "https://attack.mitre.org/techniques/T1569/", - "subtechnique": [ - { - "id": "T1569.002", - "name": "Service Execution", - "reference": "https://attack.mitre.org/techniques/T1569/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.002", - "name": "SMB/Windows Admin Shares", - "reference": "https://attack.mitre.org/techniques/T1021/002/" - } - ] - }, - { - "id": "T1570", - "name": "Lateral Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1570/" - } - ] - } - ], - "id": "8f995afc-9d54-4114-bc48-3e0122bd6f2d", - "rule_id": "55d551c6-333b-4665-ab7e-5d14a59715ce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"PsExec.exe\" and event.type == \"start\" and\n\n /* This flag suppresses the display of the license dialog and may\n indicate that psexec executed for the first time in the machine */\n process.args : \"-accepteula\" and\n\n not process.executable : (\"?:\\\\ProgramData\\\\Docusnap\\\\Discovery\\\\discovery\\\\plugins\\\\17\\\\Bin\\\\psexec.exe\",\n \"?:\\\\Docusnap 11\\\\Bin\\\\psexec.exe\",\n \"?:\\\\Program Files\\\\Docusnap X\\\\Bin\\\\psexec.exe\",\n \"?:\\\\Program Files\\\\Docusnap X\\\\Tools\\\\dsDNS.exe\") and\n not process.parent.executable : \"?:\\\\Program Files (x86)\\\\Cynet\\\\Cynet Scanner\\\\CynetScanner.exe\"]\n [network where host.os.type == \"windows\" and process.name : \"PsExec.exe\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "PowerShell PSReflect Script", - "description": "Detects the use of PSReflect in PowerShell scripts. Attackers leverage PSReflect as a library that enables PowerShell to access win32 API functions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell PSReflect Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nPSReflect is a library that enables PowerShell to access win32 API functions in an uncomplicated way. It also helps to create enums and structs easily—all without touching the disk.\n\nAlthough this is an interesting project for every developer and admin out there, it is mainly used in the red team and malware tooling for its capabilities.\n\nDetecting the core implementation of PSReflect means detecting most of the tooling that uses Windows API through PowerShell, enabling defenders to discover tools being dropped in the environment.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics. The script content that may be split into multiple script blocks (you can use the field `powershell.file.script_block_id` for filtering).\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Check for additional PowerShell and command-line logs that indicate that imported functions were run.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the script using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- PowerShell Suspicious Discovery Related Windows API Functions - 61ac3638-40a3-44b2-855a-985636ca985e\n- PowerShell Keylogging Script - bd2c86a0-8b61-4457-ab38-96943984e889\n- PowerShell Suspicious Script with Audio Capture Capabilities - 2f2f4939-0b34-40c2-a0a3-844eb7889f43\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n- Suspicious .NET Reflection via PowerShell - e26f042e-c590-4e82-8e05-41e81bd822ad\n- PowerShell Suspicious Payload Encoded and Compressed - 81fe9dc6-a2d7-4192-a2d8-eed98afc766a\n- PowerShell Suspicious Script with Screenshot Capabilities - 959a7353-1129-4aa7-9084-30746b256a70\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate PowerShell scripts that make use of PSReflect to access the win32 API" - ], - "references": [ - "https://github.com/mattifestation/PSReflect/blob/master/PSReflect.psm1", - "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - }, - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - } - ], - "id": "a5bf6198-b9bb-4377-aa80-e265fe1936e2", - "rule_id": "56f2e9b5-4803-4e44-a0a4-a52dc79d57fe", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be configured (Enable).\n\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text:(\n \"New-InMemoryModule\" or\n \"Add-Win32Type\" or\n psenum or\n DefineDynamicAssembly or\n DefineDynamicModule or\n \"Reflection.TypeAttributes\" or\n \"Reflection.Emit.OpCodes\" or\n \"Reflection.Emit.CustomAttributeBuilder\" or\n \"Runtime.InteropServices.DllImportAttribute\"\n ) and\n not user.id : \"S-1-5-18\" and\n not file.path : ?\\:\\\\\\\\ProgramData\\\\\\\\MaaS360\\\\\\\\Cloud?Extender\\\\\\\\AR\\\\\\\\Scripts\\\\\\\\ASModuleCommon.ps1*\n", - "language": "kuery" - }, - { - "name": "Execution of an Unsigned Service", - "description": "This rule identifies the execution of unsigned executables via service control manager (SCM). Adversaries may abuse SCM to execute malware or escalate privileges.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1569", - "name": "System Services", - "reference": "https://attack.mitre.org/techniques/T1569/", - "subtechnique": [ - { - "id": "T1569.002", - "name": "Service Execution", - "reference": "https://attack.mitre.org/techniques/T1569/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - } - ] - } - ] - } - ], - "id": "ff9dd57f-9932-4241-80f4-513092d99b52", - "rule_id": "56fdfcf1-ca7c-4fd9-951d-e215ee26e404", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.exists", - "type": "boolean", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type:windows and event.category:process and event.type:start and \nprocess.parent.executable:\"C:\\\\Windows\\\\System32\\\\services.exe\" and \n(process.code_signature.exists:false or process.code_signature.trusted:false)\n", - "new_terms_fields": [ - "host.id", - "process.executable", - "user.id" - ], - "history_window_start": "now-14d", - "index": [ - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "VNC (Virtual Network Computing) from the Internet", - "description": "This rule detects network events that may indicate the use of VNC traffic from the Internet. VNC is commonly used by system administrators to remotely control a system for maintenance or to use shared resources. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Tactic: Command and Control", - "Domain: Endpoint", - "Use Case: Threat Detection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "VNC connections may be received directly to Linux cloud server instances but such connections are usually made only by engineers. VNC is less common than SSH or RDP but may be required by some work-flows such as remote access and support for specialized software products or servers. Such work-flows are usually known and not unexpected. Usage that is unfamiliar to server or network owners can be unexpected and suspicious." - ], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1219", - "name": "Remote Access Software", - "reference": "https://attack.mitre.org/techniques/T1219/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - } - ], - "id": "10cadfee-c1f7-438b-941c-7ddcb5f59ecb", - "rule_id": "5700cb81-df44-46aa-a5d7-337798f53eb8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and destination.port >= 5800 and destination.port <= 5810 and\n not source.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n ) and\n destination.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n )\n", - "language": "kuery" - }, - { - "name": "Deleting Backup Catalogs with Wbadmin", - "description": "Identifies use of the wbadmin.exe to delete the backup catalog. Ransomware and other malware may do this to prevent system recovery.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Deleting Backup Catalogs with Wbadmin\n\nWindows Server Backup stores the details about your backups (what volumes are backed up and where the backups are located) in a file called a backup catalog, which ransomware victims can use to recover corrupted backup files. Deleting these files is a common step in threat actor playbooks.\n\nThis rule identifies the deletion of the backup catalog using the `wbadmin.exe` utility.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Check if any files on the host machine have been encrypted.\n\n### False positive analysis\n\n- Administrators can use this command to delete corrupted catalogs, but overall the activity is unlikely to be legitimate.\n\n### Related rules\n\n- Third-party Backup Files Deleted via Unexpected Process - 11ea6bec-ebde-4d71-a8e9-784948f8e3e9\n- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921\n- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4\n- Volume Shadow Copy Deletion via WMIC - dc9c1f74-dac3-48e3-b47f-eb79db358f57\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.\n- If any backups were affected:\n - Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Impact", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1490", - "name": "Inhibit System Recovery", - "reference": "https://attack.mitre.org/techniques/T1490/" - }, - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - } - ], - "id": "64dac267-1bea-4080-8f8d-eee15c0d2746", - "rule_id": "581add16-df76-42bb-af8e-c979bfb39a59", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"wbadmin.exe\" or process.pe.original_file_name == \"WBADMIN.EXE\") and\n process.args : \"catalog\" and process.args : \"delete\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Lateral Tool Transfer via SMB Share", - "description": "Identifies the creation or change of a Windows executable file over network shares. Adversaries may transfer tools or other files between systems in a compromised environment.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Lateral Tool Transfer via SMB Share\n\nAdversaries can use network shares to host tooling to support the compromise of other hosts in the environment. These tools can include discovery utilities, credential dumpers, malware, etc. Attackers can also leverage file shares that employees frequently access to host malicious files to gain a foothold in other machines.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve the created file and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity can happen legitimately. Consider adding exceptions if it is expected and noisy in your environment.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Review the privileges needed to write to the network share and restrict write access as needed.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.002", - "name": "SMB/Windows Admin Shares", - "reference": "https://attack.mitre.org/techniques/T1021/002/" - } - ] - }, - { - "id": "T1570", - "name": "Lateral Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1570/" - } - ] - } - ], - "id": "de1d4257-3ab1-4030-9776-01e9206b4d67", - "rule_id": "58bc134c-e8d2-4291-a552-b4b3e537c60b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.header_bytes", - "type": "unknown", - "ecs": false - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=30s\n [network where host.os.type == \"windows\" and event.type == \"start\" and process.pid == 4 and destination.port == 445 and\n network.direction : (\"incoming\", \"ingress\") and\n network.transport == \"tcp\" and source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ] by process.entity_id\n /* add more executable extensions here if they are not noisy in your environment */\n [file where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and process.pid == 4 and \n (file.Ext.header_bytes : \"4d5a*\" or file.extension : (\"exe\", \"scr\", \"pif\", \"com\", \"dll\"))] by process.entity_id\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "AWS CloudTrail Log Created", - "description": "Identifies the creation of an AWS log trail that specifies the settings for delivery of log data.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 206, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Log Auditing", - "Tactic: Collection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trail creations may be made by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Trail creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_CreateTrail.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/create-trail.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1530", - "name": "Data from Cloud Storage", - "reference": "https://attack.mitre.org/techniques/T1530/" - } - ] - } - ], - "id": "a1953b39-cb8f-4843-9481-b1f81806e74b", - "rule_id": "594e0cbf-86cc-45aa-9ff7-ff27db27d3ed", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:CreateTrail and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Unusual Linux User Discovery Activity", - "description": "Looks for commands related to system user or owner discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used to engage in system owner or user discovery in order to identify currently active or primary users of a system. This may be a precursor to additional discovery, credential dumping or privilege elevation activity.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Discovery" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon user command activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1033", - "name": "System Owner/User Discovery", - "reference": "https://attack.mitre.org/techniques/T1033/" - } - ] - } - ], - "id": "7b7f4401-25f6-4c7d-b216-2613be7c72c3", - "rule_id": "59756272-1998-4b8c-be14-e287035c4d10", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": [ - "v3_linux_system_user_discovery" - ] - }, - { - "name": "UAC Bypass Attempt via Privileged IFileOperation COM Interface", - "description": "Identifies attempts to bypass User Account Control (UAC) via DLL side-loading. Attackers may attempt to bypass UAC to stealthily execute code with elevated permissions.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/hfiref0x/UACME", - "https://www.elastic.co/security-labs/exploring-windows-uac-bypasses-techniques-and-detection-strategies" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - }, - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.002", - "name": "DLL Side-Loading", - "reference": "https://attack.mitre.org/techniques/T1574/002/" - } - ] - } - ] - } - ], - "id": "5921753f-4b94-4334-b239-adfe2e420a2a", - "rule_id": "5a14d01d-7ac8-4545-914c-b687c2cf66b3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type : \"change\" and process.name : \"dllhost.exe\" and\n /* Known modules names side loaded into process running with high or system integrity level for UAC Bypass, update here for new modules */\n file.name : (\"wow64log.dll\", \"comctl32.dll\", \"DismCore.dll\", \"OskSupport.dll\", \"duser.dll\", \"Accessibility.ni.dll\") and\n /* has no impact on rule logic just to avoid OS install related FPs */\n not file.path : (\"C:\\\\Windows\\\\SoftwareDistribution\\\\*\", \"C:\\\\Windows\\\\WinSxS\\\\*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Reverse Shell via Java", - "description": "This detection rule identifies the execution of a Linux shell process from a Java JAR application post an incoming network connection. This behavior may indicate reverse shell activity via a Java application.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - } - ], - "id": "9488557c-da57-415d-965c-21c9293492d3", - "rule_id": "5a3d5447-31c9-409a-aed1-72f9921594fd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id with maxspan=5s\n [network where host.os.type == \"linux\" and event.action in (\"connection_accepted\", \"connection_attempted\") and \n process.executable : (\"/usr/bin/java\", \"/bin/java\", \"/usr/lib/jvm/*\", \"/usr/java/*\") and\n destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\"\n ] by process.entity_id\n [process where host.os.type == \"linux\" and event.action == \"exec\" and \n process.parent.executable : (\"/usr/bin/java\", \"/bin/java\", \"/usr/lib/jvm/*\", \"/usr/java/*\") and\n process.parent.args : \"-jar\" and process.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n ] by process.parent.entity_id\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Virtual Machine Fingerprinting", - "description": "An adversary may attempt to get detailed information about the operating system and hardware. This rule identifies common locations used to discover virtual machine hardware by a non-root user. This technique has been used by the Pupy RAT and other malware.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Certain tools or automated software may enumerate hardware information. These tools can be exempted via user name or process arguments to eliminate potential noise." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "a1671f10-7bb2-47e6-aeaa-b190aa7600fb", - "rule_id": "5b03c9fb-9945-4d2f-9568-fd690fee3fba", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ], - "query": "event.category:process and host.os.type:linux and event.type:(start or process_started) and\n process.args:(\"/sys/class/dmi/id/bios_version\" or\n \"/sys/class/dmi/id/product_name\" or\n \"/sys/class/dmi/id/chassis_vendor\" or\n \"/proc/scsi/scsi\" or\n \"/proc/ide/hd0/model\") and\n not user.name:root\n", - "language": "kuery" - }, - { - "name": "AWS WAF Rule or Rule Group Deletion", - "description": "Identifies the deletion of a specified AWS Web Application Firewall (WAF) rule or rule group.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Network Security Monitoring", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "WAF rules or rule groups may be deleted by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Rule deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/waf/delete-rule-group.html", - "https://docs.aws.amazon.com/waf/latest/APIReference/API_waf_DeleteRuleGroup.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "1e054b99-f836-4f55-8642-403da8e48689", - "rule_id": "5beaebc1-cc13-4bfc-9949-776f9e0dc318", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:(waf.amazonaws.com or waf-regional.amazonaws.com or wafv2.amazonaws.com) and event.action:(DeleteRule or DeleteRuleGroup) and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential Defense Evasion via PRoot", - "description": "Identifies the execution of the PRoot utility, an open-source tool for user-space implementation of chroot, mount --bind, and binfmt_misc. Adversaries can leverage an open-source tool PRoot to expand the scope of their operations to multiple Linux distributions and simplify their necessary efforts. In a normal threat scenario, the scope of an attack is limited by the varying configurations of each Linux distribution. With PRoot, it provides an attacker with a consistent operational environment across different Linux distributions, such as Ubuntu, Fedora, and Alpine. PRoot also provides emulation capabilities that allow for malware built on other architectures, such as ARM, to be run.The post-exploitation technique called bring your own filesystem (BYOF), can be used by the threat actors to execute malicious payload or elevate privileges or perform network scans or orchestrate another attack on the environment. Although PRoot was originally not developed with malicious intent it can be easily tuned to work for one.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://proot-me.github.io/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1211", - "name": "Exploitation for Defense Evasion", - "reference": "https://attack.mitre.org/techniques/T1211/" - } - ] - } - ], - "id": "7dcf6899-a28f-4e99-ba9b-75644ed63565", - "rule_id": "5c9ec990-37fa-4d5c-abfc-8d432f3dedd0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where event.action == \"exec\" and process.parent.name ==\"proot\" and host.os.type == \"linux\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Outbound Scheduled Task Activity via PowerShell", - "description": "Identifies the PowerShell process loading the Task Scheduler COM DLL followed by an outbound RPC network connection within a short time period. This may indicate lateral movement or remote discovery via scheduled tasks.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate scheduled tasks may be created during installation of new software." - ], - "references": [ - "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - }, - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "9a17f698-0cfc-4448-a035-7cdb4f547c3d", - "rule_id": "5cd55388-a19c-47c7-8ec4-f41656c2fded", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.address", - "type": "keyword", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan = 5s\n [any where host.os.type == \"windows\" and (event.category == \"library\" or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : \"taskschd.dll\" or file.name : \"taskschd.dll\") and process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\")]\n [network where host.os.type == \"windows\" and process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and destination.port == 135 and not destination.address in (\"127.0.0.1\", \"::1\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Persistence via PowerShell profile", - "description": "Identifies the creation or modification of a PowerShell profile. PowerShell profile is a script that is executed when PowerShell starts to customize the user environment, which can be abused by attackers to persist in a environment where PowerShell is common.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles", - "https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.013", - "name": "PowerShell Profile", - "reference": "https://attack.mitre.org/techniques/T1546/013/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.013", - "name": "PowerShell Profile", - "reference": "https://attack.mitre.org/techniques/T1546/013/" - } - ] - } - ] - } - ], - "id": "26ac4c53-825e-4a7a-9929-f611e91b116b", - "rule_id": "5cf6397e-eb91-4f31-8951-9f0eaa755a31", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.path : (\"?:\\\\Users\\\\*\\\\Documents\\\\WindowsPowerShell\\\\*\",\n \"?:\\\\Users\\\\*\\\\Documents\\\\PowerShell\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\*\") and\n file.name : (\"profile.ps1\", \"Microsoft.Powershell_profile.ps1\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Execution via Scheduled Task", - "description": "Identifies execution of a suspicious program via scheduled tasks by looking at process lineage and command line usage.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate scheduled tasks running third party software." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "78a01253-8859-4e31-8c2b-0786536ea3c2", - "rule_id": "5d1d6907-0747-4d5d-9b24-e4a18853dc0a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.working_directory", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n /* Schedule service cmdline on Win10+ */\n process.parent.name : \"svchost.exe\" and process.parent.args : \"Schedule\" and\n /* add suspicious programs here */\n process.pe.original_file_name in\n (\n \"cscript.exe\",\n \"wscript.exe\",\n \"PowerShell.EXE\",\n \"Cmd.Exe\",\n \"MSHTA.EXE\",\n \"RUNDLL32.EXE\",\n \"REGSVR32.EXE\",\n \"MSBuild.exe\",\n \"InstallUtil.exe\",\n \"RegAsm.exe\",\n \"RegSvcs.exe\",\n \"msxsl.exe\",\n \"CONTROL.EXE\",\n \"EXPLORER.EXE\",\n \"Microsoft.Workflow.Compiler.exe\",\n \"msiexec.exe\"\n ) and\n /* add suspicious paths here */\n process.args : (\n \"C:\\\\Users\\\\*\",\n \"C:\\\\ProgramData\\\\*\",\n \"C:\\\\Windows\\\\Temp\\\\*\",\n \"C:\\\\Windows\\\\Tasks\\\\*\",\n \"C:\\\\PerfLogs\\\\*\",\n \"C:\\\\Intel\\\\*\",\n \"C:\\\\Windows\\\\Debug\\\\*\",\n \"C:\\\\HP\\\\*\") and\n\n not (process.name : \"cmd.exe\" and process.args : \"?:\\\\*.bat\" and process.working_directory : \"?:\\\\Windows\\\\System32\\\\\") and\n not (process.name : \"cscript.exe\" and process.args : \"?:\\\\Windows\\\\system32\\\\calluxxprovider.vbs\") and\n not (process.name : \"powershell.exe\" and process.args : (\"-File\", \"-PSConsoleFile\") and user.id : \"S-1-5-18\") and\n not (process.name : \"msiexec.exe\" and user.id : \"S-1-5-18\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "AdminSDHolder SDProp Exclusion Added", - "description": "Identifies a modification on the dsHeuristics attribute on the bit that holds the configuration of groups excluded from the SDProp process. The SDProp compares the permissions on protected objects with those defined on the AdminSDHolder object. If the permissions on any of the protected accounts and groups do not match, the permissions on the protected accounts and groups are reset to match those of the domain's AdminSDHolder object, meaning that groups excluded will remain unchanged. Attackers can abuse this misconfiguration to maintain long-term access to privileged accounts in these groups.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AdminSDHolder SDProp Exclusion Added\n\nThe SDProp process compares the permissions on protected objects with those defined on the AdminSDHolder object. If the permissions on any of the protected accounts and groups do not match, it resets the permissions on the protected accounts and groups to match those defined in the domain AdminSDHolder object.\n\nThe dSHeuristics is a Unicode string attribute, in which each character in the string represents a heuristic that is used to determine the behavior of Active Directory.\n\nAdministrators can use the dSHeuristics attribute to exclude privilege groups from the SDProp process by setting the 16th bit (dwAdminSDExMask) of the string to a certain value, which represents the group(s):\n\n- For example, to exclude the Account Operators group, an administrator would modify the string, so the 16th character is set to 1 (i.e., 0000000001000001).\n\nThe usage of this exclusion can leave the accounts unprotected and facilitate the misconfiguration of privileges for the excluded groups, enabling attackers to add accounts to these groups to maintain long-term persistence with high privileges.\n\nThis rule matches changes of the dsHeuristics object where the 16th bit is set to a value other than zero.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check the value assigned to the 16th bit of the string on the `winlog.event_data.AttributeValue` field:\n - Account Operators eq 1\n - Server Operators eq 2\n - Print Operators eq 4\n - Backup Operators eq 8\n The field value can range from 0 to f (15). If more than one group is specified, the values will be summed together; for example, Backup Operators and Print Operators will set the `c` value on the bit.\n\n### False positive analysis\n\n- While this modification can be done legitimately, it is not a best practice. Any potential benign true positive (B-TP) should be mapped and reviewed by the security team for alternatives as this weakens the security of the privileged group.\n\n### Response and remediation\n\n- The change can be reverted by setting the dwAdminSDExMask (16th bit) to 0 in dSHeuristics.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Active Directory", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.cert.ssi.gouv.fr/uploads/guide-ad.html#dsheuristics_bad", - "https://petri.com/active-directory-security-understanding-adminsdholder-object" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - } - ] - }, - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "8532de60-3525-46c5-afb9-30bc0ae95151", - "rule_id": "61d29caf-6c15-4d1e-9ccb-7ad12ccc0bc7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.AttributeLDAPDisplayName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.AttributeValue", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'Audit Directory Service Changes' logging policy must be configured for (Success).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success)\n```\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "any where event.action == \"Directory Service Changes\" and\n event.code == \"5136\" and\n winlog.event_data.AttributeLDAPDisplayName : \"dSHeuristics\" and\n length(winlog.event_data.AttributeValue) > 15 and\n winlog.event_data.AttributeValue regex~ \"[0-9]{15}([1-9a-f]).*\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Suspicious Termination of ESXI Process", - "description": "Identifies instances where VMware processes, such as \"vmware-vmx\" or \"vmx,\" are terminated on a Linux system by a \"kill\" command. The rule monitors for the \"end\" event type, which signifies the termination of a process. The presence of a \"kill\" command as the parent process for terminating VMware processes may indicate that a threat actor is attempting to interfere with the virtualized environment on the targeted system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Impact", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1489", - "name": "Service Stop", - "reference": "https://attack.mitre.org/techniques/T1489/" - } - ] - } - ], - "id": "662c613b-9211-42da-a02d-66ea2fae17bb", - "rule_id": "6641a5af-fb7e-487a-adc4-9e6503365318", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"end\" and process.name : (\"vmware-vmx\", \"vmx\")\nand process.parent.name : \"kill\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Modification of the msPKIAccountCredentials", - "description": "Identify the modification of the msPKIAccountCredentials attribute in an Active Directory User Object. Attackers can abuse the credentials roaming feature to overwrite an arbitrary file for privilege escalation. ms-PKI-AccountCredentials contains binary large objects (BLOBs) of encrypted credential objects from the credential manager store, private keys, certificates, and certificate requests.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Data Source: Active Directory", - "Tactic: Privilege Escalation", - "Use Case: Active Directory Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.mandiant.com/resources/blog/apt29-windows-credential-roaming", - "https://social.technet.microsoft.com/wiki/contents/articles/11483.windows-credential-roaming.aspx", - "https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5136" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "d729f7ba-02ee-4d85-bec4-d48c287c2418", - "rule_id": "670b3b5a-35e5-42db-bd36-6c5b9b4b7313", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.AttributeLDAPDisplayName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.OperationType", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectUserSid", - "type": "keyword", - "ecs": false - } - ], - "setup": "The 'Audit Directory Service Changes' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.action:\"Directory Service Changes\" and event.code:\"5136\" and\n winlog.event_data.AttributeLDAPDisplayName:\"msPKIAccountCredentials\" and winlog.event_data.OperationType:\"%%14674\" and\n not winlog.event_data.SubjectUserSid : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "Image File Execution Options Injection", - "description": "The Debugger and SilentProcessExit registry keys can allow an adversary to intercept the execution of files, causing a different process to be executed. This functionality can be abused by an adversary to establish persistence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://oddvar.moe/2018/04/10/persistence-using-globalflags-in-image-file-execution-options-hidden-from-autoruns-exe/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.012", - "name": "Image File Execution Options Injection", - "reference": "https://attack.mitre.org/techniques/T1546/012/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "e53165f4-38fc-4c43-a5ce-f457f5615461", - "rule_id": "6839c821-011d-43bd-bd5b-acff00257226", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and length(registry.data.strings) > 0 and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Image File Execution Options\\\\*.exe\\\\Debugger\",\n \"HKLM\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Image File Execution Options\\\\*\\\\Debugger\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\SilentProcessExit\\\\*\\\\MonitorProcess\",\n \"HKLM\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\SilentProcessExit\\\\*\\\\MonitorProcess\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Image File Execution Options\\\\*.exe\\\\Debugger\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Image File Execution Options\\\\*\\\\Debugger\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\SilentProcessExit\\\\*\\\\MonitorProcess\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\SilentProcessExit\\\\*\\\\MonitorProcess\"\n ) and\n /* add FPs here */\n not registry.data.strings regex~ (\"\"\"C:\\\\Program Files( \\(x86\\))?\\\\ThinKiosk\\\\thinkiosk\\.exe\"\"\", \"\"\".*\\\\PSAppDeployToolkit\\\\.*\"\"\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Okta ThreatInsight Threat Suspected Promotion", - "description": "Okta ThreatInsight is a feature that provides valuable debug data regarding authentication and authorization processes, which is logged in the system. Within this data, there is a specific field called threat_suspected, which represents Okta's internal evaluation of the authentication or authorization workflow. When this field is set to True, it suggests the presence of potential credential access techniques, such as password-spraying, brute-forcing, replay attacks, and other similar threats.", - "risk_score": 47, - "severity": "medium", - "rule_name_override": "okta.display_message", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\nThis is a promotion rule for Okta ThreatInsight suspected threat events, which are alertable events per the vendor.\nConsult vendor documentation on interpreting specific events.", - "version": 205, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [ - { - "field": "okta.debug_context.debug_data.risk_level", - "operator": "equals", - "severity": "low", - "value": "LOW" - }, - { - "field": "okta.debug_context.debug_data.risk_level", - "operator": "equals", - "severity": "medium", - "value": "MEDIUM" - }, - { - "field": "okta.debug_context.debug_data.risk_level", - "operator": "equals", - "severity": "high", - "value": "HIGH" - } - ], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://help.okta.com/en-us/Content/Topics/Security/threat-insight/configure-threatinsight-system-log.html", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [], - "id": "8071bdac-fe04-4ec6-8842-628d6bab4a06", - "rule_id": "6885d2ae-e008-4762-b98a-e8e1cd3a81e9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "okta.debug_context.debug_data.threat_suspected", - "type": "keyword", - "ecs": false - } - ], - "setup": "", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and (event.action:security.threat.detected or okta.debug_context.debug_data.threat_suspected: true)\n", - "language": "kuery" - }, - { - "name": "Persistence via TelemetryController Scheduled Task Hijack", - "description": "Detects the successful hijack of Microsoft Compatibility Appraiser scheduled task to establish persistence with an integrity level of system.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.trustedsec.com/blog/abusing-windows-telemetry-for-persistence" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - }, - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - }, - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/" - } - ] - } - ], - "id": "5364f77b-5c2e-4165-bc07-7e90194c366b", - "rule_id": "68921d85-d0dc-48b3-865f-43291ca2c4f2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"CompatTelRunner.exe\" and process.args : \"-cv*\" and\n not process.name : (\"conhost.exe\",\n \"DeviceCensus.exe\",\n \"CompatTelRunner.exe\",\n \"DismHost.exe\",\n \"rundll32.exe\",\n \"powershell.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Scheduled Task Created by a Windows Script", - "description": "A scheduled task was created by a Windows script via cscript.exe, wscript.exe or powershell.exe. This can be abused by an adversary to establish persistence.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\nDecode the base64 encoded Tasks Actions registry value to investigate the task's configured action.", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate scheduled tasks may be created during installation of new software." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.005", - "name": "Visual Basic", - "reference": "https://attack.mitre.org/techniques/T1059/005/" - } - ] - } - ] - } - ], - "id": "029a078f-9aad-4dcb-a7bb-619b41581eb3", - "rule_id": "689b9d57-e4d5-4357-ad17-9c334609d79a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan = 30s\n [any where host.os.type == \"windows\" and \n (event.category : (\"library\", \"driver\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : \"taskschd.dll\" or file.name : \"taskschd.dll\") and\n process.name : (\"cscript.exe\", \"wscript.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\")]\n [registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\TaskCache\\\\Tasks\\\\*\\\\Actions\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\TaskCache\\\\Tasks\\\\*\\\\Actions\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS CloudWatch Log Group Deletion", - "description": "Identifies the deletion of a specified AWS CloudWatch log group. When a log group is deleted, all the archived log events associated with the log group are also permanently deleted.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS CloudWatch Log Group Deletion\n\nAmazon CloudWatch is a monitoring and observability service that collects monitoring and operational data in the form of logs, metrics, and events for resources and applications. This data can be used to detect anomalous behavior in your environments, set alarms, visualize logs and metrics side by side, take automated actions, troubleshoot issues, and discover insights to keep your applications running smoothly.\n\nA log group is a group of log streams that share the same retention, monitoring, and access control settings. You can define log groups and specify which streams to put into each group. There is no limit on the number of log streams that can belong to one log group.\n\nThis rule looks for the deletion of a log group using the API `DeleteLogGroup` action. Attackers can do this to cover their tracks and impact security monitoring that relies on these sources.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Investigate the deleted log group's criticality and whether the responsible team is aware of the deletion.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Log Auditing", - "Resources: Investigation Guide", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Log group deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/logs/delete-log-group.html", - "https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteLogGroup.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "e2560a61-d574-4f08-ad04-48223aeb9661", - "rule_id": "68a7a5a5-a2fc-4a76-ba9f-26849de881b4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:logs.amazonaws.com and event.action:DeleteLogGroup and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "UAC Bypass via ICMLuaUtil Elevated COM Interface", - "description": "Identifies User Account Control (UAC) bypass attempts via the ICMLuaUtil Elevated COM interface. Attackers may attempt to bypass UAC to stealthily execute code with elevated permissions.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1559", - "name": "Inter-Process Communication", - "reference": "https://attack.mitre.org/techniques/T1559/", - "subtechnique": [ - { - "id": "T1559.001", - "name": "Component Object Model", - "reference": "https://attack.mitre.org/techniques/T1559/001/" - } - ] - } - ] - } - ], - "id": "b1fe693d-b394-4c17-9e91-ecea975acac7", - "rule_id": "68d56fdc-7ffa-4419-8e95-81641bd6f845", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name == \"dllhost.exe\" and\n process.parent.args in (\"/Processid:{3E5FC7F9-9A51-4367-9063-A120244FBEC7}\", \"/Processid:{D2E7041B-2927-42FB-8E9F-7CE93B6DC937}\") and\n process.pe.original_file_name != \"WerFault.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS KMS Customer Managed Key Disabled or Scheduled for Deletion", - "description": "Identifies attempts to disable or schedule the deletion of an AWS KMS Customer Managed Key (CMK). Deleting an AWS KMS key is destructive and potentially dangerous. It deletes the key material and all metadata associated with the KMS key and is irreversible. After a KMS key is deleted, the data that was encrypted under that KMS key can no longer be decrypted, which means that data becomes unrecoverable.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Log Auditing", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Xavier Pich" - ], - "false_positives": [ - "A KMS customer managed key may be disabled or scheduled for deletion by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Key deletions by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/cli/latest/reference/kms/disable-key.html", - "https://docs.aws.amazon.com/cli/latest/reference/kms/schedule-key-deletion.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - } - ], - "id": "bd4e873e-fc69-4e6b-abc3-87f5cee14a57", - "rule_id": "6951f15e-533c-4a60-8014-a3c3ab851a1b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:kms.amazonaws.com and event.action:(\"DisableKey\" or \"ScheduleKeyDeletion\") and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "AWS IAM Password Recovery Requested", - "description": "Identifies AWS IAM password recovery requests. An adversary may attempt to gain unauthorized AWS access by abusing password recovery mechanisms.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Verify whether the user identity, user agent, and/or hostname should be requesting changes in your environment. Password reset attempts from unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://www.cadosecurity.com/an-ongoing-aws-phishing-campaign/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "9c800924-20cd-4bdb-b9ef-dfd711dabd70", - "rule_id": "69c420e8-6c9e-4d28-86c0-8a2be2d1e78c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:signin.amazonaws.com and event.action:PasswordRecoveryRequested and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Unusual Service Host Child Process - Childless Service", - "description": "Identifies unusual child processes of Service Host (svchost.exe) that traditionally do not spawn any child processes. This may indicate a code injection or an equivalent form of exploitation.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Changes to Windows services or a rarely executed child process." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/", - "subtechnique": [ - { - "id": "T1055.012", - "name": "Process Hollowing", - "reference": "https://attack.mitre.org/techniques/T1055/012/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/", - "subtechnique": [ - { - "id": "T1055.012", - "name": "Process Hollowing", - "reference": "https://attack.mitre.org/techniques/T1055/012/" - } - ] - } - ] - } - ], - "id": "832b2257-805c-4b03-bec1-1267ca1eff3c", - "rule_id": "6a8ab9cc-4023-4d17-b5df-1a3e16882ce7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"svchost.exe\" and\n\n /* based on svchost service arguments -s svcname where the service is known to be childless */\n\n process.parent.args : (\"WdiSystemHost\",\"LicenseManager\",\n \"StorSvc\",\"CDPSvc\",\"cdbhsvc\",\"BthAvctpSvc\",\"SstpSvc\",\"WdiServiceHost\",\n \"imgsvc\",\"TrkWks\",\"WpnService\",\"IKEEXT\",\"PolicyAgent\",\"CryptSvc\",\n \"netprofm\",\"ProfSvc\",\"StateRepository\",\"camsvc\",\"LanmanWorkstation\",\n \"NlaSvc\",\"EventLog\",\"hidserv\",\"DisplayEnhancementService\",\"ShellHWDetection\",\n \"AppHostSvc\",\"fhsvc\",\"CscService\",\"PushToInstall\") and\n\n /* unknown FPs can be added here */\n\n not process.name : (\"WerFault.exe\",\"WerFaultSecure.exe\",\"wermgr.exe\") and\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\RelPost.exe\" and process.parent.args : \"WdiSystemHost\") and\n not (process.name : \"rundll32.exe\" and\n process.args : \"?:\\\\WINDOWS\\\\System32\\\\winethc.dll,ForceProxyDetectionOnNextRun\" and process.parent.args : \"WdiServiceHost\") and\n not (process.executable : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\", \"?:\\\\Windows\\\\System32\\\\Kodak\\\\kds_i4x50\\\\lib\\\\lexexe.exe\") and\n process.parent.args : \"imgsvc\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Exporting Exchange Mailbox via PowerShell", - "description": "Identifies the use of the Exchange PowerShell cmdlet, New-MailBoxExportRequest, to export the contents of a primary mailbox or archive to a .pst file. Adversaries may target user email to collect sensitive information.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Exporting Exchange Mailbox via PowerShell\n\nEmail mailboxes and their information can be valuable assets for attackers. Company mailboxes often contain sensitive information such as login credentials, intellectual property, financial data, and personal information, making them high-value targets for malicious actors.\n\nThe `New-MailBoxExportRequest` cmdlet is used to begin the process of exporting contents of a primary mailbox or archive to a .pst file. Note that this is done on a per-mailbox basis and this cmdlet is available only in on-premises Exchange.\n\nAttackers can abuse this functionality in preparation for exfiltrating contents, which is likely to contain sensitive and strategic data.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the export operation:\n - Identify the user account that performed the action and whether it should perform this kind of action.\n - Contact the account owner and confirm whether they are aware of this activity.\n - Check if this operation was approved and performed according to the organization's change management policy.\n - Retrieve the operation status and use the `Get-MailboxExportRequest` cmdlet to review previous requests.\n - By default, no group in Exchange has the privilege to import or export mailboxes. Investigate administrators that assigned the \"Mailbox Import Export\" privilege for abnormal activity.\n- Investigate if there is a significant quantity of export requests in the alert timeframe. This operation is done on a per-mailbox basis and can be part of a mass export.\n- If the operation was completed successfully:\n - Check if the file is on the path specified in the command.\n - Investigate if the file was compressed, archived, or retrieved by the attacker for exfiltration.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and it is done with proper approval.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If the involved host is not the Exchange server, isolate the host to prevent further post-compromise behavior.\n- Use the `Remove-MailboxExportRequest` cmdlet to remove fully or partially completed export requests.\n- Prioritize cases that involve personally identifiable information (PII) or other classified data.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges of users with the \"Mailbox Import Export\" privilege to ensure that the least privilege principle is being followed.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate exchange system administration activity." - ], - "references": [ - "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/", - "https://docs.microsoft.com/en-us/powershell/module/exchange/new-mailboxexportrequest?view=exchange-ps" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1005", - "name": "Data from Local System", - "reference": "https://attack.mitre.org/techniques/T1005/" - }, - { - "id": "T1114", - "name": "Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/", - "subtechnique": [ - { - "id": "T1114.002", - "name": "Remote Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "2ec10e5f-121c-43c5-8fd5-5be5614a3dfc", - "rule_id": "6aace640-e631-4870-ba8e-5fdda09325db", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name: (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and \n process.command_line : (\"*MailboxExportRequest*\", \"*-Mailbox*-ContentFilter*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Sensitive Files Compression", - "description": "Identifies the use of a compression utility to collect known files containing sensitive information, such as credentials and system configurations.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 206, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Collection", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.trendmicro.com/en_ca/research/20/l/teamtnt-now-deploying-ddos-capable-irc-bot-tntbotinger.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.001", - "name": "Credentials In Files", - "reference": "https://attack.mitre.org/techniques/T1552/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1560", - "name": "Archive Collected Data", - "reference": "https://attack.mitre.org/techniques/T1560/", - "subtechnique": [ - { - "id": "T1560.001", - "name": "Archive via Utility", - "reference": "https://attack.mitre.org/techniques/T1560/001/" - } - ] - } - ] - } - ], - "id": "f0afdac8-723d-4396-99c7-bdd5a08e9894", - "rule_id": "6b84d470-9036-4cc0-a27c-6d90bbfe81ab", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "new_terms", - "query": "event.category:process and host.os.type:linux and event.type:start and\n process.name:(zip or tar or gzip or hdiutil or 7z) and\n process.args:\n (\n /root/.ssh/id_rsa or\n /root/.ssh/id_rsa.pub or\n /root/.ssh/id_ed25519 or\n /root/.ssh/id_ed25519.pub or\n /root/.ssh/authorized_keys or\n /root/.ssh/authorized_keys2 or\n /root/.ssh/known_hosts or\n /root/.bash_history or\n /etc/hosts or\n /home/*/.ssh/id_rsa or\n /home/*/.ssh/id_rsa.pub or\n /home/*/.ssh/id_ed25519 or\n /home/*/.ssh/id_ed25519.pub or\n /home/*/.ssh/authorized_keys or\n /home/*/.ssh/authorized_keys2 or\n /home/*/.ssh/known_hosts or\n /home/*/.bash_history or\n /root/.aws/credentials or\n /root/.aws/config or\n /home/*/.aws/credentials or\n /home/*/.aws/config or\n /root/.docker/config.json or\n /home/*/.docker/config.json or\n /etc/group or\n /etc/passwd or\n /etc/shadow or\n /etc/gshadow\n )\n", - "new_terms_fields": [ - "host.id", - "process.command_line", - "process.parent.executable" - ], - "history_window_start": "now-10d", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Remote Computer Account DnsHostName Update", - "description": "Identifies the remote update to a computer account's DnsHostName attribute. If the new value set is a valid domain controller DNS hostname and the subject computer name is not a domain controller, then it's highly likely a preparation step to exploit CVE-2022-26923 in an attempt to elevate privileges from a standard domain user to domain admin privileges.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Use Case: Active Directory Monitoring", - "Data Source: Active Directory", - "Use Case: Vulnerability" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://research.ifcr.dk/certifried-active-directory-domain-privilege-escalation-cve-2022-26923-9e098fe298f4", - "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2022-26923" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - }, - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - } - ] - } - ] - } - ], - "id": "fdb17c01-7505-4845-8b1c-23e8595384e8", - "rule_id": "6bed021a-0afb-461c-acbe-ffdb9574d3f3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.DnsHostName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.TargetUserName", - "type": "keyword", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "iam where event.action == \"changed-computer-account\" and user.id : (\"S-1-5-21-*\", \"S-1-12-1-*\") and\n\n /* if DnsHostName value equal a DC DNS hostname then it's highly suspicious */\n winlog.event_data.DnsHostName : \"??*\" and\n\n /* exclude FPs where DnsHostName starts with the ComputerName that was changed */\n not startswith~(winlog.event_data.DnsHostName, substring(winlog.event_data.TargetUserName, 0, length(winlog.event_data.TargetUserName) - 1))\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Microsoft Exchange Server UM Writing Suspicious Files", - "description": "Identifies suspicious files being written by the Microsoft Exchange Server Unified Messaging (UM) service. This activity has been observed exploiting CVE-2021-26858.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\nPositive hits can be checked against the established Microsoft [baselines](https://github.com/microsoft/CSS-Exchange/tree/main/Security/Baselines).\n\nMicrosoft highly recommends that the best course of action is patching, but this may not protect already compromised systems\nfrom existing intrusions. Other tools for detecting and mitigating can be found within their Exchange support\n[repository](https://github.com/microsoft/CSS-Exchange/tree/main/Security)", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Files generated during installation will generate a lot of noise, so the rule should only be enabled after the fact.", - "This rule was tuned using the following baseline: https://raw.githubusercontent.com/microsoft/CSS-Exchange/main/Security/Baselines/baseline_15.2.792.5.csv from Microsoft. Depending on version, consult https://github.com/microsoft/CSS-Exchange/tree/main/Security/Baselines to help determine normalcy." - ], - "references": [ - "https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers", - "https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "0c193625-b5ee-4697-b8e2-b32ad62fa5ac", - "rule_id": "6cd1779c-560f-4b68-a8f1-11009b27fe63", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n process.name : (\"UMWorkerProcess.exe\", \"umservice.exe\") and\n file.extension : (\"php\", \"jsp\", \"js\", \"aspx\", \"asmx\", \"asax\", \"cfm\", \"shtml\") and\n (\n file.path : \"?:\\\\inetpub\\\\wwwroot\\\\aspnet_client\\\\*\" or\n\n (file.path : \"?:\\\\*\\\\Microsoft\\\\Exchange Server*\\\\FrontEnd\\\\HttpProxy\\\\owa\\\\auth\\\\*\" and\n not (file.path : \"?:\\\\*\\\\Microsoft\\\\Exchange Server*\\\\FrontEnd\\\\HttpProxy\\\\owa\\\\auth\\\\version\\\\*\" or\n file.name : (\"errorFE.aspx\", \"expiredpassword.aspx\", \"frowny.aspx\", \"GetIdToken.htm\", \"logoff.aspx\",\n \"logon.aspx\", \"OutlookCN.aspx\", \"RedirSuiteServiceProxy.aspx\", \"signout.aspx\"))) or\n\n (file.path : \"?:\\\\*\\\\Microsoft\\\\Exchange Server*\\\\FrontEnd\\\\HttpProxy\\\\ecp\\\\auth\\\\*\" and\n not file.name : \"TimeoutLogoff.aspx\")\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Unusual Process For a Windows Host", - "description": "Identifies rare processes that do not usually run on individual hosts, which can indicate execution of unauthorized services, malware, or persistence mechanisms. Processes are considered rare when they only run occasionally as compared with other processes running on the host.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Process For a Windows Host\n\nSearching for abnormal Windows processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.\n\nThis rule uses a machine learning job to detect a Windows process that is rare and unusual for an individual Windows host in your environment.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.\n - Investigate the process metadata — such as the digital signature, directory, etc. — to obtain more context that can indicate whether the executable is associated with an expected software vendor or package.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.\n- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE NOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR user_account == null)\"}}\n - !{osquery{\"label\":\"Retrieve Service Unisgned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid, services.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path = authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Related Rules\n\n- Unusual Process For a Windows Host - 6d448b96-c922-4adb-b51c-b767f1ea5b76\n- Unusual Windows Path Activity - 445a342e-03fb-42d0-8656-0367eb2dead5\n- Unusual Windows Process Calling the Metadata Service - abae61a8-c560-4dbd-acca-1e1438bff36b\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - } - ], - "id": "b62ef196-5911-4c7b-8b1d-38a48738802b", - "rule_id": "6d448b96-c922-4adb-b51c-b767f1ea5b76", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_rare_process_by_host_windows" - ] - }, - { - "name": "First Time Seen Commonly Abused Remote Access Tool Execution", - "description": "Adversaries may install legitimate remote access tools (RAT) to compromised endpoints for further command-and-control (C2). Adversaries can rely on installed RATs for persistence, execution of native commands and more. This rule detects when a process is started whose name or code signature resembles commonly abused RATs. This is a New Terms rule type indicating the host has not seen this RAT process started before within the last 30 days.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating First Time Seen Commonly Abused Remote Access Tool Execution\n\nRemote access software is a class of tools commonly used by IT departments to provide support by connecting securely to users' computers. Remote access is an ever-growing market where new companies constantly offer new ways of quickly accessing remote systems.\n\nAt the same pace as IT departments adopt these tools, the attackers also adopt them as part of their workflow to connect into an interactive session, maintain access with legitimate software as a persistence mechanism, drop malicious software, etc.\n\nThis rule detects when a remote access tool is seen in the environment for the first time in the last 15 days, enabling analysts to investigate and enforce the correct usage of such tools.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Check if the execution of the remote access tool is approved by the organization's IT department.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n - If the tool is not approved for use in the organization, the employee could have been tricked into installing it and providing access to a malicious third party. Investigate whether this third party could be attempting to scam the end-user or gain access to the environment through social engineering.\n- Investigate any abnormal behavior by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n\n### False positive analysis\n\n- If an authorized support person or administrator used the tool to conduct legitimate support or remote access, consider reinforcing that only tooling approved by the IT policy should be used. The analyst can dismiss the alert if no other suspicious behavior is observed involving the host or users.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Run a full scan using the antimalware tool in place. This scan can reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If an unauthorized third party did the access via social engineering, consider improvements to the security awareness program.\n- Enforce that only tooling approved by the IT policy should be used for remote access purposes and only by authorized staff.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://thedfirreport.com/2023/04/03/malicious-iso-file-leads-to-domain-wide-ransomware/", - "https://attack.mitre.org/techniques/T1219/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1219", - "name": "Remote Access Software", - "reference": "https://attack.mitre.org/techniques/T1219/" - } - ] - } - ], - "id": "12b10475-8f82-4786-a46c-2ec0ce7f48d5", - "rule_id": "6e1a2cc4-d260-11ed-8829-f661ea17fbcc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name.caseless", - "type": "unknown", - "ecs": false - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type: \"windows\" and\n\n event.category: \"process\" and event.type : \"start\" and\n\n (\n process.code_signature.subject_name : (\n TeamViewer* or \"NetSupport Ltd\" or \"GlavSoft\" or \"LogMeIn, Inc.\" or \"Ammyy LLC\" or\n \"Nanosystems S.r.l.\" or \"Remote Utilities LLC\" or \"ShowMyPC\" or \"Splashtop Inc.\" or\n \"Yakhnovets Denis Aleksandrovich IP\" or \"Pro Softnet Corporation\" or \"BeamYourScreen GmbH\" or\n \"RealVNC\" or \"uvnc\" or \"SAFIB\") or\n\n process.name.caseless : (\n \"teamviewer.exe\" or \"apc_Admin.exe\" or \"apc_host.exe\" or \"SupremoHelper.exe\" or \"rfusclient.exe\" or\n \"spclink.exe\" or \"smpcview.exe\" or \"ROMServer.exe\" or \"strwinclt.exe\" or \"RPCSuite.exe\" or \"RemotePCDesktop.exe\" or\n \"RemotePCService.exe\" or \"tvn.exe\" or \"LMIIgnition.exe\" or \"B4-Service.exe\" or \"Mikogo-Service.exe\" or \"AnyDesk.exe\" or\n \"Splashtop-streamer.exe\" or AA_v*.exe, or \"rutserv.exe\" or \"rutview.exe\" or \"vncserver.exe\" or \"vncviewer.exe\" or\n \"tvnserver.exe\" or \"tvnviewer.exe\" or \"winvnc.exe\" or \"RemoteDesktopManager.exe\" or \"LogMeIn.exe\" or ScreenConnect*.exe or\n \"RemotePC.exe\" or \"r_server.exe\" or \"radmin.exe\" or \"ROMServer.exe\" or \"ROMViewer.exe\" or \"DWRCC.exe\" or \"AeroAdmin.exe\" or\n \"ISLLightClient.exe\" or \"ISLLight.exe\" or \"AteraAgent.exe\" or \"SRService.exe\")\n\t) and\n\n\tnot (process.pe.original_file_name : (\"G2M.exe\" or \"Updater.exe\" or \"powershell.exe\") and process.code_signature.subject_name : \"LogMeIn, Inc.\")\n", - "new_terms_fields": [ - "host.id" - ], - "history_window_start": "now-15d", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ], - "language": "kuery" - }, - { - "name": "Anomalous Process For a Windows Population", - "description": "Searches for rare processes running on multiple hosts in an entire fleet or network. This reduces the detection of false positives since automated maintenance processes usually only run occasionally on a single machine but are common to all or many hosts in a fleet.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Anomalous Process For a Windows Population\n\nSearching for abnormal Windows processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.\n\nThis rule uses a machine learning job to detect a Windows process that is rare and unusual for all of the monitored Windows hosts in your environment.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.\n - Investigate the process metadata — such as the digital signature, directory, etc. — to obtain more context that can indicate whether the executable is associated with an expected software vendor or package.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.\n- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSyste' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Retrieve Service Unisgned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Related Rules\n\n- Unusual Process For a Windows Host - 6d448b96-c922-4adb-b51c-b767f1ea5b76\n- Unusual Windows Path Activity - 445a342e-03fb-42d0-8656-0367eb2dead5\n- Unusual Windows Process Calling the Metadata Service - abae61a8-c560-4dbd-acca-1e1438bff36b\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Persistence", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1204", - "name": "User Execution", - "reference": "https://attack.mitre.org/techniques/T1204/", - "subtechnique": [ - { - "id": "T1204.002", - "name": "Malicious File", - "reference": "https://attack.mitre.org/techniques/T1204/002/" - } - ] - } - ] - } - ], - "id": "b7b2da49-e5c5-4740-b762-968b869356d6", - "rule_id": "6e40d56f-5c0e-4ac6-aece-bee96645b172", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_windows_anomalous_process_all_hosts" - ] - }, - { - "name": "AdminSDHolder Backdoor", - "description": "Detects modifications in the AdminSDHolder object. Attackers can abuse the SDProp process to implement a persistent backdoor in Active Directory. SDProp compares the permissions on protected objects with those defined on the AdminSDHolder object. If the permissions on any of the protected accounts and groups do not match, the permissions on the protected accounts and groups are reset to match those of the domain's AdminSDHolder object, regaining their Administrative Privileges.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Use Case: Active Directory Monitoring", - "Data Source: Active Directory" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://adsecurity.org/?p=1906", - "https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-c--protected-accounts-and-groups-in-active-directory#adminsdholder" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - } - ] - }, - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "6122b1b7-93ea-43e3-b4a1-a11e71d7186c", - "rule_id": "6e9130a5-9be6-48e5-943a-9628bfc74b18", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.ObjectDN", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.action:\"Directory Service Changes\" and event.code:5136 and\n winlog.event_data.ObjectDN:CN=AdminSDHolder,CN=System*\n", - "language": "kuery" - }, - { - "name": "AWS CloudTrail Log Deleted", - "description": "Identifies the deletion of an AWS log trail. An adversary may delete trails in an attempt to evade defenses.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS CloudTrail Log Deleted\n\nAmazon CloudTrail is a service that enables governance, compliance, operational auditing, and risk auditing of your Amazon Web Services account. With CloudTrail, you can log, continuously monitor, and retain account activity related to actions across your Amazon Web Services infrastructure. CloudTrail provides event history of your Amazon Web Services account activity, including actions taken through the Amazon Management Console, Amazon SDKs, command line tools, and other Amazon Web Services services. This event history simplifies security analysis, resource change tracking, and troubleshooting.\n\nThis rule identifies the deletion of an AWS log trail using the API `DeleteTrail` action. Attackers can do this to cover their tracks and impact security monitoring that relies on this source.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Investigate the deleted log trail's criticality and whether the responsible team is aware of the deletion.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Log Auditing", - "Resources: Investigation Guide", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trail deletions may be made by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Trail deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_DeleteTrail.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/delete-trail.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "58ba2e18-9069-4ce4-bd05-c308ea0d1988", - "rule_id": "7024e2a0-315d-4334-bb1a-441c593e16ab", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:DeleteTrail and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "AWS Config Resource Deletion", - "description": "Identifies attempts to delete an AWS Config Service resource. An adversary may tamper with Config services in order to reduce visibility into the security posture of an account and / or its workload instances.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS Config Resource Deletion\n\nAWS Config provides a detailed view of the configuration of AWS resources in your AWS account. This includes how the resources are related to one another and how they were configured in the past so that you can see how the configurations and relationships change over time.\n\nThis rule looks for the deletion of AWS Config resources using various API actions. Attackers can do this to cover their tracks and impact security monitoring that relies on these sources.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Identify the AWS resource that was involved and its criticality, ownership, and role in the environment. Also investigate if the resource is security-related.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Resources: Investigation Guide", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Privileged IAM users with security responsibilities may be expected to make changes to the Config service in order to align with local security policies and requirements. Automation, orchestration, and security tools may also make changes to the Config service, where they are used to automate setup or configuration of AWS accounts. Other kinds of user or service contexts do not commonly make changes to this service." - ], - "references": [ - "https://docs.aws.amazon.com/config/latest/developerguide/how-does-config-work.html", - "https://docs.aws.amazon.com/config/latest/APIReference/API_Operations.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "813e25e6-2acb-49cb-8d9b-cd13dc5423ec", - "rule_id": "7024e2a0-315d-4334-bb1a-552d604f27bc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:config.amazonaws.com and\n event.action:(DeleteConfigRule or DeleteOrganizationConfigRule or DeleteConfigurationAggregator or\n DeleteConfigurationRecorder or DeleteConformancePack or DeleteOrganizationConformancePack or\n DeleteDeliveryChannel or DeleteRemediationConfiguration or DeleteRetentionConfiguration)\n", - "language": "kuery" - }, - { - "name": "Suspicious RDP ActiveX Client Loaded", - "description": "Identifies suspicious Image Loading of the Remote Desktop Services ActiveX Client (mstscax), this may indicate the presence of RDP lateral movement capability.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://posts.specterops.io/revisiting-remote-desktop-lateral-movement-8fb905cb46c3" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.001", - "name": "Remote Desktop Protocol", - "reference": "https://attack.mitre.org/techniques/T1021/001/" - } - ] - } - ] - } - ], - "id": "fc6160f7-5eb7-4dc4-9177-e4a10a59dd69", - "rule_id": "71c5cb27-eca5-4151-bb47-64bc3f883270", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "any where host.os.type == \"windows\" and\n (event.category : (\"library\", \"driver\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : \"mstscax.dll\" or file.name : \"mstscax.dll\") and\n /* depending on noise in your env add here extra paths */\n process.executable :\n (\n \"C:\\\\Windows\\\\*\",\n \"C:\\\\Users\\\\Public\\\\*\",\n \"C:\\\\Users\\\\Default\\\\*\",\n \"C:\\\\Intel\\\\*\",\n \"C:\\\\PerfLogs\\\\*\",\n \"C:\\\\ProgramData\\\\*\",\n \"\\\\Device\\\\Mup\\\\*\",\n \"\\\\\\\\*\"\n ) and\n /* add here FPs */\n not process.executable : (\"C:\\\\Windows\\\\System32\\\\mstsc.exe\", \"C:\\\\Windows\\\\SysWOW64\\\\mstsc.exe\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Modification of Accessibility Binaries", - "description": "Windows contains accessibility features that may be launched with a key combination before a user has logged in. An adversary can modify the way these programs are launched to get a command prompt or backdoor without logging in to the system.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Modification of Accessibility Binaries\n\nAdversaries may establish persistence and/or elevate privileges by executing malicious content triggered by accessibility features. Windows contains accessibility features that may be launched with a key combination before a user has logged in (ex: when the user is on the Windows logon screen). An adversary can modify the way these programs are launched to get a command prompt or backdoor without logging in to the system.\n\nMore details can be found [here](https://attack.mitre.org/techniques/T1546/008/).\n\nThis rule looks for the execution of supposed accessibility binaries that don't match any of the accessibility features binaries' original file names, which is likely a custom binary deployed by the attacker.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/blog/practical-security-engineering-stateful-detection" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.008", - "name": "Accessibility Features", - "reference": "https://attack.mitre.org/techniques/T1546/008/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.008", - "name": "Accessibility Features", - "reference": "https://attack.mitre.org/techniques/T1546/008/" - } - ] - } - ] - } - ], - "id": "eeae6e22-066e-4f41-b3f0-494d520163a4", - "rule_id": "7405ddf1-6c8e-41ce-818f-48bea6bcaed8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"Utilman.exe\", \"winlogon.exe\") and user.name == \"SYSTEM\" and\n process.args :\n (\n \"C:\\\\Windows\\\\System32\\\\osk.exe\",\n \"C:\\\\Windows\\\\System32\\\\Magnify.exe\",\n \"C:\\\\Windows\\\\System32\\\\Narrator.exe\",\n \"C:\\\\Windows\\\\System32\\\\Sethc.exe\",\n \"utilman.exe\",\n \"ATBroker.exe\",\n \"DisplaySwitch.exe\",\n \"sethc.exe\"\n )\n and not process.pe.original_file_name in\n (\n \"osk.exe\",\n \"sethc.exe\",\n \"utilman2.exe\",\n \"DisplaySwitch.exe\",\n \"ATBroker.exe\",\n \"ScreenMagnifier.exe\",\n \"SR.exe\",\n \"Narrator.exe\",\n \"magnify.exe\",\n \"MAGNIFY.EXE\"\n )\n\n/* uncomment once in winlogbeat to avoid bypass with rogue process with matching pe original file name */\n/* and process.code_signature.subject_name == \"Microsoft Windows\" and process.code_signature.status == \"trusted\" */\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Sysctl File Event", - "description": "Monitors file events on sysctl configuration files (e.g., /etc/sysctl.conf, /etc/sysctl.d/*.conf) to identify potential unauthorized access or manipulation of system-level configuration settings. Attackers may tamper with the sysctl configuration files to modify kernel parameters, potentially compromising system stability, performance, or security.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Setup\nThis rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system. \n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from. \n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n\n```\n-w /etc/sysctl.conf -p wa -k sysctl\n-w /etc/sysctl.d -p wa -k sysctl\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", - "building_block_type": "default", - "version": 103, - "tags": [ - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "eb32ebc4-2480-46ba-acb0-5b06fbc117f9", - "rule_id": "7592c127-89fb-4209-a8f6-f9944dfd7e02", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "This rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system.\n\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n\n```\n-w /etc/sysctl.conf -p wa -k sysctl\n-w /etc/sysctl.d -p wa -k sysctl\n```\n\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", - "type": "new_terms", - "query": "host.os.type:linux and event.category:file and event.action:(\"opened-file\" or \"read-file\" or \"wrote-to-file\") and\nfile.path : (\"/etc/sysctl.conf\" or \"/etc/sysctl.d\" or /etc/sysctl.d/*)\n", - "new_terms_fields": [ - "host.id", - "process.executable", - "file.path" - ], - "history_window_start": "now-7d", - "index": [ - "auditbeat-*", - "logs-auditd_manager.auditd-*" - ], - "language": "kuery" - }, - { - "name": "Potential Remote Desktop Tunneling Detected", - "description": "Identifies potential use of an SSH utility to establish RDP over a reverse SSH Tunnel. This can be used by attackers to enable routing of network packets that would otherwise not reach their intended destination.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Remote Desktop Tunneling Detected\n\nProtocol Tunneling is a mechanism that involves explicitly encapsulating a protocol within another for various use cases, ranging from providing an outer layer of encryption (similar to a VPN) to enabling traffic that network appliances would filter to reach their destination.\n\nAttackers may tunnel Remote Desktop Protocol (RDP) traffic through other protocols like Secure Shell (SSH) to bypass network restrictions that block incoming RDP connections but may be more permissive to other protocols.\n\nThis rule looks for command lines involving the `3389` port, which RDP uses by default and options commonly associated with tools that perform tunneling.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine network data to determine if the host communicated with external servers using the tunnel.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n- Investigate the command line for the execution of programs that are unrelated to tunneling, like Remote Desktop clients.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Take the necessary actions to disable the tunneling, which can be a process kill, service deletion, registry key modification, etc. Inspect the host to learn which method was used and to determine a response for the case.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Tactic: Lateral Movement", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.netspi.com/how-to-access-rdp-over-a-reverse-ssh-tunnel/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.004", - "name": "SSH", - "reference": "https://attack.mitre.org/techniques/T1021/004/" - } - ] - } - ] - } - ], - "id": "44df0369-f87e-4c37-9852-05f414280449", - "rule_id": "76fd43b7-3480-4dd9-8ad7-8bd36bfad92f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n /* RDP port and usual SSH tunneling related switches in command line */\n process.args : \"*:3389\" and\n process.args : (\"-L\", \"-P\", \"-R\", \"-pw\", \"-ssh\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Enumeration Command Spawned via WMIPrvSE", - "description": "Identifies native Windows host and network enumeration commands spawned by the Windows Management Instrumentation Provider Service (WMIPrvSE).", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1018", - "name": "Remote System Discovery", - "reference": "https://attack.mitre.org/techniques/T1018/" - }, - { - "id": "T1087", - "name": "Account Discovery", - "reference": "https://attack.mitre.org/techniques/T1087/" - }, - { - "id": "T1518", - "name": "Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/" - }, - { - "id": "T1016", - "name": "System Network Configuration Discovery", - "reference": "https://attack.mitre.org/techniques/T1016/", - "subtechnique": [ - { - "id": "T1016.001", - "name": "Internet Connection Discovery", - "reference": "https://attack.mitre.org/techniques/T1016/001/" - } - ] - }, - { - "id": "T1057", - "name": "Process Discovery", - "reference": "https://attack.mitre.org/techniques/T1057/" - } - ] - } - ], - "id": "0d3286d3-bfba-49db-b8f4-51bf287c7691", - "rule_id": "770e0c4d-b998-41e5-a62e-c7901fd7f470", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name:\n (\n \"arp.exe\",\n \"dsquery.exe\",\n \"dsget.exe\",\n \"gpresult.exe\",\n \"hostname.exe\",\n \"ipconfig.exe\",\n \"nbtstat.exe\",\n \"net.exe\",\n \"net1.exe\",\n \"netsh.exe\",\n \"netstat.exe\",\n \"nltest.exe\",\n \"ping.exe\",\n \"qprocess.exe\",\n \"quser.exe\",\n \"qwinsta.exe\",\n \"reg.exe\",\n \"sc.exe\",\n \"systeminfo.exe\",\n \"tasklist.exe\",\n \"tracert.exe\",\n \"whoami.exe\"\n ) and\n process.parent.name:\"wmiprvse.exe\" and \n not (\n process.name : \"sc.exe\" and process.args : \"RemoteRegistry\" and process.args : \"start=\" and \n process.args : (\"demand\", \"disabled\")\n ) and\n not process.args : \"tenable_mw_scan\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Network Sweep Detected", - "description": "This rule identifies a potential network sweep. A network sweep is a method used by attackers to scan a target network, identifying active hosts, open ports, and available services to gather information on vulnerabilities and weaknesses. This reconnaissance helps them plan subsequent attacks and exploit potential entry points for unauthorized access, data theft, or other malicious activities. This rule proposes threshold logic to check for connection attempts from one source host to 10 or more destination hosts on commonly used network services.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Network", - "Tactic: Discovery", - "Tactic: Reconnaissance", - "Use Case: Network Security Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 5, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1046", - "name": "Network Service Discovery", - "reference": "https://attack.mitre.org/techniques/T1046/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0043", - "name": "Reconnaissance", - "reference": "https://attack.mitre.org/tactics/TA0043/" - }, - "technique": [ - { - "id": "T1595", - "name": "Active Scanning", - "reference": "https://attack.mitre.org/techniques/T1595/", - "subtechnique": [ - { - "id": "T1595.001", - "name": "Scanning IP Blocks", - "reference": "https://attack.mitre.org/techniques/T1595/001/" - } - ] - } - ] - } - ], - "id": "05649847-b1e7-42a2-83c8-1671ff0f1654", - "rule_id": "781f8746-2180-4691-890c-4c96d11ca91d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "destination.port : (21 or 22 or 23 or 25 or 139 or 445 or 3389 or 5985 or 5986) and \nsource.ip : (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n", - "threshold": { - "field": [ - "source.ip" - ], - "value": 1, - "cardinality": [ - { - "field": "destination.ip", - "value": 100 - } - ] - }, - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*", - "logs-endpoint.events.network-*" - ], - "language": "kuery" - }, - { - "name": "Unsigned DLL Loaded by Svchost", - "description": "Identifies an unsigned library created in the last 5 minutes and subsequently loaded by a shared windows service (svchost). Adversaries may use this technique to maintain persistence or run with System privileges.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1569", - "name": "System Services", - "reference": "https://attack.mitre.org/techniques/T1569/", - "subtechnique": [ - { - "id": "T1569.002", - "name": "Service Execution", - "reference": "https://attack.mitre.org/techniques/T1569/002/" - } - ] - } - ] - } - ], - "id": "e8a07e67-a2c7-4a67-8dd1-97f98480b141", - "rule_id": "78ef0c95-9dc2-40ac-a8da-5deb6293a14e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.Ext.relative_file_creation_time", - "type": "unknown", - "ecs": false - }, - { - "name": "dll.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "dll.hash.sha256", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "library where host.os.type == \"windows\" and\n\n process.executable : \n (\"?:\\\\Windows\\\\System32\\\\svchost.exe\", \"?:\\\\Windows\\\\Syswow64\\\\svchost.exe\") and \n \n dll.code_signature.trusted != true and \n \n not dll.code_signature.status : (\"trusted\", \"errorExpired\", \"errorCode_endpoint*\") and \n \n dll.hash.sha256 != null and \n \n (\n /* DLL created within 5 minutes of the library load event - compatible with Elastic Endpoint 8.4+ */\n dll.Ext.relative_file_creation_time <= 300 or \n \n /* unusual paths */\n dll.path :(\"?:\\\\ProgramData\\\\*\",\n \"?:\\\\Users\\\\*\",\n \"?:\\\\PerfLogs\\\\*\",\n \"?:\\\\Windows\\\\Tasks\\\\*\",\n \"?:\\\\Intel\\\\*\",\n \"?:\\\\AMD\\\\Temp\\\\*\",\n \"?:\\\\Windows\\\\AppReadiness\\\\*\",\n \"?:\\\\Windows\\\\ServiceState\\\\*\",\n \"?:\\\\Windows\\\\security\\\\*\",\n \"?:\\\\Windows\\\\IdentityCRL\\\\*\",\n \"?:\\\\Windows\\\\Branding\\\\*\",\n \"?:\\\\Windows\\\\csc\\\\*\",\n \"?:\\\\Windows\\\\DigitalLocker\\\\*\",\n \"?:\\\\Windows\\\\en-US\\\\*\",\n \"?:\\\\Windows\\\\wlansvc\\\\*\",\n \"?:\\\\Windows\\\\Prefetch\\\\*\",\n \"?:\\\\Windows\\\\Fonts\\\\*\",\n \"?:\\\\Windows\\\\diagnostics\\\\*\",\n \"?:\\\\Windows\\\\TAPI\\\\*\",\n \"?:\\\\Windows\\\\INF\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\Speech\\\\*\",\n \"?:\\\\windows\\\\tracing\\\\*\",\n \"?:\\\\windows\\\\IME\\\\*\",\n \"?:\\\\Windows\\\\Performance\\\\*\",\n \"?:\\\\windows\\\\intel\\\\*\",\n \"?:\\\\windows\\\\ms\\\\*\",\n \"?:\\\\Windows\\\\dot3svc\\\\*\",\n \"?:\\\\Windows\\\\panther\\\\*\",\n \"?:\\\\Windows\\\\RemotePackages\\\\*\",\n \"?:\\\\Windows\\\\OCR\\\\*\",\n \"?:\\\\Windows\\\\appcompat\\\\*\",\n \"?:\\\\Windows\\\\apppatch\\\\*\",\n \"?:\\\\Windows\\\\addins\\\\*\",\n \"?:\\\\Windows\\\\Setup\\\\*\",\n \"?:\\\\Windows\\\\Help\\\\*\",\n \"?:\\\\Windows\\\\SKB\\\\*\",\n \"?:\\\\Windows\\\\Vss\\\\*\",\n \"?:\\\\Windows\\\\servicing\\\\*\",\n \"?:\\\\Windows\\\\CbsTemp\\\\*\",\n \"?:\\\\Windows\\\\Logs\\\\*\",\n \"?:\\\\Windows\\\\WaaS\\\\*\",\n \"?:\\\\Windows\\\\twain_32\\\\*\",\n \"?:\\\\Windows\\\\ShellExperiences\\\\*\",\n \"?:\\\\Windows\\\\ShellComponents\\\\*\",\n \"?:\\\\Windows\\\\PLA\\\\*\",\n \"?:\\\\Windows\\\\Migration\\\\*\",\n \"?:\\\\Windows\\\\debug\\\\*\",\n \"?:\\\\Windows\\\\Cursors\\\\*\",\n \"?:\\\\Windows\\\\Containers\\\\*\",\n \"?:\\\\Windows\\\\Boot\\\\*\",\n \"?:\\\\Windows\\\\bcastdvr\\\\*\",\n \"?:\\\\Windows\\\\TextInput\\\\*\",\n \"?:\\\\Windows\\\\security\\\\*\",\n \"?:\\\\Windows\\\\schemas\\\\*\",\n \"?:\\\\Windows\\\\SchCache\\\\*\",\n \"?:\\\\Windows\\\\Resources\\\\*\",\n \"?:\\\\Windows\\\\rescache\\\\*\",\n \"?:\\\\Windows\\\\Provisioning\\\\*\",\n \"?:\\\\Windows\\\\PrintDialog\\\\*\",\n \"?:\\\\Windows\\\\PolicyDefinitions\\\\*\",\n \"?:\\\\Windows\\\\media\\\\*\",\n \"?:\\\\Windows\\\\Globalization\\\\*\",\n \"?:\\\\Windows\\\\L2Schemas\\\\*\",\n \"?:\\\\Windows\\\\LiveKernelReports\\\\*\",\n \"?:\\\\Windows\\\\ModemLogs\\\\*\",\n \"?:\\\\Windows\\\\ImmersiveControlPanel\\\\*\",\n \"?:\\\\$Recycle.Bin\\\\*\")\n ) and \n \n not dll.hash.sha256 : \n (\"3ed33e71641645367442e65dca6dab0d326b22b48ef9a4c2a2488e67383aa9a6\", \n \"b4db053f6032964df1b254ac44cb995ffaeb4f3ade09597670aba4f172cf65e4\", \n \"214c75f678bc596bbe667a3b520aaaf09a0e50c364a28ac738a02f867a085eba\", \n \"23aa95b637a1bf6188b386c21c4e87967ede80242327c55447a5bb70d9439244\", \n \"5050b025909e81ae5481db37beb807a80c52fc6dd30c8aa47c9f7841e2a31be7\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential File Transfer via Certreq", - "description": "Identifies Certreq making an HTTP Post request. Adversaries could abuse Certreq to download files or upload data to a remote URL.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Command and Control", - "Tactic: Exfiltration", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://lolbas-project.github.io/lolbas/Binaries/Certreq/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1567", - "name": "Exfiltration Over Web Service", - "reference": "https://attack.mitre.org/techniques/T1567/" - } - ] - } - ], - "id": "2b2ed2f9-7d35-40ff-86eb-b35eaa1d876c", - "rule_id": "79f0a1f7-ed6b-471c-8eb1-23abd6470b1c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"CertReq.exe\" or process.pe.original_file_name == \"CertReq.exe\") and process.args : \"-Post\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS ElastiCache Security Group Created", - "description": "Identifies when an ElastiCache security group has been created.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "A ElastiCache security group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security group creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSecurityGroup.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "d152e988-c72d-452e-b7ae-399104cf6506", - "rule_id": "7b3da11a-60a2-412e-8aa7-011e1eb9ed47", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:elasticache.amazonaws.com and event.action:\"Create Cache Security Group\" and\nevent.outcome:success\n", - "language": "kuery" - }, - { - "name": "Suspicious LSASS Access via MalSecLogon", - "description": "Identifies suspicious access to LSASS handle from a call trace pointing to seclogon.dll and with a suspicious access rights value. This may indicate an attempt to leak an LSASS handle via abusing the Secondary Logon service in preparation for credential access.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 206, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://splintercod3.blogspot.com/p/the-hidden-side-of-seclogon-part-3.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "7cdf0116-caf7-472b-8f4d-bcabef4ead5d", - "rule_id": "7ba58110-ae13-439b-8192-357b0fcfa9d7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.CallTrace", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.GrantedAccess", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetImage", - "type": "keyword", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.code == \"10\" and\n winlog.event_data.TargetImage : \"?:\\\\WINDOWS\\\\system32\\\\lsass.exe\" and\n\n /* seclogon service accessing lsass */\n winlog.event_data.CallTrace : \"*seclogon.dll*\" and process.name : \"svchost.exe\" and\n\n /* PROCESS_CREATE_PROCESS & PROCESS_DUP_HANDLE & PROCESS_QUERY_INFORMATION */\n winlog.event_data.GrantedAccess == \"0x14c0\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Suspicious WMIC XSL Script Execution", - "description": "Identifies WMIC allowlist bypass techniques by alerting on suspicious execution of scripts. When WMIC loads scripting libraries it may be indicative of an allowlist bypass.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1220", - "name": "XSL Script Processing", - "reference": "https://attack.mitre.org/techniques/T1220/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "34c828d3-6a36-48e0-b85b-eb7e07254d20", - "rule_id": "7f370d54-c0eb-4270-ac5a-9a6020585dc6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id with maxspan = 2m\n[process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"WMIC.exe\" or process.pe.original_file_name : \"wmic.exe\") and\n process.args : (\"format*:*\", \"/format*:*\", \"*-format*:*\") and\n not process.command_line : \"* /format:table *\"]\n[any where host.os.type == \"windows\" and (event.category == \"library\" or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : (\"jscript.dll\", \"vbscript.dll\") or file.name : (\"jscript.dll\", \"vbscript.dll\"))]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Enumeration of Kernel Modules via Proc", - "description": "Loadable Kernel Modules (or LKMs) are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. This identifies attempts to enumerate information about a kernel module using the /proc/modules filesystem. This filesystem is used by utilities such as lsmod and kmod to list the available kernel modules.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Setup\nThis rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system. \n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from. \nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /proc/ -p r -k audit_proc\n```\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", - "building_block_type": "default", - "version": 103, - "tags": [ - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Security tools and device drivers may run these programs in order to enumerate kernel modules. Use of these programs by ordinary users is uncommon. These can be exempted by process name or username." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "2f4ae1a4-ad2b-4a4c-ae2f-c85ae1d0434e", - "rule_id": "80084fa9-8677-4453-8680-b891d3c0c778", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "This rule requires the use of the `auditd_manager` integration. `Auditd_manager` is a tool designed to simplify and enhance the management of the audit subsystem in Linux systems. It provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system. The following steps should be executed in order to install and deploy `auditd_manager` on a Linux system.\n```\nKibana -->\nManagement -->\nIntegrations -->\nAuditd Manager -->\nAdd Auditd Manager\n```\n`Auditd_manager` subscribes to the kernel and receives events as they occur without any additional configuration. However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\nFor this detection rule to trigger, the following additional audit rules are required to be added to the integration:\n```\n-w /proc/ -p r -k audit_proc\n```\nAdd the newly installed `auditd manager` to an agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.", - "type": "new_terms", - "query": "host.os.type:linux and event.category:file and event.action:\"opened-file\" and file.path:\"/proc/modules\"\n", - "new_terms_fields": [ - "host.id", - "process.executable" - ], - "history_window_start": "now-7d", - "index": [ - "auditbeat-*", - "logs-auditd_manager.auditd-*" - ], - "language": "kuery" - }, - { - "name": "PowerShell Script Block Logging Disabled", - "description": "Identifies attempts to disable PowerShell Script Block Logging via registry modification. Attackers may disable this logging to conceal their activities in the host and evade detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Script Block Logging Disabled\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks, making it available in various environments and creating an attractive way for attackers to execute code.\n\nPowerShell Script Block Logging is a feature of PowerShell that records the content of all script blocks that it processes, giving defenders visibility of PowerShell scripts and sequences of executed commands.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check whether it makes sense for the user to use PowerShell to complete tasks.\n- Investigate if PowerShell scripts were run after logging was disabled.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- PowerShell Suspicious Discovery Related Windows API Functions - 61ac3638-40a3-44b2-855a-985636ca985e\n- PowerShell Keylogging Script - bd2c86a0-8b61-4457-ab38-96943984e889\n- PowerShell Suspicious Script with Audio Capture Capabilities - 2f2f4939-0b34-40c2-a0a3-844eb7889f43\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n- Suspicious .NET Reflection via PowerShell - e26f042e-c590-4e82-8e05-41e81bd822ad\n- PowerShell Suspicious Payload Encoded and Compressed - 81fe9dc6-a2d7-4192-a2d8-eed98afc766a\n- PowerShell Suspicious Script with Screenshot Capabilities - 959a7353-1129-4aa7-9084-30746b256a70\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://admx.help/?Category=Windows_10_2016&Policy=Microsoft.Policies.PowerShell::EnableScriptBlockLogging" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.002", - "name": "Disable Windows Event Logging", - "reference": "https://attack.mitre.org/techniques/T1562/002/" - } - ] - }, - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "49d19adb-a15f-485e-ab59-86937e4eb7c6", - "rule_id": "818e23e6-2094-4f0e-8c01-22d30f3506c6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\PowerShell\\\\ScriptBlockLogging\\\\EnableScriptBlockLogging\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\PowerShell\\\\ScriptBlockLogging\\\\EnableScriptBlockLogging\"\n ) and registry.data.strings : (\"0\", \"0x00000000\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Temporarily Scheduled Task Creation", - "description": "Indicates the creation and deletion of a scheduled task within a short time interval. Adversaries can use these to proxy malicious execution via the schedule service and perform clean up.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate scheduled tasks may be created during installation of new software." - ], - "references": [ - "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4698" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "c4753448-94c7-49e3-9623-506ad0d40317", - "rule_id": "81ff45f8-f8c2-4e28-992e-5a0e8d98e0fe", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TaskName", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "sequence by winlog.computer_name, winlog.event_data.TaskName with maxspan=5m\n [iam where event.action == \"scheduled-task-created\" and not user.name : \"*$\"]\n [iam where event.action == \"scheduled-task-deleted\" and not user.name : \"*$\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Attempt to Disable IPTables or Firewall", - "description": "Adversaries may attempt to disable the iptables or firewall service in an attempt to affect how a host is allowed to receive or send network traffic.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "3daabdd2-5583-461d-a956-15e696c223c3", - "rule_id": "83e9c2b3-24ef-4c1d-a8cd-5ebafb5dfa2f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and\n (\n /* disable FW */\n (\n (process.name == \"ufw\" and process.args == \"disable\") or\n (process.name == \"iptables\" and process.args == \"-F\" and process.args_count == 2)\n ) or\n\n /* stop FW service */\n (\n ((process.name == \"service\" and process.args == \"stop\") or\n (process.name == \"chkconfig\" and process.args == \"off\") or\n (process.name == \"systemctl\" and process.args in (\"disable\", \"stop\", \"kill\"))) and\n process.args in (\"firewalld\", \"ip6tables\", \"iptables\")\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Remote Credential Access via Registry", - "description": "Identifies remote access to the registry to potentially dump credential data from the Security Account Manager (SAM) registry hive in preparation for credential access and privileges elevation.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Remote Credential Access via Registry\n\nDumping registry hives is a common way to access credential information. Some hives store credential material, such as the SAM hive, which stores locally cached credentials (SAM secrets), and the SECURITY hive, which stores domain cached credentials (LSA secrets). Dumping these hives in combination with the SYSTEM hive enables the attacker to decrypt these secrets.\n\nAttackers can use tools like secretsdump.py or CrackMapExec to dump the registry hives remotely, and use dumped credentials to access other systems in the domain.\n\n#### Possible investigation steps\n\n- Identify the specifics of the involved assets, such as their role, criticality, and associated users.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Determine the privileges of the compromised accounts.\n- Investigate other alerts associated with the user/source host during the past 48 hours.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (e.g., 4624) to the target host.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Related rules\n\n- Credential Acquisition via Registry Hive Dumping - a7e7bfa3-088e-4f13-b29e-3986e0e756b8\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine if other hosts were compromised.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Reimage the host operating system or restore the compromised files to clean versions.\n- Ensure that the machine has the latest security updates and is not running unsupported Windows versions.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/SecureAuthCorp/impacket/blob/master/examples/secretsdump.py", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.002", - "name": "Security Account Manager", - "reference": "https://attack.mitre.org/techniques/T1003/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - } - ], - "id": "ec72664f-fce9-4507-b59f-2ab058f7c7b5", - "rule_id": "850d901a-2a3c-46c6-8b22-55398a01aad8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.header_bytes", - "type": "unknown", - "ecs": false - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "file.size", - "type": "long", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "This rule uses Elastic Endpoint file creation and system integration events for correlation. Both data should be collected from the host for this detection to work.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and\n event.action == \"creation\" and process.name : \"svchost.exe\" and\n file.Ext.header_bytes : \"72656766*\" and user.id : (\"S-1-5-21-*\", \"S-1-12-1-*\") and file.size >= 30000 and\n file.path : (\"?:\\\\Windows\\\\system32\\\\*.tmp\", \"?:\\\\WINDOWS\\\\Temp\\\\*.tmp\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-endpoint.events.*" - ] - }, - { - "name": "AWS EC2 Network Access Control List Deletion", - "description": "Identifies the deletion of an Amazon Elastic Compute Cloud (EC2) network access control list (ACL) or one of its ingress/egress entries.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Network Security Monitoring", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Network ACL's may be deleted by a network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Network ACL deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/delete-network-acl.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteNetworkAcl.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/delete-network-acl-entry.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteNetworkAclEntry.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "2affad75-ffe0-495a-9e87-1253e8631811", - "rule_id": "8623535c-1e17-44e1-aa97-7a0699c3037d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:(DeleteNetworkAcl or DeleteNetworkAclEntry) and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "AWS RDS Security Group Deletion", - "description": "Identifies the deletion of an Amazon Relational Database Service (RDS) Security group.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "An RDS security group deletion may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Security group deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBSecurityGroup.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1531", - "name": "Account Access Removal", - "reference": "https://attack.mitre.org/techniques/T1531/" - } - ] - } - ], - "id": "d1fa7fbd-c2d8-42d3-8916-51fcfcd41c22", - "rule_id": "863cdf31-7fd3-41cf-a185-681237ea277b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:DeleteDBSecurityGroup and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "AWS IAM Group Deletion", - "description": "Identifies the deletion of a specified AWS Identity and Access Management (IAM) resource group. Deleting a resource group does not delete resources that are members of the group; it only deletes the group structure.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A resource group may be deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Resource group deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/delete-group.html", - "https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteGroup.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1531", - "name": "Account Access Removal", - "reference": "https://attack.mitre.org/techniques/T1531/" - } - ] - } - ], - "id": "12092623-9a06-468f-9cb2-99c8c0309054", - "rule_id": "867616ec-41e5-4edc-ada2-ab13ab45de8a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:DeleteGroup and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Security Software Discovery via Grep", - "description": "Identifies the use of the grep command to discover known third-party macOS and Linux security tools, such as Antivirus or Host Firewall details.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Security Software Discovery via Grep\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `grep` utility with arguments compatible to the enumeration of the security software installed on the host. Attackers can use this information to decide whether or not to infect a system, disable protections, use bypasses, etc.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, file modifications, and any spawned child processes.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Endpoint Security installers, updaters and post installation verification scripts." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1518", - "name": "Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/", - "subtechnique": [ - { - "id": "T1518.001", - "name": "Security Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/001/" - } - ] - } - ] - } - ], - "id": "cedd83a3-4970-45f2-b5d0-ee2d878f40a4", - "rule_id": "870aecc0-cea4-4110-af3f-e02e9b373655", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where event.type == \"start\" and\nprocess.name : \"grep\" and user.id != \"0\" and\n not process.parent.executable : \"/Library/Application Support/*\" and\n process.args :\n (\"Little Snitch*\",\n \"Avast*\",\n \"Avira*\",\n \"ESET*\",\n \"BlockBlock*\",\n \"360Sec*\",\n \"LuLu*\",\n \"KnockKnock*\",\n \"kav\",\n \"KIS\",\n \"RTProtectionDaemon*\",\n \"Malware*\",\n \"VShieldScanner*\",\n \"WebProtection*\",\n \"webinspectord*\",\n \"McAfee*\",\n \"isecespd*\",\n \"macmnsvc*\",\n \"masvc*\",\n \"kesl*\",\n \"avscan*\",\n \"guard*\",\n \"rtvscand*\",\n \"symcfgd*\",\n \"scmdaemon*\",\n \"symantec*\",\n \"sophos*\",\n \"osquery*\",\n \"elastic-endpoint*\"\n ) and\n not (\n (process.args : \"Avast\" and process.args : \"Passwords\") or\n (process.parent.args : \"/opt/McAfee/agent/scripts/ma\" and process.parent.args : \"checkhealth\") or\n (process.command_line : (\n \"grep ESET Command-line scanner, version %s -A2\",\n \"grep -i McAfee Web Gateway Core version:\",\n \"grep --color=auto ESET Command-line scanner, version %s -A2\"\n )\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "auditbeat-*" - ] - }, - { - "name": "Enumeration of Administrator Accounts", - "description": "Identifies instances of lower privilege accounts enumerating Administrator accounts or groups using built-in Windows tools.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Enumeration of Administrator Accounts\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `net` and `wmic` utilities to enumerate administrator-related users or groups in the domain and local machine scope. Attackers can use this information to plan their next steps of the attack, such as mapping targets for credential compromise and other post-exploitation activities.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Related rules\n\n- AdFind Command Activity - eda499b8-a073-4e35-9733-22ec71f57f3a\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1069", - "name": "Permission Groups Discovery", - "reference": "https://attack.mitre.org/techniques/T1069/", - "subtechnique": [ - { - "id": "T1069.001", - "name": "Local Groups", - "reference": "https://attack.mitre.org/techniques/T1069/001/" - }, - { - "id": "T1069.002", - "name": "Domain Groups", - "reference": "https://attack.mitre.org/techniques/T1069/002/" - } - ] - }, - { - "id": "T1087", - "name": "Account Discovery", - "reference": "https://attack.mitre.org/techniques/T1087/", - "subtechnique": [ - { - "id": "T1087.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1087/001/" - }, - { - "id": "T1087.002", - "name": "Domain Account", - "reference": "https://attack.mitre.org/techniques/T1087/002/" - } - ] - } - ] - } - ], - "id": "fab62d98-06b0-4332-ac4f-d302be9b6993", - "rule_id": "871ea072-1b71-4def-b016-6278b505138d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (((process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or\n ((process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and\n not process.parent.name : \"net.exe\")) and\n process.args : (\"group\", \"user\", \"localgroup\") and\n process.args : (\"*admin*\", \"Domain Admins\", \"Remote Desktop Users\", \"Enterprise Admins\", \"Organization Management\") and\n not process.args : \"/add\")\n\n or\n\n ((process.name : \"wmic.exe\" or process.pe.original_file_name == \"wmic.exe\") and\n process.args : (\"group\", \"useraccount\"))\n) and not user.id in (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS EventBridge Rule Disabled or Deleted", - "description": "Identifies when a user has disabled or deleted an EventBridge rule. This activity can result in an unintended loss of visibility in applications or a break in the flow with other AWS services.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-20m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "EventBridge Rules could be deleted or disabled by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. EventBridge Rules being deleted or disabled by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeleteRule.html", - "https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DisableRule.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1489", - "name": "Service Stop", - "reference": "https://attack.mitre.org/techniques/T1489/" - } - ] - } - ], - "id": "59ebd3d5-1027-4336-a7da-4be752035f6e", - "rule_id": "87594192-4539-4bc4-8543-23bc3d5bd2b4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:eventbridge.amazonaws.com and event.action:(DeleteRule or DisableRule) and\nevent.outcome:success\n", - "language": "kuery" - }, - { - "name": "Kerberos Traffic from Unusual Process", - "description": "Identifies network connections to the standard Kerberos port from an unusual process. On Windows, the only process that normally performs Kerberos traffic from a domain joined host is lsass.exe.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Kerberos Traffic from Unusual Process\n\nKerberos is the default authentication protocol in Active Directory, designed to provide strong authentication for client/server applications by using secret-key cryptography.\n\nDomain-joined hosts usually perform Kerberos traffic using the `lsass.exe` process. This rule detects the occurrence of traffic on the Kerberos port (88) by processes other than `lsass.exe` to detect the unusual request and usage of Kerberos tickets.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check if the Destination IP is related to a Domain Controller.\n- Review event ID 4769 for suspicious ticket requests.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This rule uses a Kerberos-related port but does not identify the protocol used on that port. HTTP traffic on a non-standard port or destination IP address unrelated to Domain controllers can create false positives.\n- Exceptions can be added for noisy/frequent connections.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n - Ticket requests can be used to investigate potentially compromised accounts.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "HTTP traffic on a non standard port. Verify that the destination IP address is not related to a Domain Controller." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/" - } - ] - } - ], - "id": "f1b3d84a-3bb5-4036-a90d-635ab847abea", - "rule_id": "897dc6b5-b39f-432a-8d75-d3730d50c782", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.address", - "type": "keyword", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - }, - { - "name": "source.port", - "type": "long", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "network where host.os.type == \"windows\" and event.type == \"start\" and network.direction : (\"outgoing\", \"egress\") and\n destination.port == 88 and source.port >= 49152 and process.pid != 4 and \n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\lsass.exe\",\n \"System\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Program Files\\\\Puppet Labs\\\\Puppet\\\\puppet\\\\bin\\\\ruby.exe\",\n \"\\\\device\\\\harddiskvolume?\\\\windows\\\\system32\\\\lsass.exe\",\n \"?:\\\\Program Files\\\\rapid7\\\\nexpose\\\\nse\\\\.DLLCACHE\\\\nseserv.exe\",\n \"?:\\\\Program Files (x86)\\\\GFI\\\\LanGuard 12 Agent\\\\lnsscomm.exe\",\n \"?:\\\\Program Files (x86)\\\\SuperScan\\\\scanner.exe\",\n \"?:\\\\Program Files (x86)\\\\Nmap\\\\nmap.exe\",\n \"?:\\\\Program Files\\\\Tenable\\\\Nessus\\\\nessusd.exe\",\n \"\\\\device\\\\harddiskvolume?\\\\program files (x86)\\\\nmap\\\\nmap.exe\",\n \"?:\\\\Program Files\\\\Docker\\\\Docker\\\\resources\\\\vpnkit.exe\",\n \"?:\\\\Program Files\\\\Docker\\\\Docker\\\\resources\\\\com.docker.vpnkit.exe\",\n \"?:\\\\Program Files\\\\VMware\\\\VMware View\\\\Server\\\\bin\\\\ws_TomcatService.exe\",\n \"?:\\\\Program Files (x86)\\\\DesktopCentral_Agent\\\\bin\\\\dcpatchscan.exe\",\n \"\\\\device\\\\harddiskvolume?\\\\program files (x86)\\\\nmap oem\\\\nmap.exe\",\n \"?:\\\\Program Files (x86)\\\\Nmap OEM\\\\nmap.exe\",\n \"?:\\\\Program Files (x86)\\\\Zscaler\\\\ZSATunnel\\\\ZSATunnel.exe\",\n \"?:\\\\Program Files\\\\JetBrains\\\\PyCharm Community Edition*\\\\bin\\\\pycharm64.exe\",\n \"?:\\\\Program Files (x86)\\\\Advanced Port Scanner\\\\advanced_port_scanner.exe\",\n \"?:\\\\Program Files (x86)\\\\nwps\\\\NetScanTools Pro\\\\NSTPRO.exe\",\n \"?:\\\\Program Files\\\\BlackBerry\\\\UEM\\\\Proxy Server\\\\bin\\\\prunsrv.exe\",\n \"?:\\\\Program Files (x86)\\\\Microsoft Silverlight\\\\sllauncher.exe\",\n \"?:\\\\Windows\\\\System32\\\\MicrosoftEdgeCP.exe\",\n \"?:\\\\Windows\\\\SystemApps\\\\Microsoft.MicrosoftEdge_*\\\\MicrosoftEdge.exe\", \n \"?:\\\\Program Files (x86)\\\\Microsoft\\\\EdgeUpdate\\\\MicrosoftEdgeUpdate.exe\",\n \"?:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\", \n \"?:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\", \n \"?:\\\\Program Files (x86)\\\\Microsoft\\\\Edge\\\\Application\\\\msedge.exe\", \n \"?:\\\\Program Files\\\\Mozilla Firefox\\\\firefox.exe\", \n \"?:\\\\Program Files\\\\Internet Explorer\\\\iexplore.exe\",\n \"?:\\\\Program Files (x86)\\\\Internet Explorer\\\\iexplore.exe\"\n ) and\n destination.address != \"127.0.0.1\" and destination.address != \"::1\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Command Prompt Network Connection", - "description": "Identifies cmd.exe making a network connection. Adversaries could abuse cmd.exe to download or execute malware from a remote URL.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Command Prompt Network Connection\n\nAttackers commonly transfer tooling or malware from external systems into a compromised environment using a command and control channel. However, they can also abuse signed utilities to drop these files.\n\nThis rule looks for a network connection to an external address from the `cmd.exe` utility, which can indicate the abuse of the utility to download malicious files and tools.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n - Investigate the file digital signature and process original filename, if suspicious, treat it as potential malware.\n- Investigate the target host that the signed binary is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Examine if any file was downloaded and check if it is an executable or script.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the downloaded file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of destination IP address and file name conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Administrators may use the command prompt for regular administrative tasks. It's important to baseline your environment for network connections being made from the command prompt to determine any abnormal use of this tool." - ], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - } - ], - "id": "bf99ce78-5c0a-4da9-b82d-5cc2fc0420eb", - "rule_id": "89f9a4b0-9f8f-4ee0-8823-c4751a6d6696", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"cmd.exe\" and event.type == \"start\"]\n [network where host.os.type == \"windows\" and process.name : \"cmd.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\",\n \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\",\n \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Suspicious Execution from a Mounted Device", - "description": "Identifies when a script interpreter or signed binary is launched via a non-standard working directory. An attacker may use this technique to evade defenses.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.microsoft.com/security/blog/2021/05/27/new-sophisticated-email-based-attack-from-nobelium/", - "https://www.volexity.com/blog/2021/05/27/suspected-apt29-operation-launches-election-fraud-themed-phishing-campaigns/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.005", - "name": "Mshta", - "reference": "https://attack.mitre.org/techniques/T1218/005/" - }, - { - "id": "T1218.010", - "name": "Regsvr32", - "reference": "https://attack.mitre.org/techniques/T1218/010/" - }, - { - "id": "T1218.011", - "name": "Rundll32", - "reference": "https://attack.mitre.org/techniques/T1218/011/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - } - ], - "id": "5323ad13-618a-4dd8-ae62-4448b39ee416", - "rule_id": "8a1d4831-3ce6-4859-9891-28931fa6101d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.working_directory", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.executable : \"C:\\\\*\" and\n (process.working_directory : \"?:\\\\\" and not process.working_directory: \"C:\\\\\") and\n process.parent.name : \"explorer.exe\" and\n process.name : (\"rundll32.exe\", \"mshta.exe\", \"powershell.exe\", \"pwsh.exe\", \"cmd.exe\", \"regsvr32.exe\",\n \"cscript.exe\", \"wscript.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Suspicious JAVA Child Process", - "description": "Identifies suspicious child processes of the Java interpreter process. This may indicate an attempt to execute a malicious JAR file or an exploitation attempt via a JAVA specific vulnerability.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Java Child Process\n\nThis rule identifies a suspicious child process of the Java interpreter process. It may indicate an attempt to execute a malicious JAR file or an exploitation attempt via a Java specific vulnerability.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, file modifications, and any spawned child processes.\n- Examine the command line to determine if the command executed is potentially harmful or malicious.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of process and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 205, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.lunasec.io/docs/blog/log4j-zero-day/", - "https://github.com/christophetd/log4shell-vulnerable-app", - "https://www.blackhat.com/docs/us-16/materials/us-16-Munoz-A-Journey-From-JNDI-LDAP-Manipulation-To-RCE.pdf", - "https://www.elastic.co/security-labs/detecting-log4j2-with-elastic-security", - "https://www.elastic.co/security-labs/analysis-of-log4shell-cve-2021-45046" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.007", - "name": "JavaScript", - "reference": "https://attack.mitre.org/techniques/T1059/007/" - } - ] - } - ] - } - ], - "id": "956568ce-ec59-4be0-b4bf-468c3c3bff35", - "rule_id": "8acb7614-1d92-4359-bfcf-478b6d9de150", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "new_terms", - "query": "event.category:process and event.type:(\"start\" or \"process_started\") and process.parent.name:\"java\" and process.name:(\n \"sh\" or \"bash\" or \"dash\" or \"ksh\" or \"tcsh\" or \"zsh\" or \"curl\" or \"wget\"\n)\n", - "new_terms_fields": [ - "host.id", - "process.command_line" - ], - "history_window_start": "now-7d", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "RDP (Remote Desktop Protocol) from the Internet", - "description": "This rule detects network events that may indicate the use of RDP traffic from the Internet. RDP is commonly used by system administrators to remotely control a system for maintenance or to use shared resources. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "timeline_id": "300afc76-072d-4261-864d-4149714bf3f1", - "timeline_title": "Comprehensive Network Timeline", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Tactic: Command and Control", - "Domain: Endpoint", - "Use Case: Threat Detection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Some network security policies allow RDP directly from the Internet but usage that is unfamiliar to server or network owners can be unexpected and suspicious. RDP services may be exposed directly to the Internet in some networks such as cloud environments. In such cases, only RDP gateways, bastions or jump servers may be expected expose RDP directly to the Internet and can be exempted from this rule. RDP may be required by some work-flows such as remote access and support for specialized software products and servers. Such work-flows are usually known and not unexpected." - ], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - } - ], - "id": "739ffc2e-6a23-44be-afeb-6aadaf0d4eb0", - "rule_id": "8c1bdde8-4204-45c0-9e0c-c85ca3902488", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and (destination.port:3389 or event.dataset:zeek.rdp) and\n not source.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n ) and\n destination.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n )\n", - "language": "kuery" - }, - { - "name": "Unusual Child Process of dns.exe", - "description": "Identifies an unexpected process spawning from dns.exe, the process responsible for Windows DNS server services, which may indicate activity related to remote code execution or other forms of exploitation.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Child Process of dns.exe\n\nSIGRed (CVE-2020-1350) is a wormable, critical vulnerability in the Windows DNS server that affects Windows Server versions 2003 to 2019 and can be triggered by a malicious DNS response. Because the service is running in elevated privileges (SYSTEM), an attacker that successfully exploits it is granted Domain Administrator rights. This can effectively compromise the entire corporate infrastructure.\n\nThis rule looks for unusual children of the `dns.exe` process, which can indicate the exploitation of the SIGRed or a similar remote code execution vulnerability in the DNS server.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes.\n - Any suspicious or abnormal child process spawned from dns.exe should be carefully reviewed and investigated. It's impossible to predict what an adversary may deploy as the follow-on process after the exploit, but built-in discovery/enumeration utilities should be top of mind (`whoami.exe`, `netstat.exe`, `systeminfo.exe`, `tasklist.exe`).\n - Built-in Windows programs that contain capabilities used to download and execute additional payloads should also be considered. This is not an exhaustive list, but ideal candidates to start out would be: `mshta.exe`, `powershell.exe`, `regsvr32.exe`, `rundll32.exe`, `wscript.exe`, `wmic.exe`.\n - If a denial-of-service (DoS) exploit is successful and DNS Server service crashes, be mindful of potential child processes related to `werfault.exe` occurring.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the host during the past 48 hours.\n- Check whether the server is vulnerable to CVE-2020-1350.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system or restore the compromised server to a clean state.\n- Install the latest patches on systems that run Microsoft DNS Server.\n- Consider the implementation of a patch management system, such as the Windows Server Update Services (WSUS).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Werfault.exe will legitimately spawn when dns.exe crashes, but the DNS service is very stable and so this is a low occurring event. Denial of Service (DoS) attempts by intentionally crashing the service will also cause werfault.exe to spawn." - ], - "references": [ - "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/", - "https://msrc-blog.microsoft.com/2020/07/14/july-2020-security-update-cve-2020-1350-vulnerability-in-windows-domain-name-system-dns-server/", - "https://github.com/maxpl0it/CVE-2020-1350-DoS", - "https://www.elastic.co/security-labs/detection-rules-for-sigred-vulnerability" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "351e50f8-27ff-4c89-9de4-c56cdb3824de", - "rule_id": "8c37dc0e-e3ac-4c97-8aa0-cf6a9122de45", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"dns.exe\" and\n not process.name : \"conhost.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Privilege Escalation via PKEXEC", - "description": "Identifies an attempt to exploit a local privilege escalation in polkit pkexec (CVE-2021-4034) via unsecure environment variable injection. Successful exploitation allows an unprivileged user to escalate to the root user.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://seclists.org/oss-sec/2022/q1/80", - "https://haxx.in/files/blasty-vs-pkexec.c" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.007", - "name": "Path Interception by PATH Environment Variable", - "reference": "https://attack.mitre.org/techniques/T1574/007/" - } - ] - } - ] - } - ], - "id": "6271e4ed-42d2-46c1-89fe-1a44b98409f2", - "rule_id": "8da41fc9-7735-4b24-9cc6-c78dfc9fc9c9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "file where host.os.type == \"linux\" and file.path : \"/*GCONV_PATH*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Potential Port Monitor or Print Processor Registration Abuse", - "description": "Identifies port monitor and print processor registry modifications. Adversaries may abuse port monitor and print processors to run malicious DLLs during system boot that will be executed as SYSTEM for privilege escalation and/or persistence, if permissions allow writing a fully-qualified pathname for that DLL.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.welivesecurity.com/2020/05/21/no-game-over-winnti-group/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.010", - "name": "Port Monitors", - "reference": "https://attack.mitre.org/techniques/T1547/010/" - }, - { - "id": "T1547.012", - "name": "Print Processors", - "reference": "https://attack.mitre.org/techniques/T1547/012/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.010", - "name": "Port Monitors", - "reference": "https://attack.mitre.org/techniques/T1547/010/" - }, - { - "id": "T1547.012", - "name": "Print Processors", - "reference": "https://attack.mitre.org/techniques/T1547/012/" - } - ] - } - ] - } - ], - "id": "e9255167-487d-4de0-8f9f-78d1875aa7b6", - "rule_id": "8f3e91c7-d791-4704-80a1-42c160d7aa27", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Print\\\\Monitors\\\\*\",\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Print\\\\Environments\\\\Windows*\\\\Print Processors\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Print\\\\Monitors\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Print\\\\Environments\\\\Windows*\\\\Print Processors\\\\*\"\n ) and registry.data.strings : \"*.dll\" and\n /* exclude SYSTEM SID - look for changes by non-SYSTEM user */\n not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Hping Process Activity", - "description": "Hping ran on a Linux host. Hping is a FOSS command-line packet analyzer and has the ability to construct network packets for a wide variety of network security testing applications, including scanning and firewall auditing.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Normal use of hping is uncommon apart from security testing and research. Use by non-security engineers is very uncommon." - ], - "references": [ - "https://en.wikipedia.org/wiki/Hping" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "0f292dad-1d5b-4637-90da-eef02c652fa7", - "rule_id": "90169566-2260-4824-b8e4-8615c3b4ed52", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\"\nand process.name in (\"hping\", \"hping2\", \"hping3\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "AWS Deletion of RDS Instance or Cluster", - "description": "Identifies the deletion of an Amazon Relational Database Service (RDS) Aurora database cluster, global database cluster, or database instance.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Clusters or instances may be deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Cluster or instance deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/delete-db-cluster.html", - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBCluster.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/delete-global-cluster.html", - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteGlobalCluster.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/delete-db-instance.html", - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBInstance.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - } - ], - "id": "e1a91a83-fbe4-4052-a4a7-2f085e186c6b", - "rule_id": "9055ece6-2689-4224-a0e0-b04881e1f8ad", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:(DeleteDBCluster or DeleteGlobalCluster or DeleteDBInstance)\nand event.outcome:success\n", - "language": "kuery" - }, - { - "name": "AWS WAF Access Control List Deletion", - "description": "Identifies the deletion of a specified AWS Web Application Firewall (WAF) access control list.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Network Security Monitoring", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Firewall ACL's may be deleted by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Web ACL deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/waf-regional/delete-web-acl.html", - "https://docs.aws.amazon.com/waf/latest/APIReference/API_wafRegional_DeleteWebACL.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "bdb756d6-a8e1-445e-8809-e7c5f333a837", - "rule_id": "91d04cd4-47a9-4334-ab14-084abe274d49", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.action:DeleteWebACL and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "AWS Security Token Service (STS) AssumeRole Usage", - "description": "Identifies the use of AssumeRole. AssumeRole returns a set of temporary security credentials that can be used to access AWS resources. An adversary could use those credentials to move laterally and escalate privileges.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Automated processes that use Terraform may lead to false positives." - ], - "references": [ - "https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1550", - "name": "Use Alternate Authentication Material", - "reference": "https://attack.mitre.org/techniques/T1550/", - "subtechnique": [ - { - "id": "T1550.001", - "name": "Application Access Token", - "reference": "https://attack.mitre.org/techniques/T1550/001/" - } - ] - } - ] - } - ], - "id": "eb4da9f1-bcd8-4886-833d-5115ff352837", - "rule_id": "93075852-b0f5-4b8b-89c3-a226efae5726", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "aws.cloudtrail.user_identity.session_context.session_issuer.type", - "type": "keyword", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:sts.amazonaws.com and event.action:AssumedRole and\naws.cloudtrail.user_identity.session_context.session_issuer.type:Role and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Sudoers File Modification", - "description": "A sudoers file specifies the commands that users or groups can run and from which terminals. Adversaries can take advantage of these configurations to execute commands as other users or spawn processes with higher privileges.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 203, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.003", - "name": "Sudo and Sudo Caching", - "reference": "https://attack.mitre.org/techniques/T1548/003/" - } - ] - } - ] - } - ], - "id": "96f81a97-0db0-4111-8330-1642c04928de", - "rule_id": "931e25a5-0f5e-4ae0-ba0d-9e94eff7e3a4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "new_terms", - "query": "event.category:file and event.type:change and file.path:(/etc/sudoers* or /private/etc/sudoers*)\n", - "new_terms_fields": [ - "host.id", - "process.executable", - "file.path" - ], - "history_window_start": "now-7d", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "AWS VPC Flow Logs Deletion", - "description": "Identifies the deletion of one or more flow logs in AWS Elastic Compute Cloud (EC2). An adversary may delete flow logs in an attempt to evade defenses.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS VPC Flow Logs Deletion\n\nVPC Flow Logs is an AWS feature that enables you to capture information about the IP traffic going to and from network interfaces in your virtual private cloud (VPC). Flow log data can be published to Amazon CloudWatch Logs or Amazon S3.\n\nThis rule identifies the deletion of VPC flow logs using the API `DeleteFlowLogs` action. Attackers can do this to cover their tracks and impact security monitoring that relies on this source.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n- Administrators may rotate these logs after a certain period as part of their retention policy or after importing them to a SIEM.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Log Auditing", - "Resources: Investigation Guide", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Flow log deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/delete-flow-logs.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteFlowLogs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "49a2b4b3-eed7-4bde-9fc9-91e8c80f03f2", - "rule_id": "9395fd2c-9947-4472-86ef-4aceb2f7e872", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:DeleteFlowLogs and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Attempt to Create Okta API Token", - "description": "Detects attempts to create an Okta API token. An adversary may create an Okta API token to maintain access to an organization's network while they work to achieve their objectives. An attacker may abuse an API token to execute techniques such as creating user accounts or disabling security rules or policies.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "If the behavior of creating Okta API tokens is expected, consider adding exceptions to this rule to filter false positives." - ], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/" - } - ] - } - ], - "id": "691db767-4792-42f4-8072-bffd06f02162", - "rule_id": "96b9f4ea-0e8c-435b-8d53-2096e75fcac5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:system.api_token.create\n", - "language": "kuery" - }, - { - "name": "AWS SAML Activity", - "description": "Identifies when SAML activity has occurred in AWS. An adversary could manipulate SAML to maintain access to the target.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "SAML Provider could be updated by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. SAML Provider updates by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateSAMLProvider.html", - "https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithSAML.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1550", - "name": "Use Alternate Authentication Material", - "reference": "https://attack.mitre.org/techniques/T1550/", - "subtechnique": [ - { - "id": "T1550.001", - "name": "Application Access Token", - "reference": "https://attack.mitre.org/techniques/T1550/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "ca8b04a8-9484-4b78-b03e-8066927f4316", - "rule_id": "979729e7-0c52-4c4c-b71e-88103304a79f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:(iam.amazonaws.com or sts.amazonaws.com) and event.action:(Assumerolewithsaml or\nUpdateSAMLProvider) and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Suspicious Renaming of ESXI Files", - "description": "Identifies instances where VMware-related files, such as those with extensions like \".vmdk\", \".vmx\", \".vmxf\", \".vmsd\", \".vmsn\", \".vswp\", \".vmss\", \".nvram\", and \".vmem\", are renamed on a Linux system. The rule monitors for the \"rename\" event action associated with these file types, which could indicate malicious activity.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.003", - "name": "Rename System Utilities", - "reference": "https://attack.mitre.org/techniques/T1036/003/" - } - ] - } - ] - } - ], - "id": "afb6be8e-44d2-4c89-ad7d-fa6bd025eada", - "rule_id": "97db8b42-69d8-4bf3-9fd4-c69a1d895d68", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.original.name", - "type": "unknown", - "ecs": false - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "file where host.os.type == \"linux\" and event.action == \"rename\" and\nfile.Ext.original.name : (\"*.vmdk\", \"*.vmx\", \"*.vmxf\", \"*.vmsd\", \"*.vmsn\", \"*.vswp\", \"*.vmss\", \"*.nvram\", \"*.vmem\")\nand not file.name : (\"*.vmdk\", \"*.vmx\", \"*.vmxf\", \"*.vmsd\", \"*.vmsn\", \"*.vswp\", \"*.vmss\", \"*.nvram\", \"*.vmem\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "AWS EC2 Snapshot Activity", - "description": "An attempt was made to modify AWS EC2 snapshot attributes. Snapshots are sometimes shared by threat actors in order to exfiltrate bulk data from an EC2 fleet. If the permissions were modified, verify the snapshot was not shared with an unauthorized or unexpected AWS account.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS EC2 Snapshot Activity\n\nAmazon EC2 snapshots are a mechanism to create point-in-time references to data that reside in storage volumes. System administrators commonly use this for backup operations and data recovery.\n\nThis rule looks for the modification of snapshot attributes using the API `ModifySnapshotAttribute` action. This can be used to share snapshots with unauthorized third parties, giving others access to all the data on the snapshot.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Search for dry run attempts against the resource ID of the snapshot from other user accounts within CloudTrail.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences involving other users.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Check if the shared permissions of the snapshot were modified to `Public` or include unknown account IDs.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Exfiltration", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "IAM users may occasionally share EC2 snapshots with another AWS account belonging to the same organization. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/modify-snapshot-attribute.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifySnapshotAttribute.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1537", - "name": "Transfer Data to Cloud Account", - "reference": "https://attack.mitre.org/techniques/T1537/" - } - ] - } - ], - "id": "4dab877a-20e4-4cd9-b588-03dbb7e13ba4", - "rule_id": "98fd7407-0bd5-5817-cda0-3fcc33113a56", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:ModifySnapshotAttribute\n", - "language": "kuery" - }, - { - "name": "Suspicious Explorer Child Process", - "description": "Identifies a suspicious Windows explorer child process. Explorer.exe can be abused to launch malicious scripts or executables from a trusted parent process.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - }, - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - }, - { - "id": "T1059.005", - "name": "Visual Basic", - "reference": "https://attack.mitre.org/techniques/T1059/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "59959ed9-f4dd-4ba6-bee0-a7ff44499792", - "rule_id": "9a5b4e31-6cde-4295-9ff7-6be1b8567e1b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n process.name : (\"cscript.exe\", \"wscript.exe\", \"powershell.exe\", \"rundll32.exe\", \"cmd.exe\", \"mshta.exe\", \"regsvr32.exe\") or\n process.pe.original_file_name in (\"cscript.exe\", \"wscript.exe\", \"PowerShell.EXE\", \"RUNDLL32.EXE\", \"Cmd.Exe\", \"MSHTA.EXE\", \"REGSVR32.EXE\")\n ) and\n /* Explorer started via DCOM */\n process.parent.name : \"explorer.exe\" and process.parent.args : \"-Embedding\" and\n not process.parent.args:\n (\n /* Noisy CLSID_SeparateSingleProcessExplorerHost Explorer COM Class IDs */\n \"/factory,{5BD95610-9434-43C2-886C-57852CC8A120}\",\n \"/factory,{ceff45ee-c862-41de-aee2-a022c81eda92}\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Scheduled Tasks AT Command Enabled", - "description": "Identifies attempts to enable the Windows scheduled tasks AT command via the registry. Attackers may use this method to move laterally or persist locally. The AT command has been deprecated since Windows 8 and Windows Server 2012, but still exists for backwards compatibility.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-scheduledjob" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.002", - "name": "At", - "reference": "https://attack.mitre.org/techniques/T1053/002/" - } - ] - } - ] - } - ], - "id": "56a9b14d-7856-40ed-8dd0-abdf1de1d1d5", - "rule_id": "9aa0e1f6-52ce-42e1-abb3-09657cee2698", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\Configuration\\\\EnableAt\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\Configuration\\\\EnableAt\"\n ) and registry.data.strings : (\"1\", \"0x00000001\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Persistence via WMI Event Subscription", - "description": "An adversary can use Windows Management Instrumentation (WMI) to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. Adversaries may use the capabilities of WMI to subscribe to an event and execute arbitrary code when that event occurs, providing persistence on a system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.003", - "name": "Windows Management Instrumentation Event Subscription", - "reference": "https://attack.mitre.org/techniques/T1546/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "61cf1fcb-e940-4e30-a4e0-4f668ef83a35", - "rule_id": "9b6813a1-daf1-457e-b0e6-0bb4e55b8a4c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"wmic.exe\" or process.pe.original_file_name == \"wmic.exe\") and\n process.args : \"create\" and\n process.args : (\"ActiveScriptEventConsumer\", \"CommandLineEventConsumer\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Hosts File Modified", - "description": "The hosts file on endpoints is used to control manual IP address to hostname resolutions. The hosts file is the first point of lookup for DNS hostname resolution so if adversaries can modify the endpoint hosts file, they can route traffic to malicious infrastructure. This rule detects modifications to the hosts file on Microsoft Windows, Linux (Ubuntu or RHEL) and macOS systems.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "timeline_id": "4d4c0b59-ea83-483f-b8c1-8c360ee53c5c", - "timeline_title": "Comprehensive File Timeline", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Hosts File Modified\n\nOperating systems use the hosts file to map a connection between an IP address and domain names before going to domain name servers. Attackers can abuse this mechanism to route traffic to malicious infrastructure or disrupt security that depends on server communications. For example, Russian threat actors modified this file on a domain controller to redirect Duo MFA calls to localhost instead of the Duo server, which prevented the MFA service from contacting its server to validate MFA login. This effectively disabled MFA for active domain accounts because the default policy of Duo for Windows is to \"Fail open\" if the MFA server is unreachable. This can happen in any MFA implementation and is not exclusive to Duo. Find more details in this [CISA Alert](https://www.cisa.gov/uscert/ncas/alerts/aa22-074a).\n\nThis rule identifies modifications in the hosts file across multiple operating systems using process creation events for Linux and file events in Windows and macOS.\n\n#### Possible investigation steps\n\n- Identify the specifics of the involved assets, such as role, criticality, and associated users.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the changes to the hosts file by comparing it against file backups, volume shadow copies, and other restoration mechanisms.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and the configuration was justified.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider isolating the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges of the administrator account that performed the action.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: Windows", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Impact", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/beats/auditbeat/current/auditbeat-reference-yml.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1565", - "name": "Data Manipulation", - "reference": "https://attack.mitre.org/techniques/T1565/", - "subtechnique": [ - { - "id": "T1565.001", - "name": "Stored Data Manipulation", - "reference": "https://attack.mitre.org/techniques/T1565/001/" - } - ] - } - ] - } - ], - "id": "10903d7f-9deb-4fb1-a059-8b9ac9f3eb5f", - "rule_id": "9c260313-c811-4ec8-ab89-8f6530e0246c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "For Windows systems using Auditbeat, this rule requires adding `C:/Windows/System32/drivers/etc` as an additional path in the 'file_integrity' module of auditbeat.yml.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "any where\n\n /* file events for creation; file change events are not captured by some of the included sources for linux and so may\n miss this, which is the purpose of the process + command line args logic below */\n (\n event.category == \"file\" and event.type in (\"change\", \"creation\") and\n file.path : (\"/private/etc/hosts\", \"/etc/hosts\", \"?:\\\\Windows\\\\System32\\\\drivers\\\\etc\\\\hosts\") and \n not process.name in (\"dockerd\", \"rootlesskit\", \"podman\", \"crio\")\n )\n or\n\n /* process events for change targeting linux only */\n (\n event.category == \"process\" and event.type in (\"start\") and\n process.name in (\"nano\", \"vim\", \"vi\", \"emacs\", \"echo\", \"sed\") and\n process.args : (\"/etc/hosts\") and \n not process.parent.name in (\"dhclient-script\", \"google_set_hostname\")\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Command Shell Activity Started via RunDLL32", - "description": "Identifies command shell activity started via RunDLL32, which is commonly abused by attackers to host malicious code.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Credential Access", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Microsoft Windows installers leveraging RunDLL32 for installation." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.011", - "name": "Rundll32", - "reference": "https://attack.mitre.org/techniques/T1218/011/" - } - ] - } - ] - } - ], - "id": "0e71005e-cc1f-4639-9f91-bce1ea35d609", - "rule_id": "9ccf3ce0-0057-440a-91f5-870c6ad39093", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"cmd.exe\", \"powershell.exe\") and\n process.parent.name : \"rundll32.exe\" and process.parent.command_line != null and\n /* common FPs can be added here */\n not process.parent.args : (\"C:\\\\Windows\\\\System32\\\\SHELL32.dll,RunAsNewUser_RunDLL\",\n \"C:\\\\WINDOWS\\\\*.tmp,zzzzInvokeManagedCustomActionOutOfProc\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Microsoft Build Engine Started by a System Process", - "description": "An instance of MSBuild, the Microsoft Build Engine, was started by Explorer or the WMI (Windows Management Instrumentation) subsystem. This behavior is unusual and is sometimes used by malicious payloads.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/", - "subtechnique": [ - { - "id": "T1127.001", - "name": "MSBuild", - "reference": "https://attack.mitre.org/techniques/T1127/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [] - } - ], - "id": "93355c00-8736-454f-95a0-f6e1364be4d8", - "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"MSBuild.exe\" and\n process.parent.name : (\"explorer.exe\", \"wmiprvse.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "A scheduled task was updated", - "description": "Indicates the update of a scheduled task using Windows event logs. Adversaries can use these to establish persistence, by changing the configuration of a legit scheduled task. Some changes such as disabling or enabling a scheduled task are common and may may generate noise.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 8, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate scheduled tasks may be created during installation of new software." - ], - "references": [ - "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4698" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "68ba5269-2de6-4608-96ef-8b3e213ad13a", - "rule_id": "a02cb68e-7c93-48d1-93b2-2c39023308eb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.SubjectUserSid", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TaskName", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "iam where event.action == \"scheduled-task-updated\" and\n\n /* excluding tasks created by the computer account */\n not user.name : \"*$\" and \n not winlog.event_data.TaskName : \"*Microsoft*\" and \n not winlog.event_data.TaskName :\n (\"\\\\User_Feed_Synchronization-*\",\n \"\\\\OneDrive Reporting Task-S-1-5-21*\",\n \"\\\\OneDrive Reporting Task-S-1-12-1-*\",\n \"\\\\Hewlett-Packard\\\\HP Web Products Detection\",\n \"\\\\Hewlett-Packard\\\\HPDeviceCheck\", \n \"\\\\Microsoft\\\\Windows\\\\UpdateOrchestrator\\\\UpdateAssistant\", \n \"\\\\IpamDnsProvisioning\", \n \"\\\\Microsoft\\\\Windows\\\\UpdateOrchestrator\\\\UpdateAssistantAllUsersRun\", \n \"\\\\Microsoft\\\\Windows\\\\UpdateOrchestrator\\\\UpdateAssistantCalendarRun\", \n \"\\\\Microsoft\\\\Windows\\\\UpdateOrchestrator\\\\UpdateAssistantWakeupRun\", \n \"\\\\Microsoft\\\\Windows\\\\.NET Framework\\\\.NET Framework NGEN v*\", \n \"\\\\Microsoft\\\\VisualStudio\\\\Updates\\\\BackgroundDownload\") and \n not winlog.event_data.SubjectUserSid : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "File Deletion via Shred", - "description": "Malware or other files dropped or created on a system by an adversary may leave traces behind as to what was done within a network and how. Adversaries may remove these files over the course of an intrusion to keep their footprint low or remove them at the end as part of the post-intrusion cleanup process.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.004", - "name": "File Deletion", - "reference": "https://attack.mitre.org/techniques/T1070/004/" - } - ] - } - ] - } - ], - "id": "ca6b0023-b5d4-4918-8b75-f7be6f491160", - "rule_id": "a1329140-8de3-4445-9f87-908fb6d824f4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "query", - "index": [ - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:linux and event.type:start and process.name:shred and\nprocess.args:(\"-u\" or \"--remove\" or \"-z\" or \"--zero\") and not process.parent.name:logrotate\n", - "language": "kuery" - }, - { - "name": "Potential Reverse Shell Activity via Terminal", - "description": "Identifies the execution of a shell process with suspicious arguments which may be indicative of reverse shell activity.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Reverse Shell Activity via Terminal\n\nA reverse shell is a mechanism that's abused to connect back to an attacker-controlled system. It effectively redirects the system's input and output and delivers a fully functional remote shell to the attacker. Even private systems are vulnerable since the connection is outgoing. This activity is typically the result of vulnerability exploitation, malware infection, or penetration testing.\n\nThis rule identifies commands that are potentially related to reverse shell activities using shell applications.\n\n#### Possible investigation steps\n\n- Examine the command line and extract the target domain or IP address information.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - Scope other potentially compromised hosts in your environment by mapping hosts that also communicated with the domain or IP address.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, file modifications, and any spawned child processes.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Take actions to terminate processes and connections used by the attacker.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md", - "https://github.com/WangYihang/Reverse-Shell-Manager", - "https://www.netsparker.com/blog/web-security/understanding-reverse-shells/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "0ef72b8b-b96a-4c7a-91c0-9528b9ac6aa6", - "rule_id": "a1a0375f-22c2-48c0-81a4-7c2d11cc6856", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where event.type in (\"start\", \"process_started\") and\n process.name in (\"sh\", \"bash\", \"zsh\", \"dash\", \"zmodload\") and\n process.args : (\"*/dev/tcp/*\", \"*/dev/udp/*\", \"*zsh/net/tcp*\", \"*zsh/net/udp*\") and\n\n /* noisy FPs */\n not (process.parent.name : \"timeout\" and process.executable : \"/var/lib/docker/overlay*\") and\n not process.command_line : (\n \"*/dev/tcp/sirh_db/*\", \"*/dev/tcp/remoteiot.com/*\", \"*dev/tcp/elk.stag.one/*\", \"*dev/tcp/kafka/*\",\n \"*/dev/tcp/$0/$1*\", \"*/dev/tcp/127.*\", \"*/dev/udp/127.*\", \"*/dev/tcp/localhost/*\", \"*/dev/tcp/itom-vault/*\") and\n not process.parent.command_line : \"runc init\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "DNS-over-HTTPS Enabled via Registry", - "description": "Identifies when a user enables DNS-over-HTTPS. This can be used to hide internet activity or the process of exfiltrating data. With this enabled, an organization will lose visibility into data such as query type, response, and originating IP, which are used to determine bad actors.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://www.tenforums.com/tutorials/151318-how-enable-disable-dns-over-https-doh-microsoft-edge.html", - "https://chromeenterprise.google/policies/?policy=DnsOverHttpsMode" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - }, - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "9e528d55-826c-41df-9ca4-aabd36d89bb8", - "rule_id": "a22a09c2-2162-4df0-a356-9aacbeb56a04", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n (registry.path : \"*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Edge\\\\BuiltInDnsClientEnabled\" and\n registry.data.strings : \"1\") or\n (registry.path : \"*\\\\SOFTWARE\\\\Google\\\\Chrome\\\\DnsOverHttpsMode\" and\n registry.data.strings : \"secure\") or\n (registry.path : \"*\\\\SOFTWARE\\\\Policies\\\\Mozilla\\\\Firefox\\\\DNSOverHTTPS\" and\n registry.data.strings : \"1\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "PowerShell Mailbox Collection Script", - "description": "Detects PowerShell scripts that can be used to collect data from mailboxes. Adversaries may target user email to collect sensitive information.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Mailbox Collection Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nEmail mailboxes and their information can be valuable assets for attackers. Company mailboxes often contain sensitive information such as login credentials, intellectual property, financial data, and personal information, making them high-value targets for malicious actors.\n\nThis rule identifies scripts that contains methods and classes that can be abused to collect emails from local and remote mailboxes.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Determine whether the script was executed and capture relevant information, such as arguments that reveal intent or are indicators of compromise (IoCs).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Determine whether the script stores the captured data locally.\n- Investigate whether the script contains exfiltration capabilities and identify the exfiltration server.\n - Assess network data to determine if the host communicated with the exfiltration server.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and it is done with proper approval.\n\n### Related rules\n\n- Exporting Exchange Mailbox via PowerShell - 6aace640-e631-4870-ba8e-5fdda09325db\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If the involved host is not the Exchange server, isolate the host to prevent further post-compromise behavior.\n- Prioritize cases that involve personally identifiable information (PII) or other classified data.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Data Source: PowerShell Logs", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/dafthack/MailSniper/blob/master/MailSniper.ps1", - "https://github.com/center-for-threat-informed-defense/adversary_emulation_library/blob/master/apt29/Archive/CALDERA_DIY/evals/payloads/stepSeventeen_email.ps1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1114", - "name": "Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/", - "subtechnique": [ - { - "id": "T1114.001", - "name": "Local Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/001/" - }, - { - "id": "T1114.002", - "name": "Remote Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "861c7822-a0ed-4348-a170-37998f1ac7fd", - "rule_id": "a2d04374-187c-4fd9-b513-3ad4e7fdd67a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n (\n powershell.file.script_block_text : (\n \"Microsoft.Office.Interop.Outlook\" or\n \"Interop.Outlook.olDefaultFolders\" or\n \"::olFolderInBox\"\n ) or\n powershell.file.script_block_text : (\n \"Microsoft.Exchange.WebServices.Data.Folder\" or\n \"Microsoft.Exchange.WebServices.Data.FileAttachment\"\n )\n ) and not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "AWS IAM Assume Role Policy Update", - "description": "Identifies attempts to modify an AWS IAM Assume Role Policy. An adversary may attempt to modify the AssumeRolePolicy of a misconfigured role in order to gain the privileges of that role.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS IAM Assume Role Policy Update\n\nAn IAM role is an IAM identity that you can create in your account that has specific permissions. An IAM role is similar to an IAM user, in that it is an AWS identity with permission policies that determine what the identity can and cannot do in AWS. However, instead of being uniquely associated with one person, a role is intended to be assumable by anyone who needs it. Also, a role does not have standard long-term credentials such as a password or access keys associated with it. Instead, when you assume a role, it provides you with temporary security credentials for your role session.\n\nThe role trust policy is a JSON document in which you define the principals you trust to assume the role. This policy is a required resource-based policy that is attached to a role in IAM. An attacker may attempt to modify this policy by using the `UpdateAssumeRolePolicy` API action to gain the privileges of that role.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- False positives may occur due to the intended usage of the service. Tuning is needed in order to have higher confidence. Consider adding exceptions — preferably with a combination of the user agent and user ID conditions — to cover administrator activities and infrastructure as code tooling.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Use AWS [policy versioning](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-versioning.html) to restore the trust policy to the desired state.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Policy updates from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://labs.bishopfox.com/tech-blog/5-privesc-attack-vectors-in-aws" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "302f149f-3bab-4fa4-9a5d-ccfc97ba773d", - "rule_id": "a60326d7-dca7-4fb7-93eb-1ca03a1febbd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:UpdateAssumeRolePolicy and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Suspicious MS Office Child Process", - "description": "Identifies suspicious child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, Excel). These child processes are often launched during exploitation of Office applications or from documents with malicious macros.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious MS Office Child Process\n\nMicrosoft Office (MS Office) is a suite of applications designed to help with productivity and completing common tasks on a computer. You can create and edit documents containing text and images, work with data in spreadsheets and databases, and create presentations and posters. As it is some of the most-used software across companies, MS Office is frequently targeted for initial access. It also has a wide variety of capabilities that attackers can take advantage of.\n\nThis rule looks for suspicious processes spawned by MS Office programs. This is generally the result of the execution of malicious documents.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve MS Office documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/blog/vulnerability-summary-follina" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "b2794d6f-d24f-4e57-812f-58d8b41769e4", - "rule_id": "a624863f-a70d-417f-a7d2-7a404638d47f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"eqnedt32.exe\", \"excel.exe\", \"fltldr.exe\", \"msaccess.exe\", \"mspub.exe\", \"powerpnt.exe\", \"winword.exe\", \"outlook.exe\") and\n process.name : (\"Microsoft.Workflow.Compiler.exe\", \"arp.exe\", \"atbroker.exe\", \"bginfo.exe\", \"bitsadmin.exe\", \"cdb.exe\", \"certutil.exe\",\n \"cmd.exe\", \"cmstp.exe\", \"control.exe\", \"cscript.exe\", \"csi.exe\", \"dnx.exe\", \"dsget.exe\", \"dsquery.exe\", \"forfiles.exe\",\n \"fsi.exe\", \"ftp.exe\", \"gpresult.exe\", \"hostname.exe\", \"ieexec.exe\", \"iexpress.exe\", \"installutil.exe\", \"ipconfig.exe\",\n \"mshta.exe\", \"msxsl.exe\", \"nbtstat.exe\", \"net.exe\", \"net1.exe\", \"netsh.exe\", \"netstat.exe\", \"nltest.exe\", \"odbcconf.exe\",\n \"ping.exe\", \"powershell.exe\", \"pwsh.exe\", \"qprocess.exe\", \"quser.exe\", \"qwinsta.exe\", \"rcsi.exe\", \"reg.exe\", \"regasm.exe\",\n \"regsvcs.exe\", \"regsvr32.exe\", \"sc.exe\", \"schtasks.exe\", \"systeminfo.exe\", \"tasklist.exe\", \"tracert.exe\", \"whoami.exe\",\n \"wmic.exe\", \"wscript.exe\", \"xwizard.exe\", \"explorer.exe\", \"rundll32.exe\", \"hh.exe\", \"msdt.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Print Spooler SPL File Created", - "description": "Detects attempts to exploit privilege escalation vulnerabilities related to the Print Spooler service including CVE-2020-1048 and CVE-2020-1337.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Print Spooler SPL File Created\n\nPrint Spooler is a Windows service enabled by default in all Windows clients and servers. The service manages print jobs by loading printer drivers, receiving files to be printed, queuing them, scheduling, etc.\n\nThe Print Spooler service has some known vulnerabilities that attackers can abuse to escalate privileges to SYSTEM, like CVE-2020-1048 and CVE-2020-1337. This rule looks for unusual processes writing SPL files to the location `?:\\Windows\\System32\\spool\\PRINTERS\\`, which is an essential step in exploiting these vulnerabilities.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of process executable and file conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Ensure that the machine has the latest security updates and is not running legacy Windows versions.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://safebreach.com/Post/How-we-bypassed-CVE-2020-1048-Patch-and-got-CVE-2020-1337" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "d7c6379b-f4c5-42d4-8073-40c2583cd81e", - "rule_id": "a7ccae7b-9d2c-44b2-a061-98e5946971fa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.extension : \"spl\" and\n file.path : \"?:\\\\Windows\\\\System32\\\\spool\\\\PRINTERS\\\\*\" and\n not process.name : (\"spoolsv.exe\",\n \"printfilterpipelinesvc.exe\",\n \"PrintIsolationHost.exe\",\n \"splwow64.exe\",\n \"msiexec.exe\",\n \"poqexec.exe\") and\n not user.id : \"S-1-5-18\" and\n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\mmc.exe\",\n \"\\\\Device\\\\Mup\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Windows\\\\System32\\\\mmc.exe\",\n \"?:\\\\Windows\\\\System32\\\\printui.exe\",\n \"?:\\\\Windows\\\\System32\\\\mstsc.exe\",\n \"?:\\\\Windows\\\\System32\\\\spool\\\\*.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\PROGRA~1\\\\*.exe\",\n \"?:\\\\PROGRA~2\\\\*.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Persistence via Hidden Run Key Detected", - "description": "Identifies a persistence mechanism that utilizes the NtSetValueKey native API to create a hidden (null terminated) registry key. An adversary may use this method to hide from system utilities such as the Registry Editor (regedit).", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/outflanknl/SharpHide", - "https://github.com/ewhitehats/InvisiblePersistence/blob/master/InvisibleRegValues_Whitepaper.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "e0b831e3-37e9-40bf-bbcf-c980e394cbc4", - "rule_id": "a9b05c3b-b304-4bf9-970d-acdfaef2944c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "/* Registry Path ends with backslash */\nregistry where host.os.type == \"windows\" and /* length(registry.data.strings) > 0 and */\n registry.path : (\"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"HKU\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"HKLM\\\\Software\\\\WOW6432Node\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\\",\n \"HKU\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\WOW6432Node\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "IPSEC NAT Traversal Port Activity", - "description": "This rule detects events that could be describing IPSEC NAT Traversal traffic. IPSEC is a VPN technology that allows one system to talk to another using encrypted tunnels. NAT Traversal enables these tunnels to communicate over the Internet where one of the sides is behind a NAT router gateway. This may be common on your network, but this technique is also used by threat actors to avoid detection.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Tactic: Command and Control", - "Domain: Endpoint", - "Use Case: Threat Detection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Some networks may utilize these protocols but usage that is unfamiliar to local network administrators can be unexpected and suspicious. Because this port is in the ephemeral range, this rule may false under certain conditions, such as when an application server with a public IP address replies to a client which has used a UDP port in the range by coincidence. This is uncommon but such servers can be excluded." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [] - } - ], - "id": "25393177-2ba3-4fce-81af-097614f7d83d", - "rule_id": "a9cb3641-ff4b-4cdc-a063-b4b8d02a67c7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and network.transport:udp and destination.port:4500\n", - "language": "kuery" - }, - { - "name": "Threat Intel Hash Indicator Match", - "description": "This rule is triggered when a hash indicator from the Threat Intel Filebeat module or integrations has a match against an event that contains file hashes, such as antivirus alerts, process creation, library load, and file operation events.", - "risk_score": 99, - "severity": "critical", - "timeline_id": "495ad7a7-316e-4544-8a0f-9c098daee76e", - "timeline_title": "Generic Threat Match Timeline", - "license": "Elastic License v2", - "note": "## Triage and Analysis\n\n### Investigating Threat Intel Hash Indicator Match\n\nThreat Intel indicator match rules allow matching from a local observation, such as an endpoint event that records a file hash with an entry of a file hash stored within the Threat Intel integrations index. \n\nMatches are based on threat intelligence data that's been ingested during the last 30 days. Some integrations don't place expiration dates on their threat indicators, so we strongly recommend validating ingested threat indicators and reviewing match results. When reviewing match results, check associated activity to determine whether the event requires additional investigation.\n\nThis rule is triggered when a hash indicator from the Threat Intel Filebeat module or an indicator ingested from a threat intelligence integration matches against an event that contains file hashes, such as antivirus alerts, file operation events, etc.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Gain context about the field that matched the local observation. This information can be found in the `threat.indicator.matched.field` field.\n- Investigate the hash , which can be found in the `threat.indicator.matched.atomic` field:\n - Search for the existence and reputation of the hash in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n - Scope other potentially compromised hosts in your environment by mapping hosts with file operations involving the same hash.\n- Identify the process that created the file.\n - Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Enrich the information that you have right now by determining how the file was dropped, where it was downloaded from, etc. This can help you determine if the event is part of an ongoing campaign against the organization.\n- Retrieve the involved file and examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Using the data collected through the analysis, scope users targeted and other machines infected in the environment.\n\n### False Positive Analysis\n\n- Adversaries often use legitimate tools as network administrators, such as `PsExec` or `AdFind`. These tools are often included in indicator lists, which creates the potential for false positives.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nThis rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an [Elastic Agent integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#agent-ti-integration), the [Threat Intel module](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#ti-mod-integration), or a [custom integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#custom-ti-integration).\n\nMore information can be found [here](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html).", - "version": 4, - "tags": [ - "OS: Windows", - "Data Source: Elastic Endgame", - "Rule Type: Indicator Match" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "1h", - "from": "now-65m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-threatintel.html", - "https://www.elastic.co/guide/en/security/master/es-threat-intel-integrations.html", - "https://www.elastic.co/security/tip" - ], - "max_signals": 100, - "threat": [], - "id": "4655c9b1-78b5-49ef-b856-48734e8476e8", - "rule_id": "aab184d3-72b3-4639-b242-6597c99d8bca", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "dll.hash.*", - "type": "unknown", - "ecs": false - }, - { - "name": "file.hash.*", - "type": "unknown", - "ecs": false - }, - { - "name": "process.hash.*", - "type": "unknown", - "ecs": false - } - ], - "setup": "This rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an Elastic Agent integration, the Threat Intel module, or a custom integration.\n\nMore information can be found here.", - "type": "threat_match", - "query": "file.hash.*:* or process.hash.*:* or dll.hash.*:*\n", - "threat_query": "@timestamp >= \"now-30d/d\" and event.module:(threatintel or ti_*) and (threat.indicator.file.hash.*:* or threat.indicator.file.pe.imphash:*) and not labels.is_ioc_transform_source:\"true\"", - "threat_mapping": [ - { - "entries": [ - { - "field": "file.hash.md5", - "type": "mapping", - "value": "threat.indicator.file.hash.md5" - } - ] - }, - { - "entries": [ - { - "field": "file.hash.sha1", - "type": "mapping", - "value": "threat.indicator.file.hash.sha1" - } - ] - }, - { - "entries": [ - { - "field": "file.hash.sha256", - "type": "mapping", - "value": "threat.indicator.file.hash.sha256" - } - ] - }, - { - "entries": [ - { - "field": "dll.hash.md5", - "type": "mapping", - "value": "threat.indicator.file.hash.md5" - } - ] - }, - { - "entries": [ - { - "field": "dll.hash.sha1", - "type": "mapping", - "value": "threat.indicator.file.hash.sha1" - } - ] - }, - { - "entries": [ - { - "field": "dll.hash.sha256", - "type": "mapping", - "value": "threat.indicator.file.hash.sha256" - } - ] - }, - { - "entries": [ - { - "field": "process.hash.md5", - "type": "mapping", - "value": "threat.indicator.file.hash.md5" - } - ] - }, - { - "entries": [ - { - "field": "process.hash.sha1", - "type": "mapping", - "value": "threat.indicator.file.hash.sha1" - } - ] - }, - { - "entries": [ - { - "field": "process.hash.sha256", - "type": "mapping", - "value": "threat.indicator.file.hash.sha256" - } - ] - } - ], - "threat_index": [ - "filebeat-*", - "logs-ti_*" - ], - "index": [ - "auditbeat-*", - "endgame-*", - "filebeat-*", - "logs-*", - "winlogbeat-*" - ], - "threat_filters": [ - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.category", - "negate": false, - "params": { - "query": "threat" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.category": "threat" - } - } - }, - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.kind", - "negate": false, - "params": { - "query": "enrichment" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.kind": "enrichment" - } - } - }, - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.type", - "negate": false, - "params": { - "query": "indicator" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.type": "indicator" - } - } - } - ], - "threat_indicator_path": "threat.indicator", - "threat_language": "kuery", - "language": "kuery" - }, - { - "name": "Suspicious WerFault Child Process", - "description": "A suspicious WerFault child process was detected, which may indicate an attempt to run via the SilentProcessExit registry key manipulation. Verify process details such as command line, network connections and file writes.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Custom Windows error reporting debugger or applications restarted by WerFault after a crash." - ], - "references": [ - "https://www.hexacorn.com/blog/2019/09/19/silentprocessexit-quick-look-under-the-hood/", - "https://www.hexacorn.com/blog/2019/09/20/werfault-command-line-switches-v0-1/", - "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Persistence/persistence_SilentProcessExit_ImageHijack_sysmon_13_1.evtx", - "https://blog.menasec.net/2021/01/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.012", - "name": "Image File Execution Options Injection", - "reference": "https://attack.mitre.org/techniques/T1546/012/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.012", - "name": "Image File Execution Options Injection", - "reference": "https://attack.mitre.org/techniques/T1546/012/" - } - ] - } - ] - } - ], - "id": "999fcbb4-5881-447d-85e3-c1f70ccc4d02", - "rule_id": "ac5012b8-8da8-440b-aaaf-aedafdea2dff", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n\n process.parent.name : \"WerFault.exe\" and \n \n /* args -s and -t used to execute a process via SilentProcessExit mechanism */\n (process.parent.args : \"-s\" and process.parent.args : \"-t\" and process.parent.args : \"-c\") and \n \n not process.executable : (\"?:\\\\Windows\\\\SysWOW64\\\\Initcrypt.exe\", \"?:\\\\Program Files (x86)\\\\Heimdal\\\\Heimdal.Guard.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Managed Code Hosting Process", - "description": "Identifies a suspicious managed code hosting process which could indicate code injection or other form of suspicious code execution.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.menasec.net/2019/07/interesting-difr-traces-of-net-clr.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - } - ], - "id": "ea690010-6af8-4956-b01e-a0c05b9cd356", - "rule_id": "acf738b5-b5b2-4acc-bad9-1e18ee234f40", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id with maxspan=5m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"wscript.exe\", \"cscript.exe\", \"mshta.exe\", \"wmic.exe\", \"regsvr32.exe\", \"svchost.exe\", \"dllhost.exe\", \"cmstp.exe\")]\n [file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.name : (\"wscript.exe.log\",\n \"cscript.exe.log\",\n \"mshta.exe.log\",\n \"wmic.exe.log\",\n \"svchost.exe.log\",\n \"dllhost.exe.log\",\n \"cmstp.exe.log\",\n \"regsvr32.exe.log\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Suspicious Portable Executable Encoded in Powershell Script", - "description": "Detects the presence of a portable executable (PE) in a PowerShell script by looking for its encoded header. Attackers embed PEs into PowerShell scripts to inject them into memory, avoiding defences by not writing to disk.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious Portable Executable Encoded in Powershell Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can abuse PowerShell in-memory capabilities to inject executables into memory without touching the disk, bypassing file-based security protections. These executables are generally base64 encoded.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the script using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- Suspicious .NET Reflection via PowerShell - e26f042e-c590-4e82-8e05-41e81bd822ad\n- PowerShell Suspicious Payload Encoded and Compressed - 81fe9dc6-a2d7-4192-a2d8-eed98afc766a\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Reimage the host operating system or restore the compromised files to clean versions.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - } - ], - "id": "9aed8efd-214a-41dd-ad31-dc79774b45f3", - "rule_id": "ad84d445-b1ce-4377-82d9-7c633f28bf9a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n TVqQAAMAAAAEAAAA\n ) and not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "File Transfer or Listener Established via Netcat", - "description": "A netcat process is engaging in network activity on a Linux host. Netcat is often used as a persistence mechanism by exporting a reverse shell or by serving a shell on a listening port. Netcat is also sometimes used for data exfiltration.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Netcat Network Activity\n\nNetcat is a dual-use command line tool that can be used for various purposes, such as port scanning, file transfers, and connection tests. Attackers can abuse its functionality for malicious purposes such creating bind shells or reverse shells to gain access to the target system.\n\nA reverse shell is a mechanism that's abused to connect back to an attacker-controlled system. It effectively redirects the system's input and output and delivers a fully functional remote shell to the attacker. Even private systems are vulnerable since the connection is outgoing.\n\nA bind shell is a type of backdoor that attackers set up on the target host and binds to a specific port to listen for an incoming connection from the attacker.\n\nThis rule identifies potential reverse shell or bind shell activity using Netcat by checking for the execution of Netcat followed by a network connection.\n\n#### Possible investigation steps\n\n- Examine the command line to identify if the command is suspicious.\n- Extract and examine the target domain or IP address.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n - Scope other potentially compromised hosts in your environment by mapping hosts that also communicated with the domain or IP address.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Investigate any abnormal behavior by the subject process such as network connections, file modifications, and any spawned child processes.\n\n### False positive analysis\n\n- Netcat is a dual-use tool that can be used for benign or malicious activity. It is included in some Linux distributions, so its presence is not necessarily suspicious. Some normal use of this program, while uncommon, may originate from scripts, automation tools, and frameworks.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Block the identified indicators of compromise (IoCs).\n- Take actions to terminate processes and connections used by the attacker.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Netcat is a dual-use tool that can be used for benign or malicious activity. Netcat is included in some Linux distributions so its presence is not necessarily suspicious. Some normal use of this program, while uncommon, may originate from scripts, automation tools, and frameworks." - ], - "references": [ - "http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet", - "https://www.sans.org/security-resources/sec560/netcat_cheat_sheet_v1.pdf", - "https://en.wikipedia.org/wiki/Netcat", - "https://www.hackers-arise.com/hacking-fundamentals", - "https://null-byte.wonderhowto.com/how-to/hack-like-pro-use-netcat-swiss-army-knife-hacking-tools-0148657/", - "https://levelup.gitconnected.com/ethical-hacking-part-15-netcat-nc-and-netcat-f6a8f7df43fd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "5e8b60dc-a580-453e-9a10-cb3a8384b25b", - "rule_id": "adb961e0-cb74-42a0-af9e-29fc41f88f5f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"linux\" and event.type == \"start\" and\n process.name:(\"nc\",\"ncat\",\"netcat\",\"netcat.openbsd\",\"netcat.traditional\") and (\n /* bind shell to echo for command execution */\n (process.args:(\"-l\",\"-p\") and process.args:(\"-c\",\"echo\",\"$*\"))\n /* bind shell to specific port */\n or process.args:(\"-l\",\"-p\",\"-lp\")\n /* reverse shell to command-line interpreter used for command execution */\n or (process.args:(\"-e\") and process.args:(\"/bin/bash\",\"/bin/sh\"))\n /* file transfer via stdout */\n or process.args:(\">\",\"<\")\n /* file transfer via pipe */\n or (process.args:(\"|\") and process.args:(\"nc\",\"ncat\"))\n )]\n [network where host.os.type == \"linux\" and (process.name == \"nc\" or process.name == \"ncat\" or process.name == \"netcat\" or\n process.name == \"netcat.openbsd\" or process.name == \"netcat.traditional\")]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Shared Object Created or Changed by Previously Unknown Process", - "description": "This rule monitors the creation of shared object files by previously unknown processes. The creation of a shared object file involves compiling code into a dynamically linked library that can be loaded by other programs at runtime. While this process is typically used for legitimate purposes, malicious actors can leverage shared object files to execute unauthorized code, inject malicious functionality into legitimate processes, or bypass security controls. This allows malware to persist on the system, evade detection, and potentially compromise the integrity and confidentiality of the affected system and its data.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://threatpost.com/sneaky-malware-backdoors-linux/180158/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.006", - "name": "Dynamic Linker Hijacking", - "reference": "https://attack.mitre.org/techniques/T1574/006/" - } - ] - } - ] - } - ], - "id": "bdad6eb7-a340-4c18-af34-78ad072b0b90", - "rule_id": "aebaa51f-2a91-4f6a-850b-b601db2293f4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "host.os.type:linux and event.action:(creation or file_create_event or file_rename_event or rename) and \nfile.path:(/dev/shm/* or /usr/lib/*) and file.extension:so and \nprocess.name: ( * and not (\"5\" or \"dockerd\" or \"dpkg\" or \"rpm\" or \"snapd\" or \"exe\" or \"yum\" or \"vmis-launcher\"\n or \"pacman\" or \"apt-get\" or \"dnf\"))\n", - "new_terms_fields": [ - "host.id", - "file.path", - "process.executable" - ], - "history_window_start": "now-10d", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Remote File Copy via TeamViewer", - "description": "Identifies an executable or script file remotely downloaded via a TeamViewer transfer session.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remote File Copy via TeamViewer\n\nAttackers commonly transfer tooling or malware from external systems into a compromised environment using the command and control channel. However, they can also abuse legitimate utilities to drop these files.\n\nTeamViewer is a remote access and remote control tool used by helpdesks and system administrators to perform various support activities. It is also frequently used by attackers and scammers to deploy malware interactively and other malicious activities. This rule looks for the TeamViewer process creating files with suspicious extensions.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Contact the user to gather information about who and why was conducting the remote access.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check whether the company uses TeamViewer for the support activities and if there is a support ticket related to this access.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the company relies on TeamViewer to conduct remote access and the triage has not identified suspicious or malicious files.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.menasec.net/2019/11/hunting-for-suspicious-use-of.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - }, - { - "id": "T1219", - "name": "Remote Access Software", - "reference": "https://attack.mitre.org/techniques/T1219/" - } - ] - } - ], - "id": "414fb787-11dd-40d7-a2c6-99de88ab083f", - "rule_id": "b25a7df2-120a-4db2-bd3f-3e4b86b24bee", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and process.name : \"TeamViewer.exe\" and\n file.extension : (\"exe\", \"dll\", \"scr\", \"com\", \"bat\", \"ps1\", \"vbs\", \"vbe\", \"js\", \"wsh\", \"hta\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Network Connection via Compiled HTML File", - "description": "Compiled HTML files (.chm) are commonly distributed as part of the Microsoft HTML Help system. Adversaries may conceal malicious code in a CHM file and deliver it to a victim for execution. CHM content is loaded by the HTML Help executable program (hh.exe).", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Network Connection via Compiled HTML File\n\nCHM (Compiled HTML) files are a format for delivering online help files on Windows. CHM files are compressed compilations of various content, such as HTML documents, images, and scripting/web-related programming languages such as VBA, JScript, Java, and ActiveX.\n\nWhen users double-click CHM files, the HTML Help executable program (`hh.exe`) will execute them. `hh.exe` also can be used to execute code embedded in those files, PowerShell scripts, and executables. This makes it useful for attackers not only to proxy the execution of malicious payloads via a signed binary that could bypass security controls, but also to gain initial access to environments via social engineering methods.\n\nThis rule identifies network connections done by `hh.exe`, which can potentially indicate abuse to download malicious files or tooling, or masquerading.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Examine the command lines for suspicious activities.\n - Retrieve `.chm`, `.ps1`, and other files that were involved for further examination.\n - Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n - Investigate the file digital signature and process original filename, if suspicious, treat it as potential malware.\n- Investigate the target host that the signed binary is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executables, scripts and help files retrieved from the system using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1204", - "name": "User Execution", - "reference": "https://attack.mitre.org/techniques/T1204/", - "subtechnique": [ - { - "id": "T1204.002", - "name": "Malicious File", - "reference": "https://attack.mitre.org/techniques/T1204/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.001", - "name": "Compiled HTML File", - "reference": "https://attack.mitre.org/techniques/T1218/001/" - } - ] - } - ] - } - ], - "id": "6d21dba8-a079-4e39-bd68-12095d8f63d7", - "rule_id": "b29ee2be-bf99-446c-ab1a-2dc0183394b8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"hh.exe\" and event.type == \"start\"]\n [network where host.os.type == \"windows\" and process.name : \"hh.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Suspicious Endpoint Security Parent Process", - "description": "A suspicious Endpoint Security parent process was detected. This may indicate a process hollowing or other form of code injection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - } - ], - "id": "d853b594-aef5-4db1-9454-8ccfaef37ee4", - "rule_id": "b41a13c6-ba45-4bab-a534-df53d0cfed6a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"esensor.exe\", \"elastic-endpoint.exe\") and\n process.parent.executable != null and\n /* add FPs here */\n not process.parent.executable : (\"C:\\\\Program Files\\\\Elastic\\\\*\",\n \"C:\\\\Windows\\\\System32\\\\services.exe\",\n \"C:\\\\Windows\\\\System32\\\\WerFault*.exe\",\n \"C:\\\\Windows\\\\System32\\\\wermgr.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Code Signing Policy Modification Through Built-in tools", - "description": "Identifies attempts to disable/modify the code signing policy through system native utilities. Code signing provides authenticity on a program, and grants the user with the ability to check whether the program has been tampered with. By allowing the execution of unsigned or self-signed code, threat actors can craft and execute malicious code.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Code Signing Policy Modification Through Built-in tools\n\nWindows Driver Signature Enforcement (DSE) is a security feature introduced by Microsoft to enforce that only signed drivers can be loaded and executed into the kernel (ring 0). This feature was introduced to prevent attackers from loading their malicious drivers on targets. If the driver has an invalid signature, the system will not allow it to be loaded.\n\nThis protection is essential for maintaining the security of the system. However, attackers or even administrators can disable this feature and load untrusted drivers, as this can put the system at risk. Therefore, it is important to keep this feature enabled and only load drivers from trusted sources to ensure the integrity and security of the system.\n\nThis rule identifies commands that can disable the Driver Signature Enforcement feature.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Use Osquery and endpoint driver events (`event.category = \"driver\"`) to investigate if suspicious drivers were loaded into the system after the command was executed.\n - !{osquery{\"label\":\"Osquery - Retrieve All Non-Microsoft Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE NOT (provider == \\\"Microsoft\\\" AND signed == \\\"1\\\")\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve All Unsigned Drivers with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, class, description, directory, image, issuer_name, manufacturer, service, signed, subject_name FROM drivers JOIN authenticode ON drivers.image = authenticode.path JOIN hash ON drivers.image = hash.path WHERE signed == \\\"0\\\"\\n\"}}\n- Identify the driver's `Device Name` and `Service Name`.\n- Check for alerts from the rules specified in the `Related Rules` section.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Related Rules\n\n- First Time Seen Driver Loaded - df0fd41e-5590-4965-ad5e-cd079ec22fa9\n- Untrusted Driver Loaded - d8ab1ec1-feeb-48b9-89e7-c12e189448aa\n- Code Signing Policy Modification Through Registry - da7733b1-fe08-487e-b536-0a04c6d8b0cd\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Disable and uninstall all suspicious drivers found in the system. This can be done via Device Manager. (Note that this step may require you to boot the system into Safe Mode.)\n- Remove the related services and registry keys found in the system. Note that the service will probably not stop if the driver is still installed.\n - This can be done via PowerShell `Remove-Service` cmdlet.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Remove and block malicious artifacts identified during triage.\n- Ensure that the Driver Signature Enforcement is enabled on the system.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1553", - "name": "Subvert Trust Controls", - "reference": "https://attack.mitre.org/techniques/T1553/", - "subtechnique": [ - { - "id": "T1553.006", - "name": "Code Signing Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1553/006/" - } - ] - } - ] - } - ], - "id": "f432de36-d82f-421a-bb1e-6fa4574b6949", - "rule_id": "b43570de-a908-4f7f-8bdb-b2df6ffd8c80", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name: \"bcdedit.exe\" or process.pe.original_file_name == \"bcdedit.exe\") and process.args: (\"-set\", \"/set\") and \n process.args: (\"TESTSIGNING\", \"nointegritychecks\", \"loadoptions\", \"DISABLE_INTEGRITY_CHECKS\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS STS GetSessionToken Abuse", - "description": "Identifies the suspicious use of GetSessionToken. Tokens could be created and used by attackers to move laterally and escalate privileges.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "GetSessionToken may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. GetSessionToken from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1550", - "name": "Use Alternate Authentication Material", - "reference": "https://attack.mitre.org/techniques/T1550/", - "subtechnique": [ - { - "id": "T1550.001", - "name": "Application Access Token", - "reference": "https://attack.mitre.org/techniques/T1550/001/" - } - ] - } - ] - } - ], - "id": "e733b9da-5fe6-44f9-a722-27ac2c232852", - "rule_id": "b45ab1d2-712f-4f01-a751-df3826969807", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "aws.cloudtrail.user_identity.type", - "type": "keyword", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:sts.amazonaws.com and event.action:GetSessionToken and\naws.cloudtrail.user_identity.type:IAMUser and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Clearing Windows Console History", - "description": "Identifies when a user attempts to clear console history. An adversary may clear the command history of a compromised account to conceal the actions undertaken during an intrusion.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Clearing Windows Console History\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can try to cover their tracks by clearing PowerShell console history. PowerShell has two different ways of logging commands: the built-in history and the command history managed by the PSReadLine module. This rule looks for the execution of commands that can clear the built-in PowerShell logs or delete the `ConsoleHost_history.txt` file.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Investigate the PowerShell logs on the SIEM to determine if there was suspicious behavior that an attacker may be trying to cover up.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n - Ensure that PowerShell auditing policies and log collection are in place to grant future visibility.", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://stefanos.cloud/kb/how-to-clear-the-powershell-command-history/", - "https://www.shellhacks.com/clear-history-powershell/", - "https://community.sophos.com/sophos-labs/b/blog/posts/powershell-command-history-forensics" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.003", - "name": "Clear Command History", - "reference": "https://attack.mitre.org/techniques/T1070/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "e2511d40-11c3-4506-9165-6d614611ab27", - "rule_id": "b5877334-677f-4fb9-86d5-a9721274223b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") or process.pe.original_file_name == \"PowerShell.EXE\") and\n (process.args : \"*Clear-History*\" or\n (process.args : (\"*Remove-Item*\", \"rm\") and process.args : (\"*ConsoleHost_history.txt*\", \"*(Get-PSReadlineOption).HistorySavePath*\")) or\n (process.args : \"*Set-PSReadlineOption*\" and process.args : \"*SaveNothing*\"))\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Elastic Agent Service Terminated", - "description": "Identifies the Elastic endpoint agent has stopped and is no longer running on the host. Adversaries may attempt to disable security monitoring tools in an attempt to evade detection or prevention capabilities during an intrusion. This may also indicate an issue with the agent itself and should be addressed to ensure defensive measures are back in a stable state.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: Windows", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "7f0bc96d-2a3a-4d83-a44a-8fee1315c9c9", - "rule_id": "b627cd12-dac4-11ec-9582-f661ea17fbcd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where\n/* net, sc or wmic stopping or deleting Elastic Agent on Windows */\n(event.type == \"start\" and\n process.name : (\"net.exe\", \"sc.exe\", \"wmic.exe\",\"powershell.exe\",\"taskkill.exe\",\"PsKill.exe\",\"ProcessHacker.exe\") and\n process.args : (\"stopservice\",\"uninstall\", \"stop\", \"disabled\",\"Stop-Process\",\"terminate\",\"suspend\") and\n process.args : (\"elasticendpoint\", \"Elastic Agent\",\"elastic-agent\",\"elastic-endpoint\"))\nor\n/* service or systemctl used to stop Elastic Agent on Linux */\n(event.type == \"end\" and\n (process.name : (\"systemctl\", \"service\") and\n process.args : \"elastic-agent\" and\n process.args : \"stop\")\n or\n /* pkill , killall used to stop Elastic Agent on Linux */\n ( event.type == \"end\" and process.name : (\"pkill\", \"killall\") and process.args: \"elastic-agent\")\n or\n /* Unload Elastic Agent extension on MacOS */\n (process.name : \"kextunload\" and\n process.args : \"com.apple.iokit.EndpointSecurity\" and\n event.action : \"end\"))\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Windows Script Interpreter Executing Process via WMI", - "description": "Identifies use of the built-in Windows script interpreters (cscript.exe or wscript.exe) being used to execute a process via Windows Management Instrumentation (WMI). This may be indicative of malicious activity.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.005", - "name": "Visual Basic", - "reference": "https://attack.mitre.org/techniques/T1059/005/" - } - ] - }, - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "4c2b427e-21af-4d8b-9c8c-394af39ef9bc", - "rule_id": "b64b183e-1a76-422d-9179-7b389513e74d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan = 5s\n [any where host.os.type == \"windows\" and \n (event.category : (\"library\", \"driver\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n (dll.name : \"wmiutils.dll\" or file.name : \"wmiutils.dll\") and process.name : (\"wscript.exe\", \"cscript.exe\")]\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"wmiprvse.exe\" and\n user.domain != \"NT AUTHORITY\" and\n (process.pe.original_file_name :\n (\n \"cscript.exe\",\n \"wscript.exe\",\n \"PowerShell.EXE\",\n \"Cmd.Exe\",\n \"MSHTA.EXE\",\n \"RUNDLL32.EXE\",\n \"REGSVR32.EXE\",\n \"MSBuild.exe\",\n \"InstallUtil.exe\",\n \"RegAsm.exe\",\n \"RegSvcs.exe\",\n \"msxsl.exe\",\n \"CONTROL.EXE\",\n \"EXPLORER.EXE\",\n \"Microsoft.Workflow.Compiler.exe\",\n \"msiexec.exe\"\n ) or\n process.executable : (\"C:\\\\Users\\\\*.exe\", \"C:\\\\ProgramData\\\\*.exe\")\n )\n ]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Administrator Privileges Assigned to an Okta Group", - "description": "Detects when an administrator role is assigned to an Okta group. An adversary may attempt to assign administrator privileges to an Okta group in order to assign additional permissions to compromised user accounts and maintain access to their target organization.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Administrator roles may be assigned to Okta users by a Super Admin user. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/administrators-admin-comparison.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "7147cc22-a902-43c9-9b58-0571efacc5a7", - "rule_id": "b8075894-0b62-46e5-977c-31275da34419", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:group.privilege.grant\n", - "language": "kuery" - }, - { - "name": "UAC Bypass Attempt with IEditionUpgradeManager Elevated COM Interface", - "description": "Identifies attempts to bypass User Account Control (UAC) by abusing an elevated COM Interface to launch a rogue Windows ClipUp program. Attackers may attempt to bypass UAC to stealthily execute code with elevated permissions.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/hfiref0x/UACME" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1559", - "name": "Inter-Process Communication", - "reference": "https://attack.mitre.org/techniques/T1559/", - "subtechnique": [ - { - "id": "T1559.001", - "name": "Component Object Model", - "reference": "https://attack.mitre.org/techniques/T1559/001/" - } - ] - } - ] - } - ], - "id": "e297a638-8703-40ec-ae23-d916b6b47c28", - "rule_id": "b90cdde7-7e0d-4359-8bf0-2c112ce2008a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"Clipup.exe\" and\n not process.executable : \"C:\\\\Windows\\\\System32\\\\ClipUp.exe\" and process.parent.name : \"dllhost.exe\" and\n /* CLSID of the Elevated COM Interface IEditionUpgradeManager */\n process.parent.args : \"/Processid:{BD54C901-076B-434E-B6C7-17C531F4AB41}\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "SolarWinds Process Disabling Services via Registry", - "description": "Identifies a SolarWinds binary modifying the start type of a service to be disabled. An adversary may abuse this technique to manipulate relevant security services.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Initial Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - }, - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1195", - "name": "Supply Chain Compromise", - "reference": "https://attack.mitre.org/techniques/T1195/", - "subtechnique": [ - { - "id": "T1195.002", - "name": "Compromise Software Supply Chain", - "reference": "https://attack.mitre.org/techniques/T1195/002/" - } - ] - } - ] - } - ], - "id": "46dea7e7-bb76-4290-a342-99e0a15b3a72", - "rule_id": "b9960fef-82c6-4816-befa-44745030e917", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\Start\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\Start\"\n ) and\n registry.data.strings : (\"4\", \"0x00000004\") and\n process.name : (\n \"SolarWinds.BusinessLayerHost*.exe\",\n \"ConfigurationWizard*.exe\",\n \"NetflowDatabaseMaintenance*.exe\",\n \"NetFlowService*.exe\",\n \"SolarWinds.Administration*.exe\",\n \"SolarWinds.Collector.Service*.exe\",\n \"SolarwindsDiagnostics*.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Image Load (taskschd.dll) from MS Office", - "description": "Identifies a suspicious image load (taskschd.dll) from Microsoft Office processes. This behavior may indicate adversarial activity where a scheduled task is configured via Windows Component Object Model (COM). This technique can be used to configure persistence and evade monitoring by avoiding the usage of the traditional Windows binary (schtasks.exe) used to manage scheduled tasks.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16", - "https://www.clearskysec.com/wp-content/uploads/2020/10/Operation-Quicksand.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "9926572e-11ec-4882-aa83-787e01fcc974", - "rule_id": "baa5d22c-5e1c-4f33-bfc9-efa73bb53022", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "any where host.os.type == \"windows\" and\n (event.category : (\"library\", \"driver\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n process.name : (\"WINWORD.EXE\", \"EXCEL.EXE\", \"POWERPNT.EXE\", \"MSPUB.EXE\", \"MSACCESS.EXE\") and\n (dll.name : \"taskschd.dll\" or file.name : \"taskschd.dll\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS EC2 Encryption Disabled", - "description": "Identifies disabling of Amazon Elastic Block Store (EBS) encryption by default in the current region. Disabling encryption by default does not change the encryption status of your existing volumes.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Disabling encryption may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Disabling encryption by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/disable-ebs-encryption-by-default.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisableEbsEncryptionByDefault.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1565", - "name": "Data Manipulation", - "reference": "https://attack.mitre.org/techniques/T1565/", - "subtechnique": [ - { - "id": "T1565.001", - "name": "Stored Data Manipulation", - "reference": "https://attack.mitre.org/techniques/T1565/001/" - } - ] - } - ] - } - ], - "id": "7cbc260d-b1cd-48ed-a08c-856111202998", - "rule_id": "bb9b13b2-1700-48a8-a750-b43b0a72ab69", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:DisableEbsEncryptionByDefault and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential SYN-Based Network Scan Detected", - "description": "This rule identifies a potential SYN-Based port scan. A SYN port scan is a technique employed by attackers to scan a target network for open ports by sending SYN packets to multiple ports and observing the response. Attackers use this method to identify potential entry points or services that may be vulnerable to exploitation, allowing them to launch targeted attacks or gain unauthorized access to the system or network, compromising its security and potentially leading to data breaches or further malicious activities. This rule proposes threshold logic to check for connection attempts from one source host to 10 or more destination ports using 2 or less packets per port.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Network", - "Tactic: Discovery", - "Tactic: Reconnaissance", - "Use Case: Network Security Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 5, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1046", - "name": "Network Service Discovery", - "reference": "https://attack.mitre.org/techniques/T1046/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0043", - "name": "Reconnaissance", - "reference": "https://attack.mitre.org/tactics/TA0043/" - }, - "technique": [ - { - "id": "T1595", - "name": "Active Scanning", - "reference": "https://attack.mitre.org/techniques/T1595/", - "subtechnique": [ - { - "id": "T1595.001", - "name": "Scanning IP Blocks", - "reference": "https://attack.mitre.org/techniques/T1595/001/" - } - ] - } - ] - } - ], - "id": "c6e594b5-c901-4d6c-a020-42c78d7af293", - "rule_id": "bbaa96b9-f36c-4898-ace2-581acb00a409", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "network.packets", - "type": "long", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "destination.port : * and network.packets <= 2 and source.ip : (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n", - "threshold": { - "field": [ - "destination.ip", - "source.ip" - ], - "value": 1, - "cardinality": [ - { - "field": "destination.port", - "value": 250 - } - ] - }, - "index": [ - "logs-endpoint.events.network-*", - "logs-network_traffic.*", - "packetbeat-*", - "auditbeat-*", - "filebeat-*" - ], - "language": "kuery" - }, - { - "name": "AWS Root Login Without MFA", - "description": "Identifies attempts to login to AWS as the root user without using multi-factor authentication (MFA). Amazon AWS best practices indicate that the root user should be protected by MFA.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS Root Login Without MFA\n\nMulti-factor authentication (MFA) in AWS is a simple best practice that adds an extra layer of protection on top of your user name and password. With MFA enabled, when a user signs in to an AWS Management Console, they will be prompted for their user name and password, as well as for an authentication code from their AWS MFA device. Taken together, these multiple factors provide increased security for your AWS account settings and resources.\n\nFor more information about using MFA in AWS, access the [official documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa.html).\n\nThe AWS root account is the one identity that has complete access to all AWS services and resources in the account, which is created when the AWS account is created. AWS strongly recommends that you do not use the root user for your everyday tasks, even the administrative ones. Instead, adhere to the best practice of using the root user only to create your first IAM user. Then securely lock away the root user credentials and use them to perform only a few account and service management tasks. Amazon provides a [list of the tasks that require root user](https://docs.aws.amazon.com/general/latest/gr/root-vs-iam.html#aws_tasks-that-require-root).\n\nThis rule looks for attempts to log in to AWS as the root user without using multi-factor authentication (MFA), meaning the account is not secured properly.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Examine whether this activity is common in the environment by looking for past occurrences on your logs.\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user?\n- Examine the commands, API calls, and data management actions performed by the account in the last 24 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking access to servers,\nservices, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- While this activity is not inherently malicious, the root account must use MFA. The security team should address any potential benign true positive (B-TP), as this configuration can risk the entire cloud environment.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Identify the services or servers involved criticality.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify if there are any regulatory or legal ramifications related to this activity.\n- Configure multi-factor authentication for the user.\n- Follow security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Some organizations allow login with the root user without MFA, however, this is not considered best practice by AWS and increases the risk of compromised credentials." - ], - "references": [ - "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "175a9816-05c0-4db7-9672-e2cb26537ef9", - "rule_id": "bc0c6f0d-dab0-47a3-b135-0925f0a333bc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "aws.cloudtrail.console_login.additional_eventdata.mfa_used", - "type": "boolean", - "ecs": false - }, - { - "name": "aws.cloudtrail.user_identity.type", - "type": "keyword", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:signin.amazonaws.com and event.action:ConsoleLogin and\n aws.cloudtrail.user_identity.type:Root and\n aws.cloudtrail.console_login.additional_eventdata.mfa_used:false and\n event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential Non-Standard Port SSH connection", - "description": "Identifies potentially malicious processes communicating via a port paring typically not associated with SSH. For example, SSH over port 2200 or port 2222 as opposed to the traditional port 22. Adversaries may make changes to the standard port a protocol uses to bypass filtering or muddle analysis/parsing of network data.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "OS: macOS", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "SSH over ports apart from the traditional port 22 is highly uncommon. This rule alerts the usage of the such uncommon ports by the ssh service. Tuning is needed to have higher confidence. If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination whitelisted ports for such legitimate ssh activities." - ], - "references": [ - "https://attack.mitre.org/techniques/T1571/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1571", - "name": "Non-Standard Port", - "reference": "https://attack.mitre.org/techniques/T1571/" - } - ] - } - ], - "id": "e17bb076-6e10-448a-bd77-4b2e7e6c8610", - "rule_id": "bc8ca7e0-92fd-4b7c-b11e-ee0266b8d9c9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id with maxspan=1m\n [process where event.action == \"exec\" and process.name:\"ssh\" and not process.parent.name in (\n \"rsync\", \"pyznap\", \"git\", \"ansible-playbook\", \"scp\", \"pgbackrest\", \"git-lfs\", \"expect\", \"Sourcetree\", \"ssh-copy-id\",\n \"run\"\n )\n ]\n [network where process.name:\"ssh\" and event.action in (\"connection_attempted\", \"connection_accepted\") and \n destination.port != 22 and destination.ip != \"127.0.0.1\" and network.transport: \"tcp\"\n ]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Privileged Escalation via SamAccountName Spoofing", - "description": "Identifies a suspicious computer account name rename event, which may indicate an attempt to exploit CVE-2021-42278 to elevate privileges from a standard domain user to a user with domain admin privileges. CVE-2021-42278 is a security vulnerability that allows potential attackers to impersonate a domain controller via samAccountName attribute spoofing.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Use Case: Active Directory Monitoring", - "Data Source: Active Directory", - "Use Case: Vulnerability" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://support.microsoft.com/en-us/topic/kb5008102-active-directory-security-accounts-manager-hardening-changes-cve-2021-42278-5975b463-4c95-45e1-831a-d120004e258e", - "https://cloudbrothers.info/en/exploit-kerberos-samaccountname-spoofing/", - "https://github.com/cube0x0/noPac", - "https://twitter.com/exploitph/status/1469157138928914432", - "https://exploit.ph/cve-2021-42287-cve-2021-42278-weaponisation.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - }, - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "4d17fe9a-5178-4de9-9a94-f8b6fca23c37", - "rule_id": "bdcf646b-08d4-492c-870a-6c04e3700034", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.NewTargetUserName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.OldTargetUserName", - "type": "unknown", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "iam where event.action == \"renamed-user-account\" and\n /* machine account name renamed to user like account name */\n winlog.event_data.OldTargetUserName : \"*$\" and not winlog.event_data.NewTargetUserName : \"*$\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "AWS RDS Snapshot Restored", - "description": "Identifies when an attempt was made to restore an RDS Snapshot. Snapshots are sometimes shared by threat actors in order to exfiltrate bulk data or evade detection after performing malicious activities. If the permissions were modified, verify if the snapshot was shared with an unauthorized or unexpected AWS account.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Restoring snapshots may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Snapshot restoration by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceFromDBSnapshot.html", - "https://github.com/RhinoSecurityLabs/pacu/blob/master/pacu/modules/rds__explore_snapshots/main.py" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1578", - "name": "Modify Cloud Compute Infrastructure", - "reference": "https://attack.mitre.org/techniques/T1578/", - "subtechnique": [ - { - "id": "T1578.004", - "name": "Revert Cloud Instance", - "reference": "https://attack.mitre.org/techniques/T1578/004/" - } - ] - } - ] - } - ], - "id": "cf3ec842-e96b-4d5e-a0f0-9667fcd76bab", - "rule_id": "bf1073bf-ce26-4607-b405-ba1ed8e9e204", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:RestoreDBInstanceFromDBSnapshot and\nevent.outcome:success\n", - "language": "kuery" - }, - { - "name": "Creation or Modification of a new GPO Scheduled Task or Service", - "description": "Detects the creation or modification of a new Group Policy based scheduled task or service. These methods are used for legitimate system administration, but can also be abused by an attacker with domain admin permissions to execute a malicious payload remotely on all or a subset of the domain joined machines.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1484", - "name": "Domain Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1484/", - "subtechnique": [ - { - "id": "T1484.001", - "name": "Group Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1484/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "d0a15c33-39c3-4ecc-a984-f3d34adcdb56", - "rule_id": "c0429aa8-9974-42da-bfb6-53a0a515a145", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.path : (\"?:\\\\Windows\\\\SYSVOL\\\\domain\\\\Policies\\\\*\\\\MACHINE\\\\Preferences\\\\ScheduledTasks\\\\ScheduledTasks.xml\",\n \"?:\\\\Windows\\\\SYSVOL\\\\domain\\\\Policies\\\\*\\\\MACHINE\\\\Preferences\\\\Services\\\\Services.xml\") and\n not process.name : \"dfsrs.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Renaming of ESXI index.html File", - "description": "Identifies instances where the \"index.html\" file within the \"/usr/lib/vmware/*\" directory is renamed on a Linux system. The rule monitors for the \"rename\" event action associated with this specific file and path, which could indicate malicious activity.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.003", - "name": "Rename System Utilities", - "reference": "https://attack.mitre.org/techniques/T1036/003/" - } - ] - } - ] - } - ], - "id": "ae9e1522-481e-43de-aede-2b82a712992c", - "rule_id": "c125e48f-6783-41f0-b100-c3bf1b114d16", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.original.path", - "type": "unknown", - "ecs": false - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "file where host.os.type == \"linux\" and event.action == \"rename\" and file.name : \"index.html\" and\nfile.Ext.original.path : \"/usr/lib/vmware/*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "AWS EC2 Full Network Packet Capture Detected", - "description": "Identifies potential Traffic Mirroring in an Amazon Elastic Compute Cloud (EC2) instance. Traffic Mirroring is an Amazon VPC feature that you can use to copy network traffic from an Elastic network interface. This feature can potentially be abused to exfiltrate sensitive data from unencrypted internal traffic.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Network Security Monitoring", - "Tactic: Exfiltration", - "Tactic: Collection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Traffic Mirroring may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Traffic Mirroring from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TrafficMirrorFilter.html", - "https://github.com/easttimor/aws-incident-response" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1020", - "name": "Automated Exfiltration", - "reference": "https://attack.mitre.org/techniques/T1020/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1074", - "name": "Data Staged", - "reference": "https://attack.mitre.org/techniques/T1074/" - } - ] - } - ], - "id": "d34b86b9-0881-49c6-9da0-8d5bdfc55f6d", - "rule_id": "c1812764-0788-470f-8e74-eb4a14d47573", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and\nevent.action:(CreateTrafficMirrorFilter or CreateTrafficMirrorFilterRule or CreateTrafficMirrorSession or CreateTrafficMirrorTarget) and\nevent.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential Remote Desktop Shadowing Activity", - "description": "Identifies the modification of the Remote Desktop Protocol (RDP) Shadow registry or the execution of processes indicative of an active RDP shadowing session. An adversary may abuse the RDP Shadowing feature to spy on or control other users active RDP sessions.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://bitsadm.in/blog/spying-on-users-using-rdp-shadowing", - "https://swarm.ptsecurity.com/remote-desktop-services-shadowing/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.001", - "name": "Remote Desktop Protocol", - "reference": "https://attack.mitre.org/techniques/T1021/001/" - } - ] - } - ] - } - ], - "id": "d3883a42-3675-4e82-8ce8-fbf0926afa12", - "rule_id": "c57f8579-e2a5-4804-847f-f2732edc5156", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "/* Identifies the modification of RDP Shadow registry or\n the execution of processes indicative of active shadow RDP session */\n\nany where host.os.type == \"windows\" and\n(\n (event.category == \"registry\" and\n registry.path : (\n \"HKLM\\\\Software\\\\Policies\\\\Microsoft\\\\Windows NT\\\\Terminal Services\\\\Shadow\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Policies\\\\Microsoft\\\\Windows NT\\\\Terminal Services\\\\Shadow\"\n )\n ) or\n (event.category == \"process\" and event.type == \"start\" and\n (process.name : (\"RdpSaUacHelper.exe\", \"RdpSaProxy.exe\") and process.parent.name : \"svchost.exe\") or\n (process.pe.original_file_name : \"mstsc.exe\" and process.args : \"/shadow:*\")\n )\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Microsoft Build Engine Started by an Office Application", - "description": "An instance of MSBuild, the Microsoft Build Engine, was started by Excel or Word. This is unusual behavior for the Build Engine and could have been caused by an Excel or Word document executing a malicious script payload.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Microsoft Build Engine Started by an Office Application\n\nMicrosoft Office (MS Office) is a suite of applications designed to help with productivity and completing common tasks on a computer. You can create and edit documents containing text and images, work with data in spreadsheets and databases, and create presentations and posters. As it is some of the most-used software across companies, MS Office is frequently targeted for initial access. It also has a wide variety of capabilities that attackers can take advantage of.\n\nThe Microsoft Build Engine is a platform for building applications. This engine, also known as MSBuild, provides an XML schema for a project file that controls how the build platform processes and builds software, and can be abused to proxy execution of code.\n\nThis rule looks for the `Msbuild.exe` utility spawned by MS Office programs. This is generally the result of the execution of malicious documents.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate abnormal behaviors observed by the subject process, such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve MS Office documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual. It is quite unusual for this program to be started by an Office application like Word or Excel." - ], - "references": [ - "https://blog.talosintelligence.com/2020/02/building-bypass-with-msbuild.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/", - "subtechnique": [ - { - "id": "T1127.001", - "name": "MSBuild", - "reference": "https://attack.mitre.org/techniques/T1127/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [] - } - ], - "id": "6b6aecb4-b2ef-4171-ad90-cfb4001e71ea", - "rule_id": "c5dc3223-13a2-44a2-946c-e9dc0aa0449c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"MSBuild.exe\" and\n process.parent.name : (\"eqnedt32.exe\",\n \"excel.exe\",\n \"fltldr.exe\",\n \"msaccess.exe\",\n \"mspub.exe\",\n \"outlook.exe\",\n \"powerpnt.exe\",\n \"winword.exe\" )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Remote File Download via MpCmdRun", - "description": "Identifies the Windows Defender configuration utility (MpCmdRun.exe) being used to download a remote file.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remote File Download via MpCmdRun\n\nAttackers commonly transfer tooling or malware from external systems into a compromised environment using the command and control channel. However, they can also abuse signed utilities to drop these files.\n\nThe `MpCmdRun.exe` is a command-line tool part of Windows Defender and is used to manage various Microsoft Windows Defender Antivirus settings and perform certain tasks. It can also be abused by attackers to download remote files, including malware and offensive tooling. This rule looks for the patterns used to perform downloads using the utility.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check the reputation of the domain or IP address used to host the downloaded file.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the file using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://twitter.com/mohammadaskar2/status/1301263551638761477", - "https://www.bleepingcomputer.com/news/microsoft/microsoft-defender-can-ironically-be-used-to-download-malware/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - } - ], - "id": "99ebadd9-aa28-49ed-b1ad-645f685bccb6", - "rule_id": "c6453e73-90eb-4fe7-a98c-cde7bbfc504a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"MpCmdRun.exe\" or process.pe.original_file_name == \"MpCmdRun.exe\") and\n process.args : \"-DownloadFile\" and process.args : \"-url\" and process.args : \"-path\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Attempt to Modify an Okta Application", - "description": "Detects attempts to modify an Okta application. An adversary may attempt to modify, deactivate, or delete an Okta application in order to weaken an organization's security controls or disrupt their business operations.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if your organization's Okta applications are regularly modified and the behavior is expected." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Apps/Apps_Apps.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [] - } - ], - "id": "f45cd327-0037-4783-857b-16cfd6457804", - "rule_id": "c74fd275-ab2c-4d49-8890-e2943fa65c09", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:application.lifecycle.update\n", - "language": "kuery" - }, - { - "name": "Unusual File Modification by dns.exe", - "description": "Identifies an unexpected file being modified by dns.exe, the process responsible for Windows DNS Server services, which may indicate activity related to remote code execution or other forms of exploitation.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual File Write\nDetection alerts from this rule indicate potential unusual/abnormal file writes from the DNS Server service process (`dns.exe`) after exploitation from CVE-2020-1350 (SigRed) has occurred. Here are some possible avenues of investigation:\n- Post-exploitation, adversaries may write additional files or payloads to the system as additional discovery/exploitation/persistence mechanisms.\n- Any suspicious or abnormal files written from `dns.exe` should be reviewed and investigated with care.", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/", - "https://msrc-blog.microsoft.com/2020/07/14/july-2020-security-update-cve-2020-1350-vulnerability-in-windows-domain-name-system-dns-server/", - "https://www.elastic.co/security-labs/detection-rules-for-sigred-vulnerability" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "4df37982-b626-489e-953a-6c347a80de3e", - "rule_id": "c7ce36c0-32ff-4f9a-bfc2-dcb242bf99f9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and process.name : \"dns.exe\" and event.type in (\"creation\", \"deletion\", \"change\") and\n not file.name : \"dns.log\" and not\n (file.extension : (\"old\", \"temp\", \"bak\", \"dns\", \"arpa\") and file.path : \"C:\\\\Windows\\\\System32\\\\dns\\\\*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "SMB (Windows File Sharing) Activity to the Internet", - "description": "This rule detects network events that may indicate the use of Windows file sharing (also called SMB or CIFS) traffic to the Internet. SMB is commonly used within networks to share files, printers, and other system resources amongst trusted systems. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector or for data exfiltration.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Tactic: Initial Access", - "Domain: Endpoint", - "Use Case: Threat Detection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1048", - "name": "Exfiltration Over Alternative Protocol", - "reference": "https://attack.mitre.org/techniques/T1048/" - } - ] - } - ], - "id": "cba0f52a-b4c8-4c82-8ae2-91f67c25ab1b", - "rule_id": "c82b2bd8-d701-420c-ba43-f11a155b681a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and (destination.port:(139 or 445) or event.dataset:zeek.smb) and\n source.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n ) and\n not destination.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n )\n", - "language": "kuery" - }, - { - "name": "Direct Outbound SMB Connection", - "description": "Identifies unexpected processes making network connections over port 445. Windows File Sharing is typically implemented over Server Message Block (SMB), which communicates between hosts using port 445. When legitimate, these network connections are established by the kernel. Processes making 445/tcp connections may be port scanners, exploits, or suspicious user-level processes moving laterally.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Direct Outbound SMB Connection\n\nThis rule looks for unexpected processes making network connections over port 445. Windows file sharing is typically implemented over Server Message Block (SMB), which communicates between hosts using port 445. When legitimate, these network connections are established by the kernel (PID 4). Occurrences of non-system processes using this port can indicate port scanners, exploits, and tools used to move laterally on the environment.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.002", - "name": "SMB/Windows Admin Shares", - "reference": "https://attack.mitre.org/techniques/T1021/002/" - } - ] - } - ] - } - ], - "id": "4f5fe0ce-44d5-4142-8170-bf3ec6e3609b", - "rule_id": "c82c7d8f-fb9e-4874-a4bd-fd9e3f9becf1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.pid != 4 and\n not (process.executable : \"D:\\\\EnterpriseCare\\\\tools\\\\jre.1\\\\bin\\\\java.exe\" and process.args : \"com.emeraldcube.prism.launcher.Invoker\") and\n not (process.executable : \"C:\\\\Docusnap 11\\\\Tools\\\\nmap\\\\nmap.exe\" and process.args : \"smb-os-discovery.nse\") and\n not process.executable :\n (\"?:\\\\Program Files\\\\SentinelOne\\\\Sentinel Agent *\\\\Ranger\\\\SentinelRanger.exe\",\n \"?:\\\\Program Files\\\\Ivanti\\\\Security Controls\\\\ST.EngineHost.exe\",\n \"?:\\\\Program Files (x86)\\\\Fortinet\\\\FSAE\\\\collectoragent.exe\",\n \"?:\\\\Program Files (x86)\\\\Nmap\\\\nmap.exe\",\n \"?:\\\\Program Files\\\\Azure Advanced Threat Protection Sensor\\\\*\\\\Microsoft.Tri.Sensor.exe\",\n \"?:\\\\Program Files\\\\CloudMatters\\\\auvik\\\\AuvikService-release-*\\\\AuvikService.exe\",\n \"?:\\\\Program Files\\\\uptime software\\\\uptime\\\\UptimeDataCollector.exe\",\n \"?:\\\\Program Files\\\\CloudMatters\\\\auvik\\\\AuvikAgentService.exe\",\n \"?:\\\\Program Files\\\\Rumble\\\\rumble-agent-*.exe\")]\n [network where host.os.type == \"windows\" and destination.port == 445 and process.pid != 4 and\n not cidrmatch(destination.ip, \"127.0.0.1\", \"::1\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Parent Process PID Spoofing", - "description": "Identifies parent process spoofing used to thwart detection. Adversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.didierstevens.com/2017/03/20/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/", - "subtechnique": [ - { - "id": "T1134.004", - "name": "Parent PID Spoofing", - "reference": "https://attack.mitre.org/techniques/T1134/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/", - "subtechnique": [ - { - "id": "T1134.004", - "name": "Parent PID Spoofing", - "reference": "https://attack.mitre.org/techniques/T1134/004/" - } - ] - } - ] - } - ], - "id": "a92d7919-f3f1-4049-b30e-d470eac3fd11", - "rule_id": "c88d4bd0-5649-4c52-87ea-9be59dbfbcf2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.token.integrity_level_name", - "type": "unknown", - "ecs": false - }, - { - "name": "process.code_signature.exists", - "type": "boolean", - "ecs": true - }, - { - "name": "process.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.Ext.real.pid", - "type": "unknown", - "ecs": false - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "/* This rule is compatible with Elastic Endpoint only */\n\nsequence by host.id, user.id with maxspan=3m \n\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.Ext.token.integrity_level_name != \"system\" and \n (\n process.pe.original_file_name : (\"winword.exe\", \"excel.exe\", \"outlook.exe\", \"powerpnt.exe\", \"eqnedt32.exe\",\n \"fltldr.exe\", \"mspub.exe\", \"msaccess.exe\", \"powershell.exe\", \"pwsh.exe\",\n \"cscript.exe\", \"wscript.exe\", \"rundll32.exe\", \"regsvr32.exe\", \"msbuild.exe\",\n \"mshta.exe\", \"wmic.exe\", \"cmstp.exe\", \"msxsl.exe\") or \n \n (process.executable : (\"?:\\\\Users\\\\*.exe\",\n \"?:\\\\ProgramData\\\\*.exe\",\n \"?:\\\\Windows\\\\Temp\\\\*.exe\",\n \"?:\\\\Windows\\\\Tasks\\\\*\") and \n (process.code_signature.exists == false or process.code_signature.status : \"errorBadDigest\")) or \n \n process.executable : \"?:\\\\Windows\\\\Microsoft.NET\\\\*.exe\" \n ) and \n \n not process.executable : \n (\"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\", \n \"?:\\\\WINDOWS\\\\SysWOW64\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\")\n ] by process.pid\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.Ext.real.pid > 0 and \n \n /* process.parent.Ext.real.pid is only populated if the parent process pid doesn't match */\n not (process.name : \"msedge.exe\" and process.parent.name : \"sihost.exe\") and \n \n not process.executable : \n (\"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\", \n \"?:\\\\WINDOWS\\\\SysWOW64\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\")\n ] by process.parent.Ext.real.pid\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Disabling Windows Defender Security Settings via PowerShell", - "description": "Identifies use of the Set-MpPreference PowerShell command to disable or weaken certain Windows Defender settings.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Disabling Windows Defender Security Settings via PowerShell\n\nMicrosoft Windows Defender is an antivirus product built into Microsoft Windows, which makes it popular across multiple environments. Disabling it is a common step in threat actor playbooks.\n\nThis rule monitors the execution of commands that can tamper the Windows Defender antivirus features.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to determine which action was executed. Based on that, examine exceptions, antivirus state, sample submission, etc.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity, the configuration is justified (for example, it is being used to deploy other security solutions or troubleshooting), and no other suspicious activity has been observed.\n\n### Related rules\n\n- Windows Defender Disabled via Registry Modification - 2ffa1f1e-b6db-47fa-994b-1512743847eb\n- Microsoft Windows Defender Tampering - fe794edd-487f-4a90-b285-3ee54f2af2d3\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Based on the command line, take actions to restore the appropriate Windows Defender antivirus configurations.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Planned Windows Defender configuration changes." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/defender/set-mppreference?view=windowsserver2019-ps" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "db4edb49-8efa-4fac-ab2c-0b5f9522963c", - "rule_id": "c8cccb06-faf2-4cd5-886e-2c9636cfcb87", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") or process.pe.original_file_name in (\"powershell.exe\", \"pwsh.dll\", \"powershell_ise.exe\")) and\n process.args : \"Set-MpPreference\" and process.args : (\"-Disable*\", \"Disabled\", \"NeverSend\", \"-Exclusion*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Masquerading as Communication Apps", - "description": "Identifies suspicious instances of communications apps, both unsigned and renamed ones, that can indicate an attempt to conceal malicious activity, bypass security features such as allowlists, or trick users into executing malware.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - }, - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1554", - "name": "Compromise Client Software Binary", - "reference": "https://attack.mitre.org/techniques/T1554/" - } - ] - } - ], - "id": "5ae37f0a-12d0-4931-92cc-07cf4f2dbce5", - "rule_id": "c9482bfa-a553-4226-8ea2-4959bd4f7923", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and\n event.type == \"start\" and\n (\n /* Slack */\n (process.name : \"slack.exe\" and not\n (process.code_signature.subject_name in (\n \"Slack Technologies, Inc.\",\n \"Slack Technologies, LLC\"\n ) and process.code_signature.trusted == true)\n ) or\n\n /* WebEx */\n (process.name : \"WebexHost.exe\" and not\n (process.code_signature.subject_name in (\"Cisco WebEx LLC\", \"Cisco Systems, Inc.\") and process.code_signature.trusted == true)\n ) or\n\n /* Teams */\n (process.name : \"Teams.exe\" and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Discord */\n (process.name : \"Discord.exe\" and not\n (process.code_signature.subject_name == \"Discord Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* RocketChat */\n (process.name : \"Rocket.Chat.exe\" and not\n (process.code_signature.subject_name == \"Rocket.Chat Technologies Corp.\" and process.code_signature.trusted == true)\n ) or\n\n /* Mattermost */\n (process.name : \"Mattermost.exe\" and not\n (process.code_signature.subject_name == \"Mattermost, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* WhatsApp */\n (process.name : \"WhatsApp.exe\" and not\n (process.code_signature.subject_name in (\n \"WhatsApp LLC\",\n \"WhatsApp, Inc\",\n \"24803D75-212C-471A-BC57-9EF86AB91435\"\n ) and process.code_signature.trusted == true)\n ) or\n\n /* Zoom */\n (process.name : \"Zoom.exe\" and not\n (process.code_signature.subject_name == \"Zoom Video Communications, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Outlook */\n (process.name : \"outlook.exe\" and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Thunderbird */\n (process.name : \"thunderbird.exe\" and not\n (process.code_signature.subject_name == \"Mozilla Corporation\" and process.code_signature.trusted == true)\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unsigned DLL Side-Loading from a Suspicious Folder", - "description": "Identifies a Windows trusted program running from locations often abused by adversaries to masquerade as a trusted program and loading a recently dropped DLL. This behavior may indicate an attempt to evade defenses via side-loading a malicious DLL within the memory space of a signed processes.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - } - ] - }, - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.002", - "name": "DLL Side-Loading", - "reference": "https://attack.mitre.org/techniques/T1574/002/" - } - ] - } - ] - } - ], - "id": "152dc801-8d1c-4b8a-a8af-07693669d4dc", - "rule_id": "ca98c7cf-a56e-4057-a4e8-39603f7f0389", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.Ext.relative_file_creation_time", - "type": "unknown", - "ecs": false - }, - { - "name": "dll.Ext.relative_file_name_modify_time", - "type": "unknown", - "ecs": false - }, - { - "name": "dll.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "library where host.os.type == \"windows\" and\n\n process.code_signature.trusted == true and \n \n (dll.Ext.relative_file_creation_time <= 500 or dll.Ext.relative_file_name_modify_time <= 500) and \n \n not dll.code_signature.status : (\"trusted\", \"errorExpired\", \"errorCode_endpoint*\", \"errorChaining\") and \n \n /* Suspicious Paths */\n dll.path : (\"?:\\\\PerfLogs\\\\*.dll\",\n \"?:\\\\Users\\\\*\\\\Pictures\\\\*.dll\",\n \"?:\\\\Users\\\\*\\\\Music\\\\*.dll\",\n \"?:\\\\Users\\\\Public\\\\*.dll\",\n \"?:\\\\Users\\\\*\\\\Documents\\\\*.dll\",\n \"?:\\\\Windows\\\\Tasks\\\\*.dll\",\n \"?:\\\\Windows\\\\System32\\\\Tasks\\\\*.dll\",\n \"?:\\\\Intel\\\\*.dll\",\n \"?:\\\\AMD\\\\Temp\\\\*.dll\",\n \"?:\\\\Windows\\\\AppReadiness\\\\*.dll\",\n \"?:\\\\Windows\\\\ServiceState\\\\*.dll\",\n \"?:\\\\Windows\\\\security\\\\*.dll\",\n\t\t \"?:\\\\Windows\\\\System\\\\*.dll\",\n \"?:\\\\Windows\\\\IdentityCRL\\\\*.dll\",\n \"?:\\\\Windows\\\\Branding\\\\*.dll\",\n \"?:\\\\Windows\\\\csc\\\\*.dll\",\n \"?:\\\\Windows\\\\DigitalLocker\\\\*.dll\",\n \"?:\\\\Windows\\\\en-US\\\\*.dll\",\n \"?:\\\\Windows\\\\wlansvc\\\\*.dll\",\n \"?:\\\\Windows\\\\Prefetch\\\\*.dll\",\n \"?:\\\\Windows\\\\Fonts\\\\*.dll\",\n \"?:\\\\Windows\\\\diagnostics\\\\*.dll\",\n \"?:\\\\Windows\\\\TAPI\\\\*.dll\",\n \"?:\\\\Windows\\\\INF\\\\*.dll\",\n \"?:\\\\windows\\\\tracing\\\\*.dll\",\n \"?:\\\\windows\\\\IME\\\\*.dll\",\n \"?:\\\\Windows\\\\Performance\\\\*.dll\",\n \"?:\\\\windows\\\\intel\\\\*.dll\",\n \"?:\\\\windows\\\\ms\\\\*.dll\",\n \"?:\\\\Windows\\\\dot3svc\\\\*.dll\",\n \"?:\\\\Windows\\\\ServiceProfiles\\\\*.dll\",\n \"?:\\\\Windows\\\\panther\\\\*.dll\",\n \"?:\\\\Windows\\\\RemotePackages\\\\*.dll\",\n \"?:\\\\Windows\\\\OCR\\\\*.dll\",\n \"?:\\\\Windows\\\\appcompat\\\\*.dll\",\n \"?:\\\\Windows\\\\apppatch\\\\*.dll\",\n \"?:\\\\Windows\\\\addins\\\\*.dll\",\n \"?:\\\\Windows\\\\Setup\\\\*.dll\",\n \"?:\\\\Windows\\\\Help\\\\*.dll\",\n \"?:\\\\Windows\\\\SKB\\\\*.dll\",\n \"?:\\\\Windows\\\\Vss\\\\*.dll\",\n \"?:\\\\Windows\\\\Web\\\\*.dll\",\n \"?:\\\\Windows\\\\servicing\\\\*.dll\",\n \"?:\\\\Windows\\\\CbsTemp\\\\*.dll\",\n \"?:\\\\Windows\\\\Logs\\\\*.dll\",\n \"?:\\\\Windows\\\\WaaS\\\\*.dll\",\n \"?:\\\\Windows\\\\twain_32\\\\*.dll\",\n \"?:\\\\Windows\\\\ShellExperiences\\\\*.dll\",\n \"?:\\\\Windows\\\\ShellComponents\\\\*.dll\",\n \"?:\\\\Windows\\\\PLA\\\\*.dll\",\n \"?:\\\\Windows\\\\Migration\\\\*.dll\",\n \"?:\\\\Windows\\\\debug\\\\*.dll\",\n \"?:\\\\Windows\\\\Cursors\\\\*.dll\",\n \"?:\\\\Windows\\\\Containers\\\\*.dll\",\n \"?:\\\\Windows\\\\Boot\\\\*.dll\",\n \"?:\\\\Windows\\\\bcastdvr\\\\*.dll\",\n \"?:\\\\Windows\\\\TextInput\\\\*.dll\",\n \"?:\\\\Windows\\\\schemas\\\\*.dll\",\n \"?:\\\\Windows\\\\SchCache\\\\*.dll\",\n \"?:\\\\Windows\\\\Resources\\\\*.dll\",\n \"?:\\\\Windows\\\\rescache\\\\*.dll\",\n \"?:\\\\Windows\\\\Provisioning\\\\*.dll\",\n \"?:\\\\Windows\\\\PrintDialog\\\\*.dll\",\n \"?:\\\\Windows\\\\PolicyDefinitions\\\\*.dll\",\n \"?:\\\\Windows\\\\media\\\\*.dll\",\n \"?:\\\\Windows\\\\Globalization\\\\*.dll\",\n \"?:\\\\Windows\\\\L2Schemas\\\\*.dll\",\n \"?:\\\\Windows\\\\LiveKernelReports\\\\*.dll\",\n \"?:\\\\Windows\\\\ModemLogs\\\\*.dll\",\n \"?:\\\\Windows\\\\ImmersiveControlPanel\\\\*.dll\",\n \"?:\\\\$Recycle.Bin\\\\*.dll\") and \n\t \n\t /* DLL loaded from the process.executable current directory */\n\t endswith~(substring(dll.path, 0, length(dll.path) - (length(dll.name) + 1)), substring(process.executable, 0, length(process.executable) - (length(process.name) + 1)))\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Kernel Module Removal", - "description": "Kernel modules are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. This rule identifies attempts to remove a kernel module.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "There is usually no reason to remove modules, but some buggy modules require it. These can be exempted by username. Note that some Linux distributions are not built to support the removal of modules at all." - ], - "references": [ - "http://man7.org/linux/man-pages/man8/modprobe.8.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.006", - "name": "Kernel Modules and Extensions", - "reference": "https://attack.mitre.org/techniques/T1547/006/" - } - ] - } - ] - } - ], - "id": "11155cb1-3e36-4dfe-855d-778c7783bccb", - "rule_id": "cd66a5af-e34b-4bb0-8931-57d0a043f2ef", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and process.name == \"rmmod\" or\n(process.name == \"modprobe\" and process.args in (\"--remove\", \"-r\")) and \nprocess.parent.name in (\"sudo\", \"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "New ActiveSyncAllowedDeviceID Added via PowerShell", - "description": "Identifies the use of the Exchange PowerShell cmdlet, Set-CASMailbox, to add a new ActiveSync allowed device. Adversaries may target user email to collect sensitive information.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate exchange system administration activity." - ], - "references": [ - "https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/", - "https://docs.microsoft.com/en-us/powershell/module/exchange/set-casmailbox?view=exchange-ps" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/", - "subtechnique": [ - { - "id": "T1098.002", - "name": "Additional Email Delegate Permissions", - "reference": "https://attack.mitre.org/techniques/T1098/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "76ea2acc-757a-44d2-bdc3-db98af51885d", - "rule_id": "ce64d965-6cb0-466d-b74f-8d2c76f47f05", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name: (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and process.args : \"Set-CASMailbox*ActiveSyncAllowedDeviceIDs*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Cobalt Strike Command and Control Beacon", - "description": "Cobalt Strike is a threat emulation platform commonly modified and used by adversaries to conduct network attack and exploitation campaigns. This rule detects a network activity algorithm leveraged by Cobalt Strike implant beacons for command and control.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Threat intel\n\nThis activity has been observed in FIN7 campaigns.", - "version": 105, - "tags": [ - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Domain: Endpoint" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "This rule should be tailored to either exclude systems, as sources or destinations, in which this behavior is expected." - ], - "references": [ - "https://blog.morphisec.com/fin7-attacks-restaurant-industry", - "https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html", - "https://www.elastic.co/security-labs/collecting-cobalt-strike-beacons-with-the-elastic-stack" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - }, - { - "id": "T1568", - "name": "Dynamic Resolution", - "reference": "https://attack.mitre.org/techniques/T1568/", - "subtechnique": [ - { - "id": "T1568.002", - "name": "Domain Generation Algorithms", - "reference": "https://attack.mitre.org/techniques/T1568/002/" - } - ] - } - ] - } - ], - "id": "6024faa1-bc7a-433b-80bf-392fbfe87de5", - "rule_id": "cf53f532-9cc9-445a-9ae7-fced307ec53c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "((event.category: (network OR network_traffic) AND type: (tls OR http))\n OR event.dataset: (network_traffic.tls OR network_traffic.http)\n) AND destination.domain:/[a-z]{3}.stage.[0-9]{8}\\..*/\n", - "language": "lucene" - }, - { - "name": "Execution from Unusual Directory - Command Line", - "description": "Identifies process execution from suspicious default Windows directories. This may be abused by adversaries to hide malware in trusted paths.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Execution from Unusual Directory - Command Line\n\nThis rule looks for the execution of scripts from unusual directories. Attackers can use system or application paths to hide malware and make the execution less suspicious.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to determine which commands or scripts were executed.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the script using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of parent process executable and command line conditions.\n\n### Related rules\n\n- Process Execution from an Unusual Directory - ebfe1448-7fac-4d59-acea-181bd89b1f7f\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - } - ], - "id": "dfb48928-ab8a-45fa-ae8a-73ef32220ec6", - "rule_id": "cff92c41-2225-4763-b4ce-6f71e5bda5e6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"wscript.exe\",\n \"cscript.exe\",\n \"rundll32.exe\",\n \"regsvr32.exe\",\n \"cmstp.exe\",\n \"RegAsm.exe\",\n \"installutil.exe\",\n \"mshta.exe\",\n \"RegSvcs.exe\",\n \"powershell.exe\",\n \"pwsh.exe\",\n \"cmd.exe\") and\n\n /* add suspicious execution paths here */\n process.args : (\"C:\\\\PerfLogs\\\\*\",\n \"C:\\\\Users\\\\Public\\\\*\",\n \"C:\\\\Windows\\\\Tasks\\\\*\",\n \"C:\\\\Intel\\\\*\",\n \"C:\\\\AMD\\\\Temp\\\\*\",\n \"C:\\\\Windows\\\\AppReadiness\\\\*\",\n \"C:\\\\Windows\\\\ServiceState\\\\*\",\n \"C:\\\\Windows\\\\security\\\\*\",\n \"C:\\\\Windows\\\\IdentityCRL\\\\*\",\n \"C:\\\\Windows\\\\Branding\\\\*\",\n \"C:\\\\Windows\\\\csc\\\\*\",\n \"C:\\\\Windows\\\\DigitalLocker\\\\*\",\n \"C:\\\\Windows\\\\en-US\\\\*\",\n \"C:\\\\Windows\\\\wlansvc\\\\*\",\n \"C:\\\\Windows\\\\Prefetch\\\\*\",\n \"C:\\\\Windows\\\\Fonts\\\\*\",\n \"C:\\\\Windows\\\\diagnostics\\\\*\",\n \"C:\\\\Windows\\\\TAPI\\\\*\",\n \"C:\\\\Windows\\\\INF\\\\*\",\n \"C:\\\\Windows\\\\System32\\\\Speech\\\\*\",\n \"C:\\\\windows\\\\tracing\\\\*\",\n \"c:\\\\windows\\\\IME\\\\*\",\n \"c:\\\\Windows\\\\Performance\\\\*\",\n \"c:\\\\windows\\\\intel\\\\*\",\n \"c:\\\\windows\\\\ms\\\\*\",\n \"C:\\\\Windows\\\\dot3svc\\\\*\",\n \"C:\\\\Windows\\\\panther\\\\*\",\n \"C:\\\\Windows\\\\RemotePackages\\\\*\",\n \"C:\\\\Windows\\\\OCR\\\\*\",\n \"C:\\\\Windows\\\\appcompat\\\\*\",\n \"C:\\\\Windows\\\\apppatch\\\\*\",\n \"C:\\\\Windows\\\\addins\\\\*\",\n \"C:\\\\Windows\\\\Setup\\\\*\",\n \"C:\\\\Windows\\\\Help\\\\*\",\n \"C:\\\\Windows\\\\SKB\\\\*\",\n \"C:\\\\Windows\\\\Vss\\\\*\",\n \"C:\\\\Windows\\\\servicing\\\\*\",\n \"C:\\\\Windows\\\\CbsTemp\\\\*\",\n \"C:\\\\Windows\\\\Logs\\\\*\",\n \"C:\\\\Windows\\\\WaaS\\\\*\",\n \"C:\\\\Windows\\\\twain_32\\\\*\",\n \"C:\\\\Windows\\\\ShellExperiences\\\\*\",\n \"C:\\\\Windows\\\\ShellComponents\\\\*\",\n \"C:\\\\Windows\\\\PLA\\\\*\",\n \"C:\\\\Windows\\\\Migration\\\\*\",\n \"C:\\\\Windows\\\\debug\\\\*\",\n \"C:\\\\Windows\\\\Cursors\\\\*\",\n \"C:\\\\Windows\\\\Containers\\\\*\",\n \"C:\\\\Windows\\\\Boot\\\\*\",\n \"C:\\\\Windows\\\\bcastdvr\\\\*\",\n \"C:\\\\Windows\\\\TextInput\\\\*\",\n \"C:\\\\Windows\\\\security\\\\*\",\n \"C:\\\\Windows\\\\schemas\\\\*\",\n \"C:\\\\Windows\\\\SchCache\\\\*\",\n \"C:\\\\Windows\\\\Resources\\\\*\",\n \"C:\\\\Windows\\\\rescache\\\\*\",\n \"C:\\\\Windows\\\\Provisioning\\\\*\",\n \"C:\\\\Windows\\\\PrintDialog\\\\*\",\n \"C:\\\\Windows\\\\PolicyDefinitions\\\\*\",\n \"C:\\\\Windows\\\\media\\\\*\",\n \"C:\\\\Windows\\\\Globalization\\\\*\",\n \"C:\\\\Windows\\\\L2Schemas\\\\*\",\n \"C:\\\\Windows\\\\LiveKernelReports\\\\*\",\n \"C:\\\\Windows\\\\ModemLogs\\\\*\",\n \"C:\\\\Windows\\\\ImmersiveControlPanel\\\\*\",\n \"C:\\\\$Recycle.Bin\\\\*\") and\n\n /* noisy FP patterns */\n\n not process.parent.executable : (\"C:\\\\WINDOWS\\\\System32\\\\DriverStore\\\\FileRepository\\\\*\\\\igfxCUIService*.exe\",\n \"C:\\\\Windows\\\\System32\\\\spacedeskService.exe\",\n \"C:\\\\Program Files\\\\Dell\\\\SupportAssistAgent\\\\SRE\\\\SRE.exe\") and\n not (process.name : \"rundll32.exe\" and\n process.args : (\"uxtheme.dll,#64\",\n \"PRINTUI.DLL,PrintUIEntry\",\n \"?:\\\\Windows\\\\System32\\\\FirewallControlPanel.dll,ShowNotificationDialog\",\n \"?:\\\\WINDOWS\\\\system32\\\\Speech\\\\SpeechUX\\\\sapi.cpl\",\n \"?:\\\\Windows\\\\system32\\\\shell32.dll,OpenAs_RunDLL\")) and\n\n not (process.name : \"cscript.exe\" and process.args : \"?:\\\\WINDOWS\\\\system32\\\\calluxxprovider.vbs\") and\n\n not (process.name : \"cmd.exe\" and process.args : \"?:\\\\WINDOWS\\\\system32\\\\powercfg.exe\" and process.args : \"?:\\\\WINDOWS\\\\inf\\\\PowerPlan.log\") and\n\n not (process.name : \"regsvr32.exe\" and process.args : \"?:\\\\Windows\\\\Help\\\\OEM\\\\scripts\\\\checkmui.dll\") and\n\n not (process.name : \"cmd.exe\" and\n process.parent.executable : (\"?:\\\\Windows\\\\System32\\\\oobe\\\\windeploy.exe\",\n \"?:\\\\Program Files (x86)\\\\ossec-agent\\\\wazuh-agent.exe\",\n \"?:\\\\Windows\\\\System32\\\\igfxCUIService.exe\",\n \"?:\\\\Windows\\\\Temp\\\\IE*.tmp\\\\IE*-support\\\\ienrcore.exe\"))\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Namespace Manipulation Using Unshare", - "description": "Identifies suspicious usage of unshare to manipulate system namespaces. Unshare can be utilized to escalate privileges or escape container security boundaries. Threat actors have utilized this binary to allow themselves to escape to the host and access other resources or escalate privileges.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://man7.org/linux/man-pages/man1/unshare.1.html", - "https://www.crowdstrike.com/blog/cve-2022-0185-kubernetes-container-escape-using-linux-kernel-exploit/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/" - } - ] - } - ], - "id": "b6384394-2dda-49db-9dee-609f13e0b63d", - "rule_id": "d00f33e7-b57d-4023-9952-2db91b1767c4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action : (\"exec\", \"exec_event\") and\nprocess.executable: \"/usr/bin/unshare\" and\nnot process.parent.executable: (\"/usr/bin/udevadm\", \"*/lib/systemd/systemd-udevd\", \"/usr/bin/unshare\") and\nnot process.args : \"/usr/bin/snap\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Symbolic Link to Shadow Copy Created", - "description": "Identifies the creation of symbolic links to a shadow copy. Symbolic links can be used to access files in the shadow copy, including sensitive files such as ntds.dit, System Boot Key and browser offline credentials.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Symbolic Link to Shadow Copy Created\n\nShadow copies are backups or snapshots of an endpoint's files or volumes while they are in use. Adversaries may attempt to discover and create symbolic links to these shadow copies in order to copy sensitive information offline. If Active Directory (AD) is in use, often the ntds.dit file is a target as it contains password hashes, but an offline copy is needed to extract these hashes and potentially conduct lateral movement.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Determine if a volume shadow copy was recently created on this endpoint.\n- Review privileges of the end user as this requires administrative access.\n- Verify if the ntds.dit file was successfully copied and determine its copy destination.\n- Investigate for registry SYSTEM file copies made recently or saved via Reg.exe.\n- Investigate recent deletions of volume shadow copies.\n- Identify other files potentially copied from volume shadow copy paths directly.\n\n### False positive analysis\n\n- This rule should cause very few false positives. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- NTDS or SAM Database File Copied - 3bc6deaa-fbd4-433a-ae21-3e892f95624f\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the entire domain or the `krbtgt` user was compromised:\n - Activate your incident response plan for total Active Directory compromise which should include, but not be limited to, a password reset (twice) of the `krbtgt` user.\n- Locate and remove static files copied from volume shadow copies.\n- Command-Line tool mklink should require administrative access by default unless in developer mode.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nEnsure advanced audit policies for Windows are enabled, specifically:\nObject Access policies [Event ID 4656](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4656) (Handle to an Object was Requested)\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nSystem Audit Policies >\nObject Access >\nAudit File System (Success,Failure)\nAudit Handle Manipulation (Success,Failure)\n```\n\nThis event will only trigger if symbolic links are created from a new process spawning cmd.exe or powershell.exe with the correct arguments.\nDirect access to a shell and calling symbolic link creation tools will not generate an event matching this rule.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Legitimate administrative activity related to shadow copies." - ], - "references": [ - "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink", - "https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf", - "https://blog.netwrix.com/2021/11/30/extracting-password-hashes-from-the-ntds-dit-file/", - "https://www.hackingarticles.in/credential-dumping-ntds-dit/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.002", - "name": "Security Account Manager", - "reference": "https://attack.mitre.org/techniques/T1003/002/" - }, - { - "id": "T1003.003", - "name": "NTDS", - "reference": "https://attack.mitre.org/techniques/T1003/003/" - } - ] - } - ] - } - ], - "id": "1d6f8059-14db-4bc1-91f7-afca4446f847", - "rule_id": "d117cbb4-7d56-41b4-b999-bdf8c25648a0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "Ensure advanced audit policies for Windows are enabled, specifically:\nObject Access policies Event ID 4656 (Handle to an Object was Requested)\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nSystem Audit Policies >\nObject Access >\nAudit File System (Success,Failure)\nAudit Handle Manipulation (Success,Failure)\n```\n\nThis event will only trigger if symbolic links are created from a new process spawning cmd.exe or powershell.exe with the correct arguments.\nDirect access to a shell and calling symbolic link creation tools will not generate an event matching this rule.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name in (\"Cmd.Exe\",\"PowerShell.EXE\") and\n\n /* Create Symbolic Link to Shadow Copies */\n process.args : (\"*mklink*\", \"*SymbolicLink*\") and process.command_line : (\"*HarddiskVolumeShadowCopy*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Disabling User Account Control via Registry Modification", - "description": "User Account Control (UAC) can help mitigate the impact of malware on Windows hosts. With UAC, apps and tasks always run in the security context of a non-administrator account, unless an administrator specifically authorizes administrator-level access to the system. This rule identifies registry value changes to bypass User Access Control (UAC) protection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Disabling User Account Control via Registry Modification\n\nWindows User Account Control (UAC) allows a program to elevate its privileges (tracked as low to high integrity levels) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. UAC can deny an operation under high-integrity enforcement, or allow the user to perform the action if they are in the local administrators group and enter an administrator password when prompted.\n\nFor more information about the UAC and how it works, check the [official Microsoft docs page](https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works).\n\nAttackers may disable UAC to execute code directly in high integrity. This rule identifies registry value changes to bypass the UAC protection.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behaviors in the alert timeframe.\n- Investigate abnormal behaviors observed by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Analyze non-system processes executed with high integrity after UAC was disabled for unknown or suspicious processes.\n- Retrieve the suspicious processes' executables and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled tasks creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Restore UAC settings to the desired state.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.greyhathacker.net/?p=796", - "https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/user-account-control-group-policy-and-registry-key-settings", - "https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/user-account-control-overview" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - }, - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - }, - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "aff8eff2-3a3f-4ca6-b2ad-e5fa154c9603", - "rule_id": "d31f183a-e5b1-451b-8534-ba62bca0b404", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path :\n (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\EnableLUA\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\ConsentPromptBehaviorAdmin\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\PromptOnSecureDesktop\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\EnableLUA\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\ConsentPromptBehaviorAdmin\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\PromptOnSecureDesktop\"\n ) and\n registry.data.strings : (\"0\", \"0x00000000\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Clearing Windows Event Logs", - "description": "Identifies attempts to clear or disable Windows event log stores using Windows wevetutil command. This is often done by attackers in an attempt to evade detection or destroy forensic evidence on a system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Clearing Windows Event Logs\n\nWindows event logs are a fundamental data source for security monitoring, forensics, and incident response. Adversaries can tamper, clear, and delete this data to break SIEM detections, cover their tracks, and slow down incident response.\n\nThis rule looks for the execution of the `wevtutil.exe` utility or the `Clear-EventLog` cmdlet to clear event logs.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Investigate the event logs prior to the action for suspicious behaviors that an attacker may be trying to cover up.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and there are justifications for this action.\n- Analyze whether the cleared event log is pertinent to security and general monitoring. Administrators can clear non-relevant event logs using this mechanism. If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n - This activity is potentially done after the adversary achieves its objectives on the host. Ensure that previous actions, if any, are investigated accordingly with their response playbooks.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.001", - "name": "Clear Windows Event Logs", - "reference": "https://attack.mitre.org/techniques/T1070/001/" - }, - { - "id": "T1562.002", - "name": "Disable Windows Event Logging", - "reference": "https://attack.mitre.org/techniques/T1562/002/" - } - ] - } - ] - } - ], - "id": "bdddf66b-f1eb-4005-b013-bc2d15946c8c", - "rule_id": "d331bbe2-6db4-4941-80a5-8270db72eb61", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (\n (process.name : \"wevtutil.exe\" or process.pe.original_file_name == \"wevtutil.exe\") and\n process.args : (\"/e:false\", \"cl\", \"clear-log\")\n ) or\n (\n process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and\n process.args : \"Clear-EventLog\"\n )\n)\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Attempt to Delete an Okta Application", - "description": "Detects attempts to delete an Okta application. An adversary may attempt to modify, deactivate, or delete an Okta application in order to weaken an organization's security controls or disrupt their business operations.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Consider adding exceptions to this rule to filter false positives if your organization's Okta applications are regularly deleted and the behavior is expected." - ], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1489", - "name": "Service Stop", - "reference": "https://attack.mitre.org/techniques/T1489/" - } - ] - } - ], - "id": "7973c657-98c4-47b6-927c-5c4b729a2aa0", - "rule_id": "d48e1c13-4aca-4d1f-a7b1-a9161c0ad86f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:application.lifecycle.delete\n", - "language": "kuery" - }, - { - "name": "AWS CloudWatch Log Stream Deletion", - "description": "Identifies the deletion of an AWS CloudWatch log stream, which permanently deletes all associated archived log events with the stream.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS CloudWatch Log Stream Deletion\n\nAmazon CloudWatch is a monitoring and observability service that collects monitoring and operational data in the form of logs, metrics, and events for resources and applications. This data can be used to detect anomalous behavior in your environments, set alarms, visualize logs and metrics side by side, take automated actions, troubleshoot issues, and discover insights to keep your applications running smoothly.\n\nA log stream is a sequence of log events that share the same source. Each separate source of logs in CloudWatch Logs makes up a separate log stream.\n\nThis rule looks for the deletion of a log stream using the API `DeleteLogStream` action. Attackers can do this to cover their tracks and impact security monitoring that relies on these sources.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the calling user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- Investigate the deleted log stream's criticality and whether the responsible team is aware of the deletion.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Log Auditing", - "Tactic: Impact", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A log stream may be deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Log stream deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/logs/delete-log-stream.html", - "https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteLogStream.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "327e4748-7857-4961-b62b-93f8340c201d", - "rule_id": "d624f0ae-3dd1-4856-9aad-ccfe4d4bfa17", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:logs.amazonaws.com and event.action:DeleteLogStream and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Command Execution via SolarWinds Process", - "description": "A suspicious SolarWinds child process (Cmd.exe or Powershell.exe) was detected.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Initial Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trusted SolarWinds child processes. Verify process details such as network connections and file writes." - ], - "references": [ - "https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html", - "https://github.com/mandiant/sunburst_countermeasures/blob/main/rules/SUNBURST/hxioc/SUNBURST%20SUSPICIOUS%20FILEWRITES%20(METHODOLOGY).ioc" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1195", - "name": "Supply Chain Compromise", - "reference": "https://attack.mitre.org/techniques/T1195/", - "subtechnique": [ - { - "id": "T1195.002", - "name": "Compromise Software Supply Chain", - "reference": "https://attack.mitre.org/techniques/T1195/002/" - } - ] - } - ] - } - ], - "id": "d33c69a3-7408-40b0-8824-9986fa925e7e", - "rule_id": "d72e33fc-6e91-42ff-ac8b-e573268c5a87", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name: (\"cmd.exe\", \"powershell.exe\") and\nprocess.parent.name: (\n \"ConfigurationWizard*.exe\",\n \"NetflowDatabaseMaintenance*.exe\",\n \"NetFlowService*.exe\",\n \"SolarWinds.Administration*.exe\",\n \"SolarWinds.Collector.Service*.exe\",\n \"SolarwindsDiagnostics*.exe\"\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "SMTP on Port 26/TCP", - "description": "This rule detects events that may indicate use of SMTP on TCP port 26. This port is commonly used by several popular mail transfer agents to deconflict with the default SMTP port 25. This port has also been used by a malware family called BadPatch for command and control of Windows systems.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Tactic: Command and Control", - "Domain: Endpoint", - "Use Case: Threat Detection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Servers that process email traffic may cause false positives and should be excluded from this rule as this is expected behavior." - ], - "references": [ - "https://unit42.paloaltonetworks.com/unit42-badpatch/", - "https://isc.sans.edu/forums/diary/Next+up+whats+up+with+TCP+port+26/25564/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1048", - "name": "Exfiltration Over Alternative Protocol", - "reference": "https://attack.mitre.org/techniques/T1048/" - } - ] - } - ], - "id": "a1a8fa09-8a11-47ba-95be-30ad14f5e2f8", - "rule_id": "d7e62693-aab9-4f66-a21a-3d79ecdd603d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.flow or (event.category: (network or network_traffic))) and\n network.transport:tcp and (destination.port:26 or (event.dataset:zeek.smtp and destination.port:26))\n", - "language": "kuery" - }, - { - "name": "AWS IAM Deactivation of MFA Device", - "description": "Identifies the deactivation of a specified multi-factor authentication (MFA) device and removes it from association with the user name for which it was originally enabled. In AWS Identity and Access Management (IAM), a device must be deactivated before it can be deleted.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS IAM Deactivation of MFA Device\n\nMulti-factor authentication (MFA) in AWS is a simple best practice that adds an extra layer of protection on top of your user name and password. With MFA enabled, when a user signs in to an AWS Management Console, they will be prompted for their user name and password (the first factor—what they know), as well as for an authentication code from their AWS MFA device (the second factor—what they have). Taken together, these multiple factors provide increased security for your AWS account settings and resources.\n\nFor more information about using MFA in AWS, access the [official documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa.html).\n\nThis rule looks for the deactivation or deletion of AWS MFA devices. These modifications weaken account security and can lead to the compromise of accounts and other assets.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- While this activity can be done by administrators, all users must use MFA. The security team should address any potential benign true positive (B-TP), as this configuration can risk the user and domain.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate multi-factor authentication for the user.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Resources: Investigation Guide", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "A MFA device may be deactivated by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. MFA device deactivations from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/deactivate-mfa-device.html", - "https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeactivateMFADevice.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1531", - "name": "Account Access Removal", - "reference": "https://attack.mitre.org/techniques/T1531/" - } - ] - } - ], - "id": "24b897cd-bd62-4359-b0e9-45785ac25ad1", - "rule_id": "d8fc1cca-93ed-43c1-bbb6-c0dd3eff2958", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:iam.amazonaws.com and event.action:(DeactivateMFADevice or DeleteVirtualMFADevice) and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Volume Shadow Copy Deletion via PowerShell", - "description": "Identifies the use of the Win32_ShadowCopy class and related cmdlets to achieve shadow copy deletion. This commonly occurs in tandem with ransomware or other destructive attacks.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Volume Shadow Copy Deletion via PowerShell\n\nThe Volume Shadow Copy Service (VSS) is a Windows feature that enables system administrators to take snapshots of volumes that can later be restored or mounted to recover specific files or folders.\n\nA typical step in the playbook of an attacker attempting to deploy ransomware is to delete Volume Shadow Copies to ensure that victims have no alternative to paying the ransom, making any action that deletes shadow copies worth monitoring.\n\nThis rule monitors the execution of PowerShell cmdlets to interact with the Win32_ShadowCopy WMI class, retrieve shadow copy objects, and delete them.\n\n#### Possible investigation steps\n\n- Investigate the program execution chain (parent process tree).\n- Check whether the account is authorized to perform this operation.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- If unsigned files are found on the process tree, retrieve them and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Use process name, command line, and file hash to search for occurrences in other hosts.\n- Check if any files on the host machine have been encrypted.\n\n\n### False positive analysis\n\n- This rule has chances of producing benign true positives (B-TPs). If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Related rules\n\n- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921\n- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- Priority should be given due to the advanced stage of this activity on the attack.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- If data was encrypted, deleted, or modified, activate your data recovery plan.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Impact", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/previous-versions/windows/desktop/vsswmi/win32-shadowcopy", - "https://powershell.one/wmi/root/cimv2/win32_shadowcopy", - "https://www.fortinet.com/blog/threat-research/stomping-shadow-copies-a-second-look-into-deletion-methods" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1490", - "name": "Inhibit System Recovery", - "reference": "https://attack.mitre.org/techniques/T1490/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "2a117e91-bbf7-400a-8e35-f8d2776ef0a0", - "rule_id": "d99a037b-c8e2-47a5-97b9-170d076827c4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") and\n process.args : (\"*Get-WmiObject*\", \"*gwmi*\", \"*Get-CimInstance*\", \"*gcim*\") and\n process.args : (\"*Win32_ShadowCopy*\") and\n process.args : (\"*.Delete()*\", \"*Remove-WmiObject*\", \"*rwmi*\", \"*Remove-CimInstance*\", \"*rcim*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Hidden Process via Mount Hidepid", - "description": "Identifies the execution of mount process with hidepid parameter, which can make processes invisible to other users from the system. Adversaries using Linux kernel version 3.2+ (or RHEL/CentOS v6.5+ above) can hide the process from other users. When hidepid=2 option is executed to mount the /proc filesystem, only the root user can see all processes and the logged-in user can only see their own process. This provides a defense evasion mechanism for the adversaries to hide their process executions from all other commands such as ps, top, pgrep and more. With the Linux kernel hardening hidepid option all the user has to do is remount the /proc filesystem with the option, which can now be monitored and detected.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.cyberciti.biz/faq/linux-hide-processes-from-other-users/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1564", - "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/" - } - ] - } - ], - "id": "0efb7e14-465a-4c9c-8dcd-c7ae58c12608", - "rule_id": "dc71c186-9fe4-4437-a4d0-85ebb32b8204", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and process.name == \"mount\" and event.action == \"exec\" and\nprocess.args == \"/proc\" and process.args == \"-o\" and process.args : \"*hidepid=2*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Volume Shadow Copy Deletion via WMIC", - "description": "Identifies use of wmic.exe for shadow copy deletion on endpoints. This commonly occurs in tandem with ransomware or other destructive attacks.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Volume Shadow Copy Deletion via WMIC\n\nThe Volume Shadow Copy Service (VSS) is a Windows feature that enables system administrators to take snapshots of volumes that can later be restored or mounted to recover specific files or folders.\n\nA typical step in the playbook of an attacker attempting to deploy ransomware is to delete Volume Shadow Copies to ensure that victims have no alternative to paying the ransom, making any action that deletes shadow copies worth monitoring.\n\nThis rule monitors the execution of `wmic.exe` to interact with VSS via the `shadowcopy` alias and delete parameter.\n\n#### Possible investigation steps\n\n- Investigate the program execution chain (parent process tree).\n- Check whether the account is authorized to perform this operation.\n- Contact the account owner and confirm whether they are aware of this activity.\n- In the case of a resize operation, check if the resize value is equal to suspicious values, like 401MB.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- If unsigned files are found on the process tree, retrieve them and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Use process name, command line, and file hash to search for occurrences in other hosts.\n- Check if any files on the host machine have been encrypted.\n\n\n### False positive analysis\n\n- This rule has chances of producing benign true positives (B-TPs). If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Related rules\n\n- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921\n- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Priority should be given due to the advanced stage of this activity on the attack.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- If data was encrypted, deleted, or modified, activate your data recovery plan.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Impact", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1490", - "name": "Inhibit System Recovery", - "reference": "https://attack.mitre.org/techniques/T1490/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "ce2fd1ed-848f-4ec6-884b-3282bc1e9ec0", - "rule_id": "dc9c1f74-dac3-48e3-b47f-eb79db358f57", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"WMIC.exe\" or process.pe.original_file_name == \"wmic.exe\") and\n process.args : \"delete\" and process.args : \"shadowcopy\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Attempt to Install Kali Linux via WSL", - "description": "Detects attempts to install or use Kali Linux via Windows Subsystem for Linux. Adversaries may enable and use WSL for Linux to avoid detection.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://learn.microsoft.com/en-us/windows/wsl/wsl-config" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1202", - "name": "Indirect Command Execution", - "reference": "https://attack.mitre.org/techniques/T1202/" - } - ] - } - ], - "id": "4b8380f5-edfa-43ef-bd8c-b2eba603ab1e", - "rule_id": "dd34b062-b9e3-4a6b-8c0c-6c8ca6dd450e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (process.name : \"wsl.exe\" and process.args : (\"-d\", \"--distribution\", \"-i\", \"--install\") and process.args : \"kali*\") or \n process.executable : \n (\"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\packages\\\\kalilinux*\", \n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps\\\\kali.exe\",\n \"?:\\\\Program Files*\\\\WindowsApps\\\\KaliLinux.*\\\\kali.exe\")\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "NullSessionPipe Registry Modification", - "description": "Identifies NullSessionPipe registry modifications that specify which pipes can be accessed anonymously. This could be indicative of adversary lateral movement preparation by making the added pipe available to everyone.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.welivesecurity.com/2019/05/29/turla-powershell-usage/", - "https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/network-access-restrict-anonymous-access-to-named-pipes-and-shares" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.002", - "name": "SMB/Windows Admin Shares", - "reference": "https://attack.mitre.org/techniques/T1021/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "7ac6f97c-aece-48fc-8418-52427c35f416", - "rule_id": "ddab1f5f-7089-44f5-9fda-de5b11322e77", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\nregistry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\services\\\\LanmanServer\\\\Parameters\\\\NullSessionPipes\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\services\\\\LanmanServer\\\\Parameters\\\\NullSessionPipes\"\n) and length(registry.data.strings) > 0\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Base16 or Base32 Encoding/Decoding Activity", - "description": "Adversaries may encode/decode data in an attempt to evade detection by host- or network-based security controls.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Automated tools such as Jenkins may encode or decode files as part of their normal behavior. These events can be filtered by the process executable or username values." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1027", - "name": "Obfuscated Files or Information", - "reference": "https://attack.mitre.org/techniques/T1027/" - }, - { - "id": "T1140", - "name": "Deobfuscate/Decode Files or Information", - "reference": "https://attack.mitre.org/techniques/T1140/" - } - ] - } - ], - "id": "fac30532-24fb-422c-9eec-aebb6164479e", - "rule_id": "debff20a-46bc-4a4d-bae5-5cdd14222795", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ], - "query": "event.category:process and host.os.type:linux and event.type:(start or process_started) and\n process.name:(base16 or base32 or base32plain or base32hex)\n", - "language": "kuery" - }, - { - "name": "Dynamic Linker Copy", - "description": "Detects the copying of the Linux dynamic loader binary and subsequent file creation for the purpose of creating a backup copy. This technique was seen recently being utilized by Linux malware prior to patching the dynamic loader in order to inject and preload a malicious shared object file. This activity should never occur and if it does then it should be considered highly suspicious or malicious.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Threat: Orbit", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.intezer.com/blog/incident-response/orbit-new-undetected-linux-threat/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.006", - "name": "Dynamic Linker Hijacking", - "reference": "https://attack.mitre.org/techniques/T1574/006/" - } - ] - } - ] - } - ], - "id": "e0be0a93-bf77-4b2f-82b7-2728a9d82b3a", - "rule_id": "df6f62d9-caab-4b88-affa-044f4395a1e0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by process.entity_id with maxspan=1m\n[process where host.os.type == \"linux\" and event.type == \"start\" and process.name : (\"cp\", \"rsync\") and\n process.args : (\"/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2\", \"/etc/ld.so.preload\")]\n[file where host.os.type == \"linux\" and event.action == \"creation\" and file.extension == \"so\"]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "System Service Discovery through built-in Windows Utilities", - "description": "Detects the usage of commonly used system service discovery techniques, which attackers may use during the reconnaissance phase after compromising a system in order to gain a better understanding of the environment and/or escalate privileges.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend", - "Data Source: Elastic Endgame", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1007", - "name": "System Service Discovery", - "reference": "https://attack.mitre.org/techniques/T1007/" - } - ] - } - ], - "id": "45003c75-1bf6-448d-a664-817dda161618", - "rule_id": "e0881d20-54ac-457f-8733-fe0bc5d44c55", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n ((process.name: \"net.exe\" or process.pe.original_file_name == \"net.exe\" or (process.name : \"net1.exe\" and \n not process.parent.name : \"net.exe\")) and process.args : (\"start\", \"use\") and process.args_count == 2) or\n ((process.name: \"sc.exe\" or process.pe.original_file_name == \"sc.exe\") and process.args: (\"query\", \"q*\")) or\n ((process.name: \"tasklist.exe\" or process.pe.original_file_name == \"tasklist.exe\") and process.args: \"/svc\") or\n (process.name : \"psservice.exe\" or process.pe.original_file_name == \"psservice.exe\")\n ) and not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS Route Table Created", - "description": "Identifies when an AWS Route Table has been created.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Network Security Monitoring", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Route Tables may be created by a system or network administrators. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Route Table creation by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule. Automated processes that use Terraform may lead to false positives." - ], - "references": [ - "https://docs.datadoghq.com/security_platform/default_rules/aws-ec2-route-table-modified/", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateRoute.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateRouteTable" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - } - ], - "id": "cd532bdb-f1be-48a1-bd33-c2a658c3b363", - "rule_id": "e12c0318-99b1-44f2-830c-3a38a43207ca", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:(CreateRoute or CreateRouteTable) and\nevent.outcome:success\n", - "language": "kuery" - }, - { - "name": "AWS RDS Cluster Creation", - "description": "Identifies the creation of a new Amazon Relational Database Service (RDS) Aurora DB cluster or global database spread across multiple regions.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Valid clusters may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Cluster creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/create-db-cluster.html", - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/create-global-cluster.html", - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateGlobalCluster.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1133", - "name": "External Remote Services", - "reference": "https://attack.mitre.org/techniques/T1133/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [] - } - ], - "id": "f5b20739-835f-4d97-a934-2aa199780dfc", - "rule_id": "e14c5fd7-fdd7-49c2-9e5b-ec49d817bc8d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:(CreateDBCluster or CreateGlobalCluster) and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Connection to External Network via Telnet", - "description": "Telnet provides a command line interface for communication with a remote device or server. This rule identifies Telnet network connections to publicly routable IP addresses.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Telnet can be used for both benign or malicious purposes. Telnet is included by default in some Linux distributions, so its presence is not inherently suspicious. The use of Telnet to manage devices remotely has declined in recent years in favor of more secure protocols such as SSH. Telnet usage by non-automated tools or frameworks may be suspicious." - ], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - } - ], - "id": "96ea725b-25dc-486e-baea-ce9a85ff67af", - "rule_id": "e19e64ee-130e-4c07-961f-8a339f0b8362", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"linux\" and process.name == \"telnet\" and event.type == \"start\"]\n [network where host.os.type == \"linux\" and process.name == \"telnet\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\",\n \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\",\n \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Mining Process Creation Event", - "description": "Identifies service creation events of common mining services, possibly indicating the infection of a system with a cryptominer.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "6e76c563-32fc-41ca-91fe-7143f1ef8756", - "rule_id": "e2258f48-ba75-4248-951b-7c885edf18c2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "file where host.os.type == \"linux\" and event.type == \"creation\" and\nevent.action : (\"creation\", \"file_create_event\") and \nfile.name : (\"aliyun.service\", \"moneroocean_miner.service\", \"c3pool_miner.service\", \"pnsd.service\", \"apache4.service\", \"pastebin.service\", \"xvf.service\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "AWS Management Console Root Login", - "description": "Identifies a successful login to the AWS Management Console by the Root user.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS Management Console Root Login\n\nThe AWS root account is the one identity that has complete access to all AWS services and resources in the account, which is created when the AWS account is created. AWS strongly recommends that you do not use the root user for your everyday tasks, even the administrative ones. Instead, adhere to the best practice of using the root user only to create your first IAM user. Then securely lock away the root user credentials and use them to perform only a few account and service management tasks. AWS provides a [list of the tasks that require root user](https://docs.aws.amazon.com/general/latest/gr/root-vs-iam.html#aws_tasks-that-require-root).\n\nThis rule looks for attempts to log in to the AWS Management Console as the root user.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Examine whether this activity is common in the environment by looking for past occurrences on your logs.\n- Consider the source IP address and geolocation for the calling user who issued the command. Do they look normal for the calling user?\n- Examine the commands, API calls, and data management actions performed by the account in the last 24 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking access to servers,\nservices, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- The alert can be dismissed if this operation is done under change management and approved according to the organization's policy for performing a task that needs this privilege level.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Identify the services or servers involved criticality.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify if there are any regulatory or legal ramifications related to this activity.\n- Configure multi-factor authentication for the user.\n- Follow security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "It's strongly recommended that the root user is not used for everyday tasks, including the administrative ones. Verify whether the IP address, location, and/or hostname should be logging in as root in your environment. Unfamiliar root logins should be investigated immediately. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "e0130718-b37a-4f2a-a0cc-11afa27902bd", - "rule_id": "e2a67480-3b79-403d-96e3-fdd2992c50ef", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "aws.cloudtrail.user_identity.type", - "type": "keyword", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:signin.amazonaws.com and event.action:ConsoleLogin and aws.cloudtrail.user_identity.type:Root and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Process Activity via Compiled HTML File", - "description": "Compiled HTML files (.chm) are commonly distributed as part of the Microsoft HTML Help system. Adversaries may conceal malicious code in a CHM file and deliver it to a victim for execution. CHM content is loaded by the HTML Help executable program (hh.exe).", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Process Activity via Compiled HTML File\n\nCHM (Compiled HTML) files are a format for delivering online help files on Windows. CHM files are compressed compilations of various content, such as HTML documents, images, and scripting/web-related programming languages such as VBA, JScript, Java, and ActiveX.\n\nWhen users double-click CHM files, the HTML Help executable program (`hh.exe`) will execute them. `hh.exe` also can be used to execute code embedded in those files, PowerShell scripts, and executables. This makes it useful for attackers not only to proxy the execution of malicious payloads via a signed binary that could bypass security controls, but also to gain initial access to environments via social engineering methods.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.\n- Investigate the parent process to gain understanding of what triggered this behavior.\n - Retrieve `.chm`, `.ps1`, and other files that were involved to further examination.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executables, scripts and help files retrieved from the system using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "The HTML Help executable program (hh.exe) runs whenever a user clicks a compiled help (.chm) file or menu item that opens the help file inside the Help Viewer. This is not always malicious, but adversaries may abuse this technology to conceal malicious code." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1204", - "name": "User Execution", - "reference": "https://attack.mitre.org/techniques/T1204/", - "subtechnique": [ - { - "id": "T1204.002", - "name": "Malicious File", - "reference": "https://attack.mitre.org/techniques/T1204/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.001", - "name": "Compiled HTML File", - "reference": "https://attack.mitre.org/techniques/T1218/001/" - } - ] - } - ] - } - ], - "id": "74c6603d-65cd-4d59-a948-9fc92a20a344", - "rule_id": "e3343ab9-4245-4715-b344-e11c56b0a47f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"hh.exe\" and\n process.name : (\"mshta.exe\", \"cmd.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\", \"cscript.exe\", \"wscript.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS Route53 private hosted zone associated with a VPC", - "description": "Identifies when a Route53 private hosted zone has been associated with VPC.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "A private hosted zone may be asssociated with a VPC by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/Route53/latest/APIReference/API_AssociateVPCWithHostedZone.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "17d58f58-bc36-4400-8c83-6e5f41d9828e", - "rule_id": "e3c27562-709a-42bd-82f2-3ed926cced19", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:route53.amazonaws.com and event.action:AssociateVPCWithHostedZone and\nevent.outcome:success\n", - "language": "kuery" - }, - { - "name": "Kerberos Pre-authentication Disabled for User", - "description": "Identifies the modification of an account's Kerberos pre-authentication options. An adversary with GenericWrite/GenericAll rights over the account can maliciously modify these settings to perform offline password cracking attacks such as AS-REP roasting.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Kerberos Pre-authentication Disabled for User\n\nKerberos pre-authentication is an account protection against offline password cracking. When enabled, a user requesting access to a resource initiates communication with the Domain Controller (DC) by sending an Authentication Server Request (AS-REQ) message with a timestamp that is encrypted with the hash of their password. If and only if the DC is able to successfully decrypt the timestamp with the hash of the user’s password, it will then send an Authentication Server Response (AS-REP) message that contains the Ticket Granting Ticket (TGT) to the user. Part of the AS-REP message is signed with the user’s password. Microsoft's security monitoring [recommendations](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738) state that `'Don't Require Preauth' – Enabled` should not be enabled for user accounts because it weakens security for the account’s Kerberos authentication.\n\nAS-REP roasting is an attack against Kerberos for user accounts that do not require pre-authentication, which means that if the target user has pre-authentication disabled, an attacker can request authentication data for it and get a TGT that can be brute-forced offline, similarly to Kerberoasting.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Determine if the target account is sensitive or privileged.\n- Inspect the account activities for suspicious or abnormal behaviors in the alert timeframe.\n\n### False positive analysis\n\n- Disabling pre-authentication is a bad security practice and should not be allowed in the domain. The security team should map and monitor any potential benign true positives (B-TPs), especially if the target account is privileged.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Reset the target account's password if there is any risk of TGTs having been retrieved.\n- Re-enable the preauthentication option or disable the target account.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Defense Evasion", - "Tactic: Privilege Escalation", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring", - "Data Source: Active Directory" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://harmj0y.medium.com/roasting-as-reps-e6179a65216b", - "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4738", - "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0026_windows_audit_user_account_management.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/", - "subtechnique": [ - { - "id": "T1558.004", - "name": "AS-REP Roasting", - "reference": "https://attack.mitre.org/techniques/T1558/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - } - ] - } - ] - } - ], - "id": "ea5762d0-439c-49f4-8a06-7c0c40ca5ffa", - "rule_id": "e514d8cd-ed15-4011-84e2-d15147e059f1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "message", - "type": "match_only_text", - "ecs": true - }, - { - "name": "winlog.api", - "type": "keyword", - "ecs": false - } - ], - "setup": "The 'Audit User Account Management' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nAccount Management >\nAudit User Account Management (Success,Failure)\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.code:4738 and winlog.api:\"wineventlog\" and message:\"'Don't Require Preauth' - Enabled\"\n", - "language": "kuery" - }, - { - "name": "Bash Shell Profile Modification", - "description": "Both ~/.bash_profile and ~/.bashrc are files containing shell commands that are run when Bash is invoked. These files are executed in a user's context, either interactively or non-interactively, when a user logs in so that their environment is set correctly. Adversaries may abuse this to establish persistence by executing malicious content triggered by a user’s shell.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Changes to the Shell Profile tend to be noisy, a tuning per your environment will be required." - ], - "references": [ - "https://www.anomali.com/blog/pulling-linux-rabbit-rabbot-malware-out-of-a-hat" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.004", - "name": "Unix Shell Configuration Modification", - "reference": "https://attack.mitre.org/techniques/T1546/004/" - } - ] - } - ] - } - ], - "id": "6cc3d627-4599-48d6-a76f-3f55f82e00fa", - "rule_id": "e6c1a552-7776-44ad-ae0f-8746cc07773c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "logs-endpoint.events.*", - "auditbeat-*" - ], - "query": "event.category:file and event.type:change and\n process.name:(* and not (sudo or vim or zsh or env or nano or bash or Terminal or xpcproxy or login or cat or cp or\n launchctl or java or dnf or tailwatchd or ldconfig or yum or semodule or cpanellogd or dockerd or authselect or chmod or\n dnf-automatic or git or dpkg or platform-python)) and\n not process.executable:(/Applications/* or /private/var/folders/* or /usr/local/* or /opt/saltstack/salt/bin/*) and\n file.path:(/private/etc/rc.local or\n /etc/rc.local or\n /home/*/.profile or\n /home/*/.profile1 or\n /home/*/.bash_profile or\n /home/*/.bash_profile1 or\n /home/*/.bashrc or\n /Users/*/.bash_profile or\n /Users/*/.zshenv)\n", - "language": "kuery" - }, - { - "name": "Possible Okta DoS Attack", - "description": "Detects possible Denial of Service (DoS) attacks against an Okta organization. An adversary may attempt to disrupt an organization's business operations by performing a DoS attack against its Okta service.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1498", - "name": "Network Denial of Service", - "reference": "https://attack.mitre.org/techniques/T1498/" - }, - { - "id": "T1499", - "name": "Endpoint Denial of Service", - "reference": "https://attack.mitre.org/techniques/T1499/" - } - ] - } - ], - "id": "b3d9da6e-c4c2-4c13-a8ad-08c619234e3d", - "rule_id": "e6e3ecff-03dd-48ec-acbd-54a04de10c68", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:(application.integration.rate_limit_exceeded or system.org.rate_limit.warning or system.org.rate_limit.violation or core.concurrency.org.limit.violation)\n", - "language": "kuery" - }, - { - "name": "AWS Route Table Modified or Deleted", - "description": "Identifies when an AWS Route Table has been modified or deleted.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Network Security Monitoring", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Route Table could be modified or deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Route Table being modified from unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule. Also automated processes that use Terraform may lead to false positives." - ], - "references": [ - "https://github.com/easttimor/aws-incident-response#network-routing", - "https://docs.datadoghq.com/security_platform/default_rules/aws-ec2-route-table-modified/", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReplaceRoute.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReplaceRouteTableAssociation", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRouteTable.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRoute.html", - "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateRouteTable.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - } - ], - "id": "23c9dfeb-105f-475f-bbd0-cb349a2176bc", - "rule_id": "e7cd5982-17c8-4959-874c-633acde7d426", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:cloudtrail.amazonaws.com and event.action:(ReplaceRoute or ReplaceRouteTableAssociation or\nDeleteRouteTable or DeleteRoute or DisassociateRouteTable) and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Installation of Security Support Provider", - "description": "Identifies registry modifications related to the Windows Security Support Provider (SSP) configuration. Adversaries may abuse this to establish persistence in an environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.005", - "name": "Security Support Provider", - "reference": "https://attack.mitre.org/techniques/T1547/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "578ec3f0-8fce-4008-8660-09f2fffc0725", - "rule_id": "e86da94d-e54b-4fb5-b96c-cecff87e8787", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\Security Packages*\",\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\OSConfig\\\\Security Packages*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\Security Packages*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\OSConfig\\\\Security Packages*\"\n ) and\n not process.executable : (\"C:\\\\Windows\\\\System32\\\\msiexec.exe\", \"C:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS EC2 VM Export Failure", - "description": "Identifies an attempt to export an AWS EC2 instance. A virtual machine (VM) export may indicate an attempt to extract or exfiltrate information.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Exfiltration", - "Tactic: Collection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "VM exports may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. VM exports from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#export-instance" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1537", - "name": "Transfer Data to Cloud Account", - "reference": "https://attack.mitre.org/techniques/T1537/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1005", - "name": "Data from Local System", - "reference": "https://attack.mitre.org/techniques/T1005/" - } - ] - } - ], - "id": "34e4d8fe-5bd3-4470-b2b4-d4704cb5cd06", - "rule_id": "e919611d-6b6f-493b-8314-7ed6ac2e413b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:ec2.amazonaws.com and event.action:CreateInstanceExportTask and event.outcome:failure\n", - "language": "kuery" - }, - { - "name": "AWS IAM Brute Force of Assume Role Policy", - "description": "Identifies a high number of failed attempts to assume an AWS Identity and Access Management (IAM) role. IAM roles are used to delegate access to users or services. An adversary may attempt to enumerate IAM roles in order to determine if a role exists before attempting to assume or hijack the discovered role.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS IAM Brute Force of Assume Role Policy\n\nAn IAM role is an IAM identity that you can create in your account that has specific permissions. An IAM role is similar to an IAM user, in that it is an AWS identity with permission policies that determine what the identity can and cannot do in AWS. However, instead of being uniquely associated with one person, a role is intended to be assumable by anyone who needs it. Also, a role does not have standard long-term credentials such as a password or access keys associated with it. Instead, when you assume a role, it provides you with temporary security credentials for your role session.\n\nAttackers may attempt to enumerate IAM roles in order to determine if a role exists before attempting to assume or hijack the discovered role.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Verify if the `RoleName` parameter contains a unique value in all requests or if the activity is potentially a brute force attack.\n- Verify if the user account successfully updated a trust policy in the last 24 hours.\n- Examine whether this role existed in the environment by looking for past occurrences in your logs.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?\n- Examine the account's commands, API calls, and data management actions in the last 24 hours.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- Verify the roles targeted in the failed attempts, and whether the subject role previously existed in the environment. If only one role was targeted in the requests and that role previously existed, it may be a false positive, since automations can continue targeting roles that existed in the environment in the past and cause false positives (FPs).\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-20m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.praetorian.com/blog/aws-iam-assume-role-vulnerabilities", - "https://rhinosecuritylabs.com/aws/assume-worst-aws-assume-role-enumeration/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "8d6a4d74-9aa4-4650-9f8f-672e3076d268", - "rule_id": "ea248a02-bc47-4043-8e94-2885b19b2636", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "aws.cloudtrail.error_code", - "type": "keyword", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "threshold", - "query": "event.dataset:aws.cloudtrail and\n event.provider:iam.amazonaws.com and event.action:UpdateAssumeRolePolicy and\n aws.cloudtrail.error_code:MalformedPolicyDocumentException and event.outcome:failure\n", - "threshold": { - "field": [], - "value": 25 - }, - "index": [ - "filebeat-*", - "logs-aws*" - ], - "language": "kuery" - }, - { - "name": "PowerShell Kerberos Ticket Request", - "description": "Detects PowerShell scripts that have the capability of requesting kerberos tickets, which is a common step in Kerberoasting toolkits to crack service accounts.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Kerberos Ticket Request\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks, making it available for use in various environments, creating an attractive way for attackers to execute code.\n\nAccounts associated with a service principal name (SPN) are viable targets for Kerberoasting attacks, which use brute force to crack the user password, which is used to encrypt a Kerberos TGS ticket.\n\nAttackers can use PowerShell to request these Kerberos tickets, with the intent of extracting them from memory to perform Kerberoasting.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate if the script was executed, and if so, which account was targeted.\n- Validate if the account has an SPN associated with it.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Check if the script has any other functionality that can be potentially malicious.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Review event ID [4769](https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4769) related to this account and service name for additional information.\n\n### False positive analysis\n\n- A possible false positive can be identified if the script content is not malicious/harmful or does not request Kerberos tickets for user accounts, as computer accounts are not vulnerable to Kerberoasting due to complex password requirements and policy.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services. Prioritize privileged accounts.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://cobalt.io/blog/kerberoast-attack-techniques", - "https://github.com/EmpireProject/Empire/blob/master/data/module_source/credentials/Invoke-Kerberoast.ps1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - }, - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/", - "subtechnique": [ - { - "id": "T1558.003", - "name": "Kerberoasting", - "reference": "https://attack.mitre.org/techniques/T1558/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "b8ac856d-7ce9-4f1e-90a3-5615a70a4900", - "rule_id": "eb610e70-f9e6-4949-82b9-f1c5bcd37c39", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n KerberosRequestorSecurityToken\n ) and not user.id : (\"S-1-5-18\" or \"S-1-5-20\") and\n not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n", - "language": "kuery" - }, - { - "name": "Potential Disabling of SELinux", - "description": "Identifies potential attempts to disable Security-Enhanced Linux (SELinux), which is a Linux kernel security feature to support access control policies. Adversaries may disable security tools to avoid possible detection of their tools and activities.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "b0f97990-5265-45b8-8587-d95db4aa8c23", - "rule_id": "eb9eb8ba-a983-41d9-9c93-a1c05112ca5e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Elastic Defend, or Auditbeat integration.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*", - "endgame-*" - ], - "query": "event.category:process and host.os.type:linux and event.type:(start or process_started) and process.name:setenforce and process.args:0\n", - "language": "kuery" - }, - { - "name": "AWS RDS Instance/Cluster Stoppage", - "description": "Identifies that an Amazon Relational Database Service (RDS) cluster or instance has been stopped.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Valid clusters or instances may be stopped by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Cluster or instance stoppages from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/stop-db-cluster.html", - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_StopDBCluster.html", - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/stop-db-instance.html", - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_StopDBInstance.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1489", - "name": "Service Stop", - "reference": "https://attack.mitre.org/techniques/T1489/" - } - ] - } - ], - "id": "6b48dd07-28cb-4e91-925a-e35f37f21fdf", - "rule_id": "ecf2b32c-e221-4bd4-aa3b-c7d59b3bc01d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:(StopDBCluster or StopDBInstance) and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "AdFind Command Activity", - "description": "This rule detects the Active Directory query tool, AdFind.exe. AdFind has legitimate purposes, but it is frequently leveraged by threat actors to perform post-exploitation Active Directory reconnaissance. The AdFind tool has been observed in Trickbot, Ryuk, Maze, and FIN6 campaigns. For Winlogbeat, this rule requires Sysmon.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AdFind Command Activity\n\n[AdFind](http://www.joeware.net/freetools/tools/adfind/) is a freely available command-line tool used to retrieve information from Active Directory (AD). Network discovery and enumeration tools like `AdFind` are useful to adversaries in the same ways they are effective for network administrators. This tool provides quick ability to scope AD person/computer objects and understand subnets and domain information. There are many [examples](https://thedfirreport.com/category/adfind/) of this tool being adopted by ransomware and criminal groups and used in compromises.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Examine the command line to determine what information was retrieved by the tool.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- This rule has a high chance to produce false positives as it is a legitimate tool used by network administrators.\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Malicious behavior with `AdFind` should be investigated as part of a step within an attack chain. It doesn't happen in isolation, so reviewing previous logs/activity from impacted machines can be very telling.\n\n### Related rules\n\n- Windows Network Enumeration - 7b8bfc26-81d2-435e-965c-d722ee397ef1\n- Enumeration of Administrator Accounts - 871ea072-1b71-4def-b016-6278b505138d\n- Enumeration Command Spawned via WMIPrvSE - 770e0c4d-b998-41e5-a62e-c7901fd7f470\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "http://www.joeware.net/freetools/tools/adfind/", - "https://thedfirreport.com/2020/05/08/adfind-recon/", - "https://www.fireeye.com/blog/threat-research/2020/05/tactics-techniques-procedures-associated-with-maze-ransomware-incidents.html", - "https://www.cybereason.com/blog/dropping-anchor-from-a-trickbot-infection-to-the-discovery-of-the-anchor-malware", - "https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html", - "https://usa.visa.com/dam/VCOM/global/support-legal/documents/fin6-cybercrime-group-expands-threat-To-ecommerce-merchants.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1018", - "name": "Remote System Discovery", - "reference": "https://attack.mitre.org/techniques/T1018/" - }, - { - "id": "T1069", - "name": "Permission Groups Discovery", - "reference": "https://attack.mitre.org/techniques/T1069/", - "subtechnique": [ - { - "id": "T1069.002", - "name": "Domain Groups", - "reference": "https://attack.mitre.org/techniques/T1069/002/" - } - ] - }, - { - "id": "T1087", - "name": "Account Discovery", - "reference": "https://attack.mitre.org/techniques/T1087/", - "subtechnique": [ - { - "id": "T1087.002", - "name": "Domain Account", - "reference": "https://attack.mitre.org/techniques/T1087/002/" - } - ] - }, - { - "id": "T1482", - "name": "Domain Trust Discovery", - "reference": "https://attack.mitre.org/techniques/T1482/" - }, - { - "id": "T1016", - "name": "System Network Configuration Discovery", - "reference": "https://attack.mitre.org/techniques/T1016/" - } - ] - } - ], - "id": "93aa4e08-89cb-4b86-93de-38864dee9608", - "rule_id": "eda499b8-a073-4e35-9733-22ec71f57f3a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"AdFind.exe\" or process.pe.original_file_name == \"AdFind.exe\") and\n process.args : (\"objectcategory=computer\", \"(objectcategory=computer)\",\n \"objectcategory=person\", \"(objectcategory=person)\",\n \"objectcategory=subnet\", \"(objectcategory=subnet)\",\n \"objectcategory=group\", \"(objectcategory=group)\",\n \"objectcategory=organizationalunit\", \"(objectcategory=organizationalunit)\",\n \"objectcategory=attributeschema\", \"(objectcategory=attributeschema)\",\n \"domainlist\", \"dcmodes\", \"adinfo\", \"dclist\", \"computers_pwnotreqd\", \"trustdmp\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "ImageLoad via Windows Update Auto Update Client", - "description": "Identifies abuse of the Windows Update Auto Update Client (wuauclt.exe) to load an arbitrary DLL. This behavior is used as a defense evasion technique to blend-in malicious activity with legitimate Windows software.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "timeline_id": "e70679c2-6cde-4510-9764-4823df18f7db", - "timeline_title": "Comprehensive Process Timeline", - "license": "Elastic License v2", - "note": "", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://dtm.uk/wuauclt/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "5d29f3e5-c293-49f7-a712-2b0701c4d9fb", - "rule_id": "edf8ee23-5ea7-4123-ba19-56b41e424ae3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.pe.original_file_name == \"wuauclt.exe\" or process.name : \"wuauclt.exe\") and\n /* necessary windows update client args to load a dll */\n process.args : \"/RunHandlerComServer\" and process.args : \"/UpdateDeploymentProvider\" and\n /* common paths writeable by a standard user where the target DLL can be placed */\n process.args : (\"C:\\\\Users\\\\*.dll\", \"C:\\\\ProgramData\\\\*.dll\", \"C:\\\\Windows\\\\Temp\\\\*.dll\", \"C:\\\\Windows\\\\Tasks\\\\*.dll\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "BPF filter applied using TC", - "description": "Detects when the tc (transmission control) binary is utilized to set a BPF (Berkeley Packet Filter) on a network interface. Tc is used to configure Traffic Control in the Linux kernel. It can shape, schedule, police and drop traffic. A threat actor can utilize tc to set a bpf filter on an interface for the purpose of manipulating the incoming traffic. This technique is not at all common and should indicate abnormal, suspicious or malicious activity.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Threat: TripleCross", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/h3xduck/TripleCross/blob/master/src/helpers/deployer.sh", - "https://man7.org/linux/man-pages/man8/tc.8.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "9100291c-c9dd-4503-82df-f31482e8e787", - "rule_id": "ef04a476-07ec-48fc-8f3d-5e1742de76d3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type != \"end\" and process.executable : \"/usr/sbin/tc\" and process.args : \"filter\" and process.args : \"add\" and process.args : \"bpf\" and not process.parent.executable: \"/usr/sbin/libvirtd\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Potential Linux Credential Dumping via Proc Filesystem", - "description": "Identifies the execution of the mimipenguin exploit script which is linux adaptation of Windows tool mimikatz. Mimipenguin exploit script is used to dump clear text passwords from a currently logged-in user. The tool exploits a known vulnerability CVE-2018-20781. Malicious actors can exploit the cleartext credentials in memory by dumping the process and extracting lines that have a high probability of containing cleartext passwords.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/huntergregal/mimipenguin", - "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20781" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.007", - "name": "Proc Filesystem", - "reference": "https://attack.mitre.org/techniques/T1003/007/" - } - ] - }, - { - "id": "T1212", - "name": "Exploitation for Credential Access", - "reference": "https://attack.mitre.org/techniques/T1212/" - } - ] - } - ], - "id": "c1225b61-b162-4e0f-80e3-619b0663039e", - "rule_id": "ef100a2e-ecd4-4f72-9d1e-2f779ff3c311", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by process.parent.name,host.name with maxspan=1m\n[process where host.os.type == \"linux\" and process.name == \"ps\" and event.action == \"exec\"\n and process.args in (\"-eo\", \"pid\", \"command\") ]\n\n[process where host.os.type == \"linux\" and process.name == \"strings\" and event.action == \"exec\"\n and process.args : \"/tmp/*\" ]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Administrator Role Assigned to an Okta User", - "description": "Identifies when an administrator role is assigned to an Okta user. An adversary may attempt to assign an administrator role to an Okta user in order to assign additional permissions to a user account and maintain access to their target's environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Data Source: Okta", - "Use Case: Identity and Access Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Administrator roles may be assigned to Okta users by a Super Admin user. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://help.okta.com/en/prod/Content/Topics/Security/administrators-admin-comparison.htm", - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "ce2f301f-a403-42cd-97fe-ad645cc08abe", - "rule_id": "f06414a6-f2a4-466d-8eba-10f85e8abf71", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:user.account.privilege.grant\n", - "language": "kuery" - }, - { - "name": "LSASS Memory Dump Creation", - "description": "Identifies the creation of a Local Security Authority Subsystem Service (lsass.exe) default memory dump. This may indicate a credential access attempt via trusted system utilities such as Task Manager (taskmgr.exe) and SQL Dumper (sqldumper.exe) or known pentesting tools such as Dumpert and AndrewSpecial.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "timeline_id": "4d4c0b59-ea83-483f-b8c1-8c360ee53c5c", - "timeline_title": "Comprehensive File Timeline", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating LSASS Memory Dump Creation\n\nLocal Security Authority Server Service (LSASS) is a process in Microsoft Windows operating systems that is responsible for enforcing security policy on the system. It verifies users logging on to a Windows computer or server, handles password changes, and creates access tokens.\n\nThis rule looks for the creation of memory dump files with file names compatible with credential dumping tools or that start with `lsass`.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Identify the process responsible for creating the dump file.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/outflanknl/Dumpert", - "https://github.com/hoangprod/AndrewSpecial" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "dc3f3979-90d0-4079-abb8-1f76171257af", - "rule_id": "f2f46686-6f3c-4724-bd7d-24e31c70f98f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and file.name : (\"lsass*.dmp\", \"dumpert.dmp\", \"Andrew.dmp\", \"SQLDmpr*.mdmp\", \"Coredump.dmp\") and\n\n not (process.executable : (\"?:\\\\Program Files\\\\Microsoft SQL Server\\\\*\\\\Shared\\\\SqlDumper.exe\", \"?:\\\\Windows\\\\System32\\\\dllhost.exe\") and\n file.path : (\"?:\\\\Program Files\\\\Microsoft SQL Server\\\\*\\\\Shared\\\\ErrorDumps\\\\SQLDmpr*.mdmp\",\n \"?:\\\\*\\\\Reporting Services\\\\Logfiles\\\\SQLDmpr*.mdmp\")) and\n\n not (process.executable : \"?:\\\\WINDOWS\\\\system32\\\\WerFault.exe\" and\n file.path : \"?:\\\\Windows\\\\System32\\\\config\\\\systemprofile\\\\AppData\\\\Local\\\\CrashDumps\\\\lsass.exe.*.dmp\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS RDS Instance Creation", - "description": "Identifies the creation of an Amazon Relational Database Service (RDS) Aurora database instance.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Use Case: Asset Visibility", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "A database instance may be created by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Instances creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - } - ], - "id": "9a40f1e6-2181-4d94-8005-3a9e511af7ec", - "rule_id": "f30f3443-4fbb-4c27-ab89-c3ad49d62315", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:rds.amazonaws.com and event.action:CreateDBInstance and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Persistence via Microsoft Office AddIns", - "description": "Detects attempts to establish persistence on an endpoint by abusing Microsoft Office add-ins.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://labs.withsecure.com/publications/add-in-opportunities-for-office-persistence" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1137", - "name": "Office Application Startup", - "reference": "https://attack.mitre.org/techniques/T1137/", - "subtechnique": [ - { - "id": "T1137.006", - "name": "Add-ins", - "reference": "https://attack.mitre.org/techniques/T1137/006/" - } - ] - } - ] - } - ], - "id": "17cbccf2-fa24-4c45-a35c-a4f46ccfcf34", - "rule_id": "f44fa4b6-524c-4e87-8d9e-a32599e4fb7c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.extension : (\"wll\",\"xll\",\"ppa\",\"ppam\",\"xla\",\"xlam\") and\n file.path :\n (\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Word\\\\Startup\\\\*\",\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\AddIns\\\\*\",\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Excel\\\\XLSTART\\\\*\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Sensitive Privilege SeEnableDelegationPrivilege assigned to a User", - "description": "Identifies the assignment of the SeEnableDelegationPrivilege sensitive \"user right\" to a user. The SeEnableDelegationPrivilege \"user right\" enables computer and user accounts to be trusted for delegation. Attackers can abuse this right to compromise Active Directory accounts and elevate their privileges.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Sensitive Privilege SeEnableDelegationPrivilege assigned to a User\n\nKerberos delegation is an Active Directory feature that allows user and computer accounts to impersonate other accounts, act on their behalf, and use their privileges. Delegation (constrained and unconstrained) can be configured for user and computer objects.\n\nEnabling unconstrained delegation for a computer causes the computer to store the ticket-granting ticket (TGT) in memory at any time an account connects to the computer, so it can be used by the computer for impersonation when needed. Risk is heightened if an attacker compromises computers with unconstrained delegation enabled, as they could extract TGTs from memory and then replay them to move laterally on the domain. If the attacker coerces a privileged user to connect to the server, or if the user does so routinely, the account will be compromised and the attacker will be able to pass-the-ticket to privileged assets.\n\nSeEnableDelegationPrivilege is a user right that is controlled within the Local Security Policy of a domain controller and is managed through Group Policy. This setting is named **Enable computer and user accounts to be trusted for delegation**.\n\nIt is critical to control the assignment of this privilege. A user with this privilege and write access to a computer can control delegation settings, perform the attacks described above, and harvest TGTs from any user that connects to the system.\n\n#### Possible investigation steps\n\n- Investigate how the privilege was assigned to the user and who assigned it.\n- Investigate other potentially malicious activity that was performed by the user that assigned the privileges using the `user.id` and `winlog.activity_id` fields as a filter during the past 48 hours.\n- Investigate other alerts associated with the users/host during the past 48 hours.\n\n### False positive analysis\n\n- The SeEnableDelegationPrivilege privilege should not be assigned to users. If this rule is triggered in your environment legitimately, the security team should notify the administrators about the risks of using it.\n\n### Related rules\n\n- KRBTGT Delegation Backdoor - e052c845-48d0-4f46-8a13-7d0aba05df82\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Remove the privilege from the account.\n- Review the privileges of the administrator account that performed the action.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 108, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Persistence", - "Data Source: Active Directory", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.harmj0y.net/activedirectory/the-most-dangerous-user-right-you-probably-have-never-heard-of/", - "https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_alert_active_directory_user_control.yml", - "https://twitter.com/_nwodtuhs/status/1454049485080907776", - "https://www.thehacker.recipes/ad/movement/kerberos/delegations", - "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0105_windows_audit_authorization_policy_change.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "4942dc95-09fc-430d-9e69-2aa52a7d1e07", - "rule_id": "f494c678-3c33-43aa-b169-bb3d5198c41d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.PrivilegeList", - "type": "keyword", - "ecs": false - } - ], - "setup": "The 'Audit Authorization Policy Change' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policy Configuration >\nAudit Policies >\nPolicy Change >\nAudit Authorization Policy Change (Success,Failure)\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.action:\"Authorization Policy Change\" and event.code:4704 and\n winlog.event_data.PrivilegeList:\"SeEnableDelegationPrivilege\"\n", - "language": "kuery" - }, - { - "name": "Windows Script Executing PowerShell", - "description": "Identifies a PowerShell process launched by either cscript.exe or wscript.exe. Observing Windows scripting processes executing a PowerShell script, may be indicative of malicious activity.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Windows Script Executing PowerShell\n\nThe Windows Script Host (WSH) is an Windows automation technology, which is ideal for non-interactive scripting needs, such as logon scripting, administrative scripting, and machine automation.\n\nAttackers commonly use WSH scripts as their initial access method, acting like droppers for second stage payloads, but can also use them to download tools and utilities needed to accomplish their goals.\n\nThis rule looks for the spawn of the `powershell.exe` process with `cscript.exe` or `wscript.exe` as its parent process.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate commands executed by the spawned PowerShell process.\n- If unsigned files are found on the process tree, retrieve them and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Determine how the script file was delivered (email attachment, dropped by other processes, etc.).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- The usage of these script engines by regular users is unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Reimage the host operating system and restore compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.005", - "name": "Visual Basic", - "reference": "https://attack.mitre.org/techniques/T1059/005/" - } - ] - } - ] - } - ], - "id": "a3fee6f0-ba68-45ac-a21c-3d8e54bb0787", - "rule_id": "f545ff26-3c94-4fd0-bd33-3c7f95a3a0fc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"cscript.exe\", \"wscript.exe\") and process.name : \"powershell.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Windows Firewall Disabled via PowerShell", - "description": "Identifies when the Windows Firewall is disabled using PowerShell cmdlets, which can help attackers evade network constraints, like internet and network lateral communication restrictions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Windows Firewall Disabled via PowerShell\n\nWindows Defender Firewall is a native component that provides host-based, two-way network traffic filtering for a device and blocks unauthorized network traffic flowing into or out of the local device.\n\nAttackers can disable the Windows firewall or its rules to enable lateral movement and command and control activity.\n\nThis rule identifies patterns related to disabling the Windows firewall or its rules using the `Set-NetFirewallProfile` PowerShell cmdlet.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Check whether the user is an administrator and is legitimately performing troubleshooting.\n- In case of an allowed benign true positive (B-TP), assess adding rules to allow needed traffic and re-enable the firewall.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Re-enable the firewall with its desired configurations.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Windows Firewall can be disabled by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Windows Profile being disabled by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/netsecurity/set-netfirewallprofile?view=windowsserver2019-ps", - "https://www.tutorialspoint.com/how-to-get-windows-firewall-profile-settings-using-powershell", - "http://powershellhelp.space/commands/set-netfirewallrule-psv5.php", - "http://woshub.com/manage-windows-firewall-powershell/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.004", - "name": "Disable or Modify System Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "6155eec0-deae-4c58-bbc3-b2012deaac46", - "rule_id": "f63c8e3c-d396-404f-b2ea-0379d3942d73", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.action == \"start\" and\n (process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") or process.pe.original_file_name == \"PowerShell.EXE\") and\n process.args : \"*Set-NetFirewallProfile*\" and\n (process.args : \"*-Enabled*\" and process.args : \"*False*\") and\n (process.args : \"*-All*\" or process.args : (\"*Public*\", \"*Domain*\", \"*Private*\"))\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Delete Volume USN Journal with Fsutil", - "description": "Identifies use of the fsutil.exe to delete the volume USNJRNL. This technique is used by attackers to eliminate evidence of files created during post-exploitation activities.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Delete Volume USN Journal with Fsutil\n\nThe Update Sequence Number (USN) Journal is a feature in the NTFS file system used by Microsoft Windows operating systems to keep track of changes made to files and directories on a disk volume. The journal records metadata for changes such as file creation, deletion, modification, and permission changes. It is used by the operating system for various purposes, including backup and recovery, file indexing, and file replication.\n\nThis artifact can provide valuable information in forensic analysis, such as programs executed (prefetch file operations), file modification events in suspicious directories, deleted files, etc. Attackers may delete this artifact in an attempt to cover their tracks, and this rule identifies the usage of the `fsutil.exe` utility to accomplish it.\n\nConsider using the Elastic Defend integration instead of USN Journal, as the Elastic Defend integration provides more visibility and context in the file operations it records.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Review file operation logs from Elastic Defend for suspicious activity the attacker tried to hide.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.004", - "name": "File Deletion", - "reference": "https://attack.mitre.org/techniques/T1070/004/" - } - ] - } - ] - } - ], - "id": "e2acf638-6c50-43a4-9cab-cadb1ed614fd", - "rule_id": "f675872f-6d85-40a3-b502-c0d2ef101e92", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"fsutil.exe\" or process.pe.original_file_name == \"fsutil.exe\") and\n process.args : \"deletejournal\" and process.args : \"usn\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "AWS CloudWatch Alarm Deletion", - "description": "Identifies the deletion of an AWS CloudWatch alarm. An adversary may delete alarms in an attempt to evade defenses.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating AWS CloudWatch Alarm Deletion\n\nAmazon CloudWatch is a monitoring and observability service that collects monitoring and operational data in the form of\nlogs, metrics, and events for resources and applications. This data can be used to detect anomalous behavior in your environments, set alarms, visualize\nlogs and metrics side by side, take automated actions, troubleshoot issues, and discover insights to keep your\napplications running smoothly.\n\nCloudWatch Alarms is a feature that allows you to watch CloudWatch metrics and to receive notifications when the metrics\nfall outside of the levels (high or low thresholds) that you configure.\n\nThis rule looks for the deletion of a alarm using the API `DeleteAlarms` action. Attackers can do this to cover their\ntracks and evade security defenses.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if there is a justification for this behavior.\n- Considering the source IP address and geolocation of the user who issued the command:\n - Do they look normal for the user?\n - If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?\n - If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.\n- Take the actions needed to return affected systems, data, or services to their normal operational levels.\n- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 208, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Resources: Investigation Guide", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Alarm deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudwatch/delete-alarms.html", - "https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DeleteAlarms.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "8e6aff68-3507-442e-8b40-2b6f3fc9e255", - "rule_id": "f772ec8a-e182-483c-91d2-72058f76a44c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:monitoring.amazonaws.com and event.action:DeleteAlarms and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Microsoft Exchange Worker Spawning Suspicious Processes", - "description": "Identifies suspicious processes being spawned by the Microsoft Exchange Server worker process (w3wp). This activity may indicate exploitation activity or access to an existing web shell backdoor.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers", - "https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities", - "https://discuss.elastic.co/t/detection-and-response-for-hafnium-activity/266289" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - }, - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - } - ], - "id": "0b9b2e4d-51b0-4309-9e52-0a1d29ccc099", - "rule_id": "f81ee52c-297e-46d9-9205-07e66931df26", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"w3wp.exe\" and process.parent.args : \"MSExchange*AppPool\" and\n (process.name : (\"cmd.exe\", \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") or\n process.pe.original_file_name in (\"cmd.exe\", \"powershell.exe\", \"pwsh.dll\", \"powershell_ise.exe\"))\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Modification of AmsiEnable Registry Key", - "description": "Identifies modifications of the AmsiEnable registry key to 0, which disables the Antimalware Scan Interface (AMSI). An adversary can modify this key to disable AMSI protections.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Modification of AmsiEnable Registry Key\n\nThe Windows Antimalware Scan Interface (AMSI) is a versatile interface standard that allows your applications and services to integrate with any antimalware product on a machine. AMSI integrates with multiple Windows components, ranging from User Account Control (UAC) to VBA macros and PowerShell.\n\nSince AMSI is widely used across security products for increased visibility, attackers can disable it to evade detections that rely on it.\n\nThis rule monitors the modifications to the Software\\Microsoft\\Windows Script\\Settings\\AmsiEnable registry key.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the execution of scripts and macros after the registry modification.\n- Retrieve scripts or Microsoft Office files and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Use process name, command line, and file hash to search for occurrences on other hosts.\n\n### False positive analysis\n\n- This modification should not happen legitimately. Any potential benign true positive (B-TP) should be mapped and monitored by the security team as these modifications expose the host to malware infections.\n\n### Related rules\n\n- Microsoft Windows Defender Tampering - fe794edd-487f-4a90-b285-3ee54f2af2d3\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Delete or set the key to its default value.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://hackinparis.com/data/slides/2019/talks/HIP2019-Dominic_Chell-Cracking_The_Perimeter_With_Sharpshooter.pdf", - "https://docs.microsoft.com/en-us/windows/win32/amsi/antimalware-scan-interface-portal" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - }, - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "2c88fbd3-7b16-442b-8952-9555c4fbf75a", - "rule_id": "f874315d-5188-4b4a-8521-d1c73093a7e4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n registry.path : (\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows Script\\\\Settings\\\\AmsiEnable\",\n \"HKU\\\\*\\\\Software\\\\Microsoft\\\\Windows Script\\\\Settings\\\\AmsiEnable\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows Script\\\\Settings\\\\AmsiEnable\"\n ) and\n registry.data.strings: (\"0\", \"0x00000000\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Unusual Linux Network Configuration Discovery", - "description": "Looks for commands related to system network configuration discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used by a threat actor to engage in system network configuration discovery in order to increase their understanding of connected networks and hosts. This information may be used to shape follow-up behaviors such as lateral movement or additional discovery.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Discovery" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon user command activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1016", - "name": "System Network Configuration Discovery", - "reference": "https://attack.mitre.org/techniques/T1016/" - } - ] - } - ], - "id": "ed9741ec-8678-4ff9-9b04-9a94b855b927", - "rule_id": "f9590f47-6bd5-4a49-bd49-a2f886476fb9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 25, - "machine_learning_job_id": [ - "v3_linux_network_configuration_discovery" - ] - }, - { - "name": "Privileged Account Brute Force", - "description": "Identifies multiple consecutive logon failures targeting an Admin account from the same source address and within a short time interval. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to accounts.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Privileged Account Brute Force\n\nAdversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to guess the password using a repetitive or iterative mechanism systematically. More details can be found [here](https://attack.mitre.org/techniques/T1110/001/).\n\nThis rule identifies potential password guessing/brute force activity from a single address against an account that contains the `admin` pattern on its name, which is likely a highly privileged account.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the logon failure reason code and the targeted user name.\n - Prioritize the investigation if the account is critical or has administrative privileges over the domain.\n- Investigate the source IP address of the failed Network Logon attempts.\n - Identify whether these attempts are coming from the internet or are internal.\n- Investigate other alerts associated with the involved users and source host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Examine the source host for derived artifacts that indicate compromise:\n - Observe and collect information about the following activities in the alert source host:\n - Attempts to contact external domains and addresses.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the host which is the source of this activity.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Domain trust relationship issues.\n- Infrastructure or availability issues.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the source host to prevent further post-compromise behavior.\n- If the asset is exposed to the internet with RDP or other remote services available, take the necessary measures to restrict access to the asset. If not possible, limit the access via the firewall to only the needed IP addresses. Also, ensure the system uses robust authentication mechanisms and is patched regularly.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/", - "subtechnique": [ - { - "id": "T1110.001", - "name": "Password Guessing", - "reference": "https://attack.mitre.org/techniques/T1110/001/" - }, - { - "id": "T1110.003", - "name": "Password Spraying", - "reference": "https://attack.mitre.org/techniques/T1110/003/" - } - ] - } - ] - } - ], - "id": "85560ca9-695c-4e02-9acd-9e312c09d431", - "rule_id": "f9790abf-bd0c-45f9-8b5f-d0b74015e029", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.Status", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.logon.type", - "type": "unknown", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "sequence by winlog.computer_name, source.ip with maxspan=10s\n [authentication where event.action == \"logon-failed\" and winlog.logon.type : \"Network\" and\n source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and user.name : \"*admin*\" and\n\n /* noisy failure status codes often associated to authentication misconfiguration */\n not winlog.event_data.Status : (\"0xC000015B\", \"0XC000005E\", \"0XC0000133\", \"0XC0000192\")] with runs=5\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Suspicious Activity Reported by Okta User", - "description": "Detects when a user reports suspicious activity for their Okta account. These events should be investigated, as they can help security teams identify when an adversary is attempting to gain access to their network.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Use Case: Identity and Access Audit", - "Data Source: Okta", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A user may report suspicious activity on their Okta account in error." - ], - "references": [ - "https://developer.okta.com/docs/reference/api/system-log/", - "https://developer.okta.com/docs/reference/api/event-types/", - "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "e2e80f6d-f5e2-4d1b-bd72-b394ef624dda", - "rule_id": "f994964f-6fce-4d75-8e79-e16ccc412588", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "okta", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-okta*" - ], - "query": "event.dataset:okta.system and event.action:user.account.report_suspicious_activity_by_enduser\n", - "language": "kuery" - }, - { - "name": "Potential External Linux SSH Brute Force Detected", - "description": "Identifies multiple external consecutive login failures targeting a user account from the same source address within a short time interval. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to these accounts.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential External Linux SSH Brute Force Detected\n\nThe rule identifies consecutive SSH login failures targeting a user account from the same source IP address to the same target host indicating brute force login attempts.\n\nThis rule will generate a lot of noise for systems with a front-facing SSH service, as adversaries scan the internet for remotely accessible SSH services and try to brute force them to gain unauthorized access. \n\nIn case this rule generates too much noise and external brute forcing is of not much interest, consider turning this rule off and enabling \"Potential Internal Linux SSH Brute Force Detected\" to detect internal brute force attempts.\n\n#### Possible investigation steps\n\n- Investigate the login failure user name(s).\n- Investigate the source IP address of the failed ssh login attempt(s).\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Infrastructure or availability issue.\n\n### Related Rules\n\n- Potential Internal Linux SSH Brute Force Detected - 1c27fa22-7727-4dd3-81c0-de6da5555feb\n- Potential SSH Password Guessing - 8cb84371-d053-4f4f-bce0-c74990e28f28\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 5, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/", - "subtechnique": [ - { - "id": "T1110.001", - "name": "Password Guessing", - "reference": "https://attack.mitre.org/techniques/T1110/001/" - }, - { - "id": "T1110.003", - "name": "Password Spraying", - "reference": "https://attack.mitre.org/techniques/T1110/003/" - } - ] - } - ] - } - ], - "id": "ff8f6d87-a2aa-4daa-afb3-1764ba4bcc1a", - "rule_id": "fa210b61-b627-4e5e-86f4-17e8270656ab", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, source.ip, user.name with maxspan=15s\n [ authentication where host.os.type == \"linux\" and \n event.action in (\"ssh_login\", \"user_login\") and event.outcome == \"failure\" and\n not cidrmatch(source.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \n \"::1\", \"FE80::/10\", \"FF00::/8\") ] with runs = 10\n", - "language": "eql", - "index": [ - "logs-system.auth-*" - ] - }, - { - "name": "AWS Configuration Recorder Stopped", - "description": "Identifies an AWS configuration change to stop recording a designated set of resources.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: AWS", - "Data Source: Amazon Web Services", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Recording changes from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configservice/stop-configuration-recorder.html", - "https://docs.aws.amazon.com/config/latest/APIReference/API_StopConfigurationRecorder.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "977680e3-2f5b-4107-bc22-5fa6007694d3", - "rule_id": "fbd44836-0d69-4004-a0b4-03c20370c435", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "aws", - "version": "^2.0.0", - "integration": "cloudtrail" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-aws*" - ], - "query": "event.dataset:aws.cloudtrail and event.provider:config.amazonaws.com and event.action:StopConfigurationRecorder and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "UAC Bypass Attempt via Elevated COM Internet Explorer Add-On Installer", - "description": "Identifies User Account Control (UAC) bypass attempts by abusing an elevated COM Interface to launch a malicious program. Attackers may attempt to bypass UAC to stealthily execute code with elevated permissions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://swapcontext.blogspot.com/2020/11/uac-bypasses-from-comautoapprovallist.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.002", - "name": "Bypass User Account Control", - "reference": "https://attack.mitre.org/techniques/T1548/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1559", - "name": "Inter-Process Communication", - "reference": "https://attack.mitre.org/techniques/T1559/", - "subtechnique": [ - { - "id": "T1559.001", - "name": "Component Object Model", - "reference": "https://attack.mitre.org/techniques/T1559/001/" - } - ] - } - ] - } - ], - "id": "643b9eb3-7de0-4a2c-9fd1-b410eb3d281a", - "rule_id": "fc7c0fa4-8f03-4b3e-8336-c5feab0be022", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.executable : \"C:\\\\*\\\\AppData\\\\*\\\\Temp\\\\IDC*.tmp\\\\*.exe\" and\n process.parent.name : \"ieinstal.exe\" and process.parent.args : \"-Embedding\"\n\n /* uncomment once in winlogbeat */\n /* and not (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true) */\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious CertUtil Commands", - "description": "Identifies suspicious commands being used with certutil.exe. CertUtil is a native Windows component which is part of Certificate Services. CertUtil is often abused by attackers to live off the land for stealthier command and control or data exfiltration.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "timeline_id": "e70679c2-6cde-4510-9764-4823df18f7db", - "timeline_title": "Comprehensive Process Timeline", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Suspicious CertUtil Commands\n\n`certutil.exe` is a command line utility program that is included with Microsoft Windows operating systems. It is used to manage and manipulate digital certificates and certificate services on computers running Windows.\n\nAttackers can abuse `certutil.exe` utility to download and/or deobfuscate malware, offensive security tools, and certificates from external sources to take the next steps in a compromised environment. This rule identifies command line arguments used to accomplish these behaviors.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine the command line to determine the nature of the execution.\n - If files were downloaded, retrieve them and check whether they were run, and under which security context.\n - If files were obfuscated or deobfuscated, retrieve them.\n- Examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the involved files using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://twitter.com/Moriarty_Meng/status/984380793383370752", - "https://twitter.com/egre55/status/1087685529016193025", - "https://www.sysadmins.lv/blog-en/certutil-tips-and-tricks-working-with-x509-file-format.aspx", - "https://docs.microsoft.com/en-us/archive/blogs/pki/basic-crl-checking-with-certutil" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1140", - "name": "Deobfuscate/Decode Files or Information", - "reference": "https://attack.mitre.org/techniques/T1140/" - } - ] - } - ], - "id": "6b0159c1-530d-4964-993b-e173896da111", - "rule_id": "fd70c98a-c410-42dc-a2e3-761c71848acf", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"certutil.exe\" or process.pe.original_file_name == \"CertUtil.exe\") and\n process.args : (\"?decode\", \"?encode\", \"?urlcache\", \"?verifyctl\", \"?encodehex\", \"?decodehex\", \"?exportPFX\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Microsoft Windows Defender Tampering", - "description": "Identifies when one or more features on Microsoft Defender are disabled. Adversaries may disable or tamper with Microsoft Defender features to evade detection and conceal malicious behavior.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Microsoft Windows Defender Tampering\n\nMicrosoft Windows Defender is an antivirus product built into Microsoft Windows, which makes it popular across multiple environments. Disabling it is a common step in threat actor playbooks.\n\nThis rule monitors the registry for modifications that disable Windows Defender features.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Examine which features have been disabled, and check if this operation is done under change management and approved according to the organization's policy.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity, the configuration is justified (for example, it is being used to deploy other security solutions or troubleshooting), and no other suspicious activity has been observed.\n\n### Related rules\n\n- Windows Defender Disabled via Registry Modification - 2ffa1f1e-b6db-47fa-994b-1512743847eb\n- Disabling Windows Defender Security Settings via PowerShell - c8cccb06-faf2-4cd5-886e-2c9636cfcb87\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Take actions to restore the appropriate Windows Defender antivirus configurations.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Legitimate Windows Defender configuration changes" - ], - "references": [ - "https://thedfirreport.com/2021/10/18/icedid-to-xinglocker-ransomware-in-24-hours/", - "https://www.tenforums.com/tutorials/32236-enable-disable-microsoft-defender-pua-protection-windows-10-a.html", - "https://www.tenforums.com/tutorials/104025-turn-off-core-isolation-memory-integrity-windows-10-a.html", - "https://www.tenforums.com/tutorials/105533-enable-disable-windows-defender-exploit-protection-settings.html", - "https://www.tenforums.com/tutorials/123792-turn-off-tamper-protection-microsoft-defender-antivirus.html", - "https://www.tenforums.com/tutorials/51514-turn-off-microsoft-defender-periodic-scanning-windows-10-a.html", - "https://www.tenforums.com/tutorials/3569-turn-off-real-time-protection-microsoft-defender-antivirus.html", - "https://www.tenforums.com/tutorials/99576-how-schedule-scan-microsoft-defender-antivirus-windows-10-a.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - }, - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "1324f811-4e0a-40cc-b2f7-0fa96f7f3a8c", - "rule_id": "fe794edd-487f-4a90-b285-3ee54f2af2d3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\PUAProtection\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender Security Center\\\\App and Browser protection\\\\DisallowExploitProtectionOverride\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\DisableAntiSpyware\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Features\\\\TamperProtection\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Real-Time Protection\\\\DisableRealtimeMonitoring\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Real-Time Protection\\\\DisableIntrusionPreventionSystem\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Real-Time Protection\\\\DisableScriptScanning\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Windows Defender Exploit Guard\\\\Controlled Folder Access\\\\EnableControlledFolderAccess\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Real-Time Protection\\\\DisableIOAVProtection\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Reporting\\\\DisableEnhancedNotifications\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\SpyNet\\\\DisableBlockAtFirstSeen\" and\n registry.data.strings : (\"1\", \"0x00000001\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\SpyNet\\\\SpynetReporting\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\SpyNet\\\\SubmitSamplesConsent\" and\n registry.data.strings : (\"0\", \"0x00000000\")) or\n (registry.path : \"HKLM\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows Defender\\\\Real-Time Protection\\\\DisableBehaviorMonitoring\" and\n registry.data.strings : (\"1\", \"0x00000001\"))\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "LSASS Process Access via Windows API", - "description": "Identifies access attempts to the LSASS handle, which may indicate an attempt to dump credentials from LSASS memory.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.001/T1003.001.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - } - ], - "id": "7003a21d-7f5d-4d81-98b1-cc4950d8e8a9", - "rule_id": "ff4599cb-409f-4910-a239-52e4e6f532ff", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "Target.process.name", - "type": "unknown", - "ecs": false - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.api.name", - "type": "unknown", - "ecs": false - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "api where host.os.type == \"windows\" and \n process.Ext.api.name in (\"OpenProcess\", \"OpenThread\") and Target.process.name : \"lsass.exe\" and \n not process.executable : \n (\"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\*\\\\MsMpEng.exe\", \n \"?:\\\\Program Files\\\\Microsoft Security Client\\\\MsMpEng.exe\", \n \"?:\\\\Program Files*\\\\Windows Defender\\\\MsMpEng.exe\", \n \"?:\\\\Program Files (x86)\\\\N-able Technologies\\\\Windows Agent\\\\bin\\\\agent.exe\", \n \"?:\\\\Windows\\\\System32\\\\wbem\\\\WmiPrvSE.exe\", \n \"?:\\\\Windows\\\\SysWOW64\\\\wbem\\\\WmiPrvSE.exe\",\n \"?:\\\\Program Files\\\\VMware\\\\VMware Tools\\\\vmtoolsd.exe\", \n \"?:\\\\Program Files (x86)\\\\N-able Technologies\\\\Reactive\\\\bin\\\\NableReactiveManagement.exe\", \n \"?:\\\\Program Files\\\\EA\\\\AC\\\\EAAntiCheat.GameService.exe\", \n \"?:\\\\Program Files\\\\Cisco\\\\AMP\\\\*\\\\sfc.exe\", \n \"?:\\\\Program Files\\\\TDAgent\\\\ossec-agent\\\\ossec-agent.exe\", \n \"?:\\\\Windows\\\\System32\\\\MRT.exe\", \n \"?:\\\\Program Files\\\\Elastic\\\\Agent\\\\data\\\\elastic-agent-*\\\\components\\\\metricbeat.exe\", \n \"?:\\\\Program Files\\\\Elastic\\\\Agent\\\\data\\\\elastic-agent-*\\\\components\\\\osqueryd.exe\", \n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\", \n \"?:\\\\Program Files\\\\Common Files\\\\McAfee\\\\AVSolution\\\\mcshield.exe\", \n \"?:\\\\Program Files\\\\Fortinet\\\\FortiClient\\\\FortiProxy.exe\", \n \"?:\\\\Program Files\\\\LogicMonitor\\\\Agent\\\\bin\\\\sbshutdown.exe\", \n \"?:\\\\Program Files (x86)\\\\Google\\\\Update\\\\GoogleUpdate.exe\", \n \"?:\\\\Program Files (x86)\\\\Blackpoint\\\\SnapAgent\\\\SnapAgent.exe\", \n \"?:\\\\Program Files\\\\ESET\\\\ESET Security\\\\ekrn.exe\", \n \"?:\\\\Program Files\\\\Huntress\\\\HuntressAgent.exe\", \n \"?:\\\\Program Files (x86)\\\\eScan\\\\reload.exe\", \n \"?:\\\\Program Files\\\\Topaz OFD\\\\Warsaw\\\\core.exe\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Cookies Theft via Browser Debugging", - "description": "Identifies the execution of a Chromium based browser with the debugging process argument, which may indicate an attempt to steal authentication cookies. An adversary may steal web application or service session cookies and use them to gain access web applications or Internet services as an authenticated user without needing credentials.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: Windows", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Developers performing browsers plugin or extension debugging." - ], - "references": [ - "https://github.com/defaultnamehere/cookie_crimes", - "https://embracethered.com/blog/posts/2020/cookie-crimes-on-mirosoft-edge/", - "https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/post/multi/gather/chrome_cookies.md", - "https://posts.specterops.io/hands-in-the-cookie-jar-dumping-cookies-with-chromiums-remote-debugger-port-34c4f468844e" - ], - "max_signals": 33, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1539", - "name": "Steal Web Session Cookie", - "reference": "https://attack.mitre.org/techniques/T1539/" - } - ] - } - ], - "id": "40c28e39-43d1-444c-9ae1-0128c21bd303", - "rule_id": "027ff9ea-85e7-42e3-99d2-bbb7069e02eb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where event.type in (\"start\", \"process_started\", \"info\") and\n process.name in (\n \"Microsoft Edge\",\n \"chrome.exe\",\n \"Google Chrome\",\n \"google-chrome-stable\",\n \"google-chrome-beta\",\n \"google-chrome\",\n \"msedge.exe\") and\n process.args : (\"--remote-debugging-port=*\",\n \"--remote-debugging-targets=*\",\n \"--remote-debugging-pipe=*\") and\n process.args : \"--user-data-dir=*\" and not process.args:\"--remote-debugging-port=0\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Process Created with an Elevated Token", - "description": "Identifies the creation of a process running as SYSTEM and impersonating a Windows core binary privileges. Adversaries may create a new process with a different token to escalate privileges and bypass access controls.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://lengjibo.github.io/token/", - "https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createprocesswithtokenw" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/", - "subtechnique": [ - { - "id": "T1134.002", - "name": "Create Process with Token", - "reference": "https://attack.mitre.org/techniques/T1134/002/" - } - ] - } - ] - } - ], - "id": "2109ef41-fc81-4f61-906b-9e789e808a77", - "rule_id": "02a23ee7-c8f8-4701-b99d-e9038ce313cb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.effective_parent.executable", - "type": "unknown", - "ecs": false - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "/* This rule is only compatible with Elastic Endpoint 8.4+ */\n\nprocess where host.os.type == \"windows\" and event.action == \"start\" and\n\n /* CreateProcessWithToken and effective parent is a privileged MS native binary used as a target for token theft */\n user.id : \"S-1-5-18\" and\n\n /* Token Theft target process usually running as service are located in one of the following paths */\n process.Ext.effective_parent.executable :\n (\"?:\\\\Windows\\\\*.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\ProgramData\\\\*\") and\n\n/* Ignores Utility Manager in Windows running in debug mode */\n not (process.Ext.effective_parent.executable : \"?:\\\\Windows\\\\System32\\\\Utilman.exe\" and\n process.parent.executable : \"?:\\\\Windows\\\\System32\\\\Utilman.exe\" and process.parent.args : \"/debug\") and\n\n/* Ignores Windows print spooler service with correlation to Access Intelligent Form */\nnot (process.parent.executable : \"?\\\\Windows\\\\System32\\\\spoolsv.exe\" and\n process.executable: \"?:\\\\Program Files*\\\\Access\\\\Intelligent Form\\\\*\\\\LaunchCreate.exe\") and \n\n/* Ignores Windows error reporting executables */\n not process.executable : (\"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFaultSecure.exe\",\n \"?:\\\\windows\\\\system32\\\\WerMgr.exe\",\n \"?:\\\\Windows\\\\SoftwareDistribution\\\\Download\\\\Install\\\\securityhealthsetup.exe\") and\n\n /* Ignores Windows updates from TiWorker.exe that runs with elevated privileges */\n not (process.parent.executable : \"?:\\\\Windows\\\\WinSxS\\\\*\\\\TiWorker.exe\" and\n process.executable : (\"?:\\\\Windows\\\\Microsoft.NET\\\\Framework*.exe\",\n \"?:\\\\Windows\\\\WinSxS\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\iissetup.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\inetsrv\\\\iissetup.exe\",\n \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\aspnetca.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\inetsrv\\\\aspnetca.exe\",\n \"?:\\\\Windows\\\\System32\\\\lodctr.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\lodctr.exe\",\n \"?:\\\\Windows\\\\System32\\\\netcfg.exe\",\n \"?:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\*\\\\ngen.exe\",\n \"?:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\*\\\\aspnet_regiis.exe\")) and\n\n\n/* Ignores additional parent executables that run with elevated privileges */\n not process.parent.executable : \n (\"?:\\\\Windows\\\\System32\\\\AtBroker.exe\", \n \"?:\\\\Windows\\\\system32\\\\svchost.exe\", \n \"?:\\\\Program Files (x86)\\\\*.exe\", \n \"?:\\\\Program Files\\\\*.exe\", \n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\DriverStore\\\\*\") and\n\n/* Ignores Windows binaries with a trusted signature and specific signature name */\n not (process.code_signature.trusted == true and\n process.code_signature.subject_name : \n (\"philandro Software GmbH\", \n \"Freedom Scientific Inc.\", \n \"TeamViewer Germany GmbH\", \n \"Projector.is, Inc.\", \n \"TeamViewer GmbH\", \n \"Cisco WebEx LLC\", \n \"Dell Inc\"))\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Dumping Account Hashes via Built-In Commands", - "description": "Identifies the execution of macOS built-in commands used to dump user account hashes. Adversaries may attempt to dump credentials to obtain account login information in the form of a hash. These hashes can be cracked or leveraged for lateral movement.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://apple.stackexchange.com/questions/186893/os-x-10-9-where-are-password-hashes-stored", - "https://www.unix.com/man-page/osx/8/mkpassdb/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - } - ] - } - ], - "id": "181493c6-b70a-4968-a73f-514fd9a4f4ba", - "rule_id": "02ea4563-ec10-4974-b7de-12e65aa4f9b3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:start and\n process.name:(defaults or mkpassdb) and process.args:(ShadowHashData or \"-dump\")\n", - "language": "kuery" - }, - { - "name": "High Number of Process and/or Service Terminations", - "description": "This rule identifies a high number (10) of process terminations (stop, delete, or suspend) from the same host within a short time period.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating High Number of Process and/or Service Terminations\n\nAttackers can stop services and kill processes for a variety of purposes. For example, they can stop services associated with business applications and databases to release the lock on files used by these applications so they may be encrypted, or stop security and backup solutions, etc.\n\nThis rule identifies a high number (10) of service and/or process terminations (stop, delete, or suspend) from the same host within a short time period.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check if any files on the host machine have been encrypted.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further destructive behavior, which is commonly associated with this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system or restore it to the operational state.\n- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Impact", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/security-labs/luna-ransomware-attack-pattern" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1489", - "name": "Service Stop", - "reference": "https://attack.mitre.org/techniques/T1489/" - } - ] - } - ], - "id": "9ad86ea0-669c-4f1b-b95b-ba32bf917857", - "rule_id": "035889c4-2686-4583-a7df-67f89c292f2c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "event.category:process and host.os.type:windows and event.type:start and process.name:(net.exe or sc.exe or taskkill.exe) and\n process.args:(stop or pause or delete or \"/PID\" or \"/IM\" or \"/T\" or \"/F\" or \"/t\" or \"/f\" or \"/im\" or \"/pid\") and\n not process.parent.name:osquerybeat.exe\n", - "threshold": { - "field": [ - "host.id" - ], - "value": 10 - }, - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Microsoft IIS Service Account Password Dumped", - "description": "Identifies the Internet Information Services (IIS) command-line tool, AppCmd, being used to list passwords. An attacker with IIS web server access via a web shell can decrypt and dump the IIS AppPool service account password using AppCmd.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.netspi.com/decrypting-iis-passwords-to-break-out-of-the-dmz-part-1/" - ], - "max_signals": 33, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - } - ] - } - ], - "id": "559ef12b-6271-451a-8b0e-301123078b31", - "rule_id": "0564fb9d-90b9-4234-a411-82a546dc1343", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"appcmd.exe\" or process.pe.original_file_name == \"appcmd.exe\") and\n process.args : \"/list\" and process.args : \"/text*password\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Remote Desktop Enabled in Windows Firewall by Netsh", - "description": "Identifies use of the network shell utility (netsh.exe) to enable inbound Remote Desktop Protocol (RDP) connections in the Windows Firewall.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remote Desktop Enabled in Windows Firewall by Netsh\n\nMicrosoft Remote Desktop Protocol (RDP) is a proprietary Microsoft protocol that enables remote connections to other computers, typically over TCP port 3389.\n\nAttackers can use RDP to conduct their actions interactively. Ransomware operators frequently use RDP to access victim servers, often using privileged accounts.\n\nThis rule detects the creation of a Windows Firewall inbound rule that would allow inbound RDP traffic using the `netsh.exe` utility.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the user to check if they are aware of the operation.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Check whether it makes sense to enable RDP to this host, given its role in the environment.\n- Check if the host is directly exposed to the internet.\n- Check whether privileged accounts accessed the host shortly after the modification.\n- Review network events within a short timespan of this alert for incoming RDP connection attempts.\n\n### False positive analysis\n\n- The `netsh.exe` utility can be used legitimately. Check whether the user should be performing this kind of activity, whether the user is aware of it, whether RDP should be open, and whether the action exposes the environment to unnecessary risks.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If RDP is needed, make sure to secure it:\n - Allowlist RDP traffic to specific trusted hosts.\n - Restrict RDP logins to authorized non-administrator accounts, where possible.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.004", - "name": "Disable or Modify System Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/004/" - } - ] - } - ] - } - ], - "id": "4292aa88-889d-40b1-a097-0092628207d5", - "rule_id": "074464f9-f30d-4029-8c03-0ed237fffec7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"netsh.exe\" or process.pe.original_file_name == \"netsh.exe\") and\n process.args : (\"localport=3389\", \"RemoteDesktop\", \"group=\\\"remote desktop\\\"\") and\n process.args : (\"action=allow\", \"enable=Yes\", \"enable\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Google Drive Ownership Transferred via Google Workspace", - "description": "Drive and Docs is a Google Workspace service that allows users to leverage Google Drive and Google Docs. Access to files is based on inherited permissions from the child organizational unit the user belongs to which is scoped by administrators. Typically if a user is removed, their files can be transferred to another user by the administrator. This service can also be abused by adversaries to transfer files to an adversary account for potential exfiltration.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Drive Ownership Transferred via Google Workspace\n\nGoogle Drive is a cloud storage service that allows users to store and access files. It is available to users with a Google Workspace account.\n\nGoogle Workspace administrators consider users' roles and organizational units when assigning permissions to files or shared drives. Owners of sensitive files and folders can grant permissions to users who make internal or external access requests. Adversaries abuse this trust system by accessing Google Drive resources with improperly scoped permissions and shared settings. Distributing phishing emails is another common approach to sharing malicious Google Drive documents. With this approach, adversaries aim to inherit the recipient's Google Workspace privileges when an external entity grants ownership.\n\nThis rule identifies when the ownership of a shared drive within a Google Workspace organization is transferred to another internal user.\n\n#### Possible investigation steps\n\n- From the admin console, review admin logs for involved user accounts. To find admin logs, go to `Security > Reporting > Audit and investigation > Admin log events`.\n- Determine if involved user accounts are active. To view user activity, go to `Directory > Users`.\n- Check if the involved user accounts were recently disabled, then re-enabled.\n- Review involved user accounts for potentially misconfigured permissions or roles.\n- Review the involved shared drive or files and related policies to determine if this action was expected and appropriate.\n- If a shared drive, access requirements based on Organizational Units in `Apps > Google Workspace > Drive and Docs > Manage shared drives`.\n- Triage potentially related alerts based on the users involved. To find alerts, go to `Security > Alerts`.\n\n### False positive analysis\n\n- Transferring drives requires Google Workspace administration permissions related to Google Drive. Check if this action was planned/expected from the requester and is appropriately targeting the correct receiver.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 106, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Tactic: Collection", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Administrators may transfer file ownership during employee leave or absence to ensure continued operations by a new or existing employee." - ], - "references": [ - "https://support.google.com/a/answer/1247799?hl=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1074", - "name": "Data Staged", - "reference": "https://attack.mitre.org/techniques/T1074/", - "subtechnique": [ - { - "id": "T1074.002", - "name": "Remote Data Staging", - "reference": "https://attack.mitre.org/techniques/T1074/002/" - } - ] - } - ] - } - ], - "id": "fa7680c8-84c0-493a-9259-c64759a9fa46", - "rule_id": "07b5f85a-240f-11ed-b3d9-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.admin.application.name", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:\"google_workspace.admin\" and event.action:\"CREATE_DATA_TRANSFER_REQUEST\"\n and event.category:\"iam\" and google_workspace.admin.application.name:Drive*\n", - "language": "kuery" - }, - { - "name": "Suspicious Browser Child Process", - "description": "Identifies the execution of a suspicious browser child process. Adversaries may gain access to a system through a user visiting a website over the normal course of browsing. With this technique, the user's web browser is typically targeted for exploitation.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://objective-see.com/blog/blog_0x43.html", - "https://fr.slideshare.net/codeblue_jp/cb19-recent-apt-attack-on-crypto-exchange-employees-by-heungsoo-kang" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1203", - "name": "Exploitation for Client Execution", - "reference": "https://attack.mitre.org/techniques/T1203/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1189", - "name": "Drive-by Compromise", - "reference": "https://attack.mitre.org/techniques/T1189/" - } - ] - } - ], - "id": "6437898e-9e1b-4e4e-8613-97dccbc43f54", - "rule_id": "080bc66a-5d56-4d1f-8071-817671716db9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.parent.name : (\"Google Chrome\", \"Google Chrome Helper*\", \"firefox\", \"Opera\", \"Safari\", \"com.apple.WebKit.WebContent\", \"Microsoft Edge\") and\n process.name : (\"sh\", \"bash\", \"dash\", \"ksh\", \"tcsh\", \"zsh\", \"curl\", \"wget\", \"python*\", \"perl*\", \"php*\", \"osascript\", \"pwsh\") and\n process.command_line != null and\n not process.command_line : \"*/Library/Application Support/Microsoft/MAU*/Microsoft AutoUpdate.app/Contents/MacOS/msupdate*\" and\n not process.args :\n (\n \"hw.model\",\n \"IOPlatformExpertDevice\",\n \"/Volumes/Google Chrome/Google Chrome.app/Contents/Frameworks/*/Resources/install.sh\",\n \"--defaults-torrc\",\n \"*Chrome.app\",\n \"Framework.framework/Versions/*/Resources/keystone_promote_preflight.sh\",\n \"/Users/*/Library/Application Support/Google/Chrome/recovery/*/ChromeRecovery\",\n \"$DISPLAY\",\n \"*GIO_LAUNCHED_DESKTOP_FILE_PID=$$*\",\n \"/opt/homebrew/*\",\n \"/usr/local/*brew*\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Launch Agent Creation or Modification and Immediate Loading", - "description": "An adversary can establish persistence by installing a new launch agent that executes at login by using launchd or launchctl to load a plist into the appropriate directories.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trusted applications persisting via LaunchAgent" - ], - "references": [ - "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.001", - "name": "Launch Agent", - "reference": "https://attack.mitre.org/techniques/T1543/001/" - } - ] - } - ] - } - ], - "id": "48e033fe-a75f-49a1-b206-ae6f5cbbf76a", - "rule_id": "082e3f8c-6f80-485c-91eb-5b112cb79b28", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=1m\n [file where host.os.type == \"macos\" and event.type != \"deletion\" and\n file.path : (\"/System/Library/LaunchAgents/*\", \"/Library/LaunchAgents/*\", \"/Users/*/Library/LaunchAgents/*\")\n ]\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name == \"launchctl\" and process.args == \"load\"]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Hidden Child Process of Launchd", - "description": "Identifies the execution of a launchd child process with a hidden file. An adversary can establish persistence by installing a new logon item, launch agent, or daemon that executes upon login.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://objective-see.com/blog/blog_0x61.html", - "https://www.intezer.com/blog/research/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/", - "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.001", - "name": "Launch Agent", - "reference": "https://attack.mitre.org/techniques/T1543/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1564", - "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/", - "subtechnique": [ - { - "id": "T1564.001", - "name": "Hidden Files and Directories", - "reference": "https://attack.mitre.org/techniques/T1564/001/" - } - ] - } - ] - } - ], - "id": "73dd6825-eab9-4f5a-89ca-5e31b300d58d", - "rule_id": "083fa162-e790-4d85-9aeb-4fea04188adb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:.* and process.parent.executable:/sbin/launchd\n", - "language": "kuery" - }, - { - "name": "Windows Account or Group Discovery", - "description": "This rule identifies the execution of commands that enumerates account or group information. Adversaries may use built-in applications to get a listing of local system or domain accounts and groups.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1069", - "name": "Permission Groups Discovery", - "reference": "https://attack.mitre.org/techniques/T1069/", - "subtechnique": [ - { - "id": "T1069.001", - "name": "Local Groups", - "reference": "https://attack.mitre.org/techniques/T1069/001/" - }, - { - "id": "T1069.002", - "name": "Domain Groups", - "reference": "https://attack.mitre.org/techniques/T1069/002/" - } - ] - }, - { - "id": "T1201", - "name": "Password Policy Discovery", - "reference": "https://attack.mitre.org/techniques/T1201/" - }, - { - "id": "T1087", - "name": "Account Discovery", - "reference": "https://attack.mitre.org/techniques/T1087/", - "subtechnique": [ - { - "id": "T1087.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1087/001/" - }, - { - "id": "T1087.002", - "name": "Domain Account", - "reference": "https://attack.mitre.org/techniques/T1087/002/" - } - ] - } - ] - } - ], - "id": "dd4c0f64-0da7-4951-98df-4367f98ca15d", - "rule_id": "089db1af-740d-4d84-9a5b-babd6de143b0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (\n (\n (process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or\n (\n (process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and\n not process.parent.name : \"net.exe\"\n )\n ) and process.args : (\"accounts\", \"group\", \"user\", \"localgroup\") and not process.args : \"/add\"\n ) or\n (process.name:(\"dsquery.exe\", \"dsget.exe\") and process.args:(\"*members*\", \"user\")) or\n (process.name:\"dsquery.exe\" and process.args:\"*filter*\") or\n process.name:(\"quser.exe\", \"qwinsta.exe\", \"PsGetSID.exe\", \"PsLoggedOn.exe\", \"LogonSessions.exe\", \"whoami.exe\") or\n (\n process.name: \"cmd.exe\" and\n (\n process.args : \"echo\" and process.args : (\n \"%username%\", \"%userdomain%\", \"%userdnsdomain%\",\n \"%userdomain_roamingprofile%\", \"%userprofile%\",\n \"%homepath%\", \"%localappdata%\", \"%appdata%\"\n ) or\n process.args : \"set\"\n )\n )\n) and not process.parent.args: \"C:\\\\Program Files (x86)\\\\Microsoft Intune Management Extension\\\\Content\\\\DetectionScripts\\\\*.ps1\"\nand not process.parent.name : \"LTSVC.exe\" and not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Creation of Hidden Launch Agent or Daemon", - "description": "Identifies the creation of a hidden launch agent or daemon. An adversary may establish persistence by installing a new launch agent or daemon which executes at login.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.001", - "name": "Launch Agent", - "reference": "https://attack.mitre.org/techniques/T1543/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1564", - "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/", - "subtechnique": [ - { - "id": "T1564.001", - "name": "Hidden Files and Directories", - "reference": "https://attack.mitre.org/techniques/T1564/001/" - } - ] - } - ] - } - ], - "id": "c2800e86-8d46-4305-94da-025fe3e3662e", - "rule_id": "092b068f-84ac-485d-8a55-7dd9e006715f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"macos\" and event.type != \"deletion\" and\n file.path :\n (\n \"/System/Library/LaunchAgents/.*.plist\",\n \"/Library/LaunchAgents/.*.plist\",\n \"/Users/*/Library/LaunchAgents/.*.plist\",\n \"/System/Library/LaunchDaemons/.*.plist\",\n \"/Library/LaunchDaemons/.*.plist\"\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "PowerShell Script with Remote Execution Capabilities via WinRM", - "description": "Identifies the use of Cmdlets and methods related to remote execution activities using WinRM. Attackers can abuse WinRM to perform lateral movement using built-in tools.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "building_block_type": "default", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Execution", - "Data Source: PowerShell Logs", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://attack.mitre.org/techniques/T1021/006/", - "https://github.com/cobbr/SharpSploit/blob/master/SharpSploit/LateralMovement/PowerShellRemoting.cs", - "https://github.com/BC-SECURITY/Empire/blob/main/empire/server/modules/powershell/lateral_movement/invoke_psremoting.py" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.006", - "name": "Windows Remote Management", - "reference": "https://attack.mitre.org/techniques/T1021/006/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "aa23a745-ea56-4d22-9ae7-6e8a713da2f2", - "rule_id": "0abf0c5b-62dd-48d2-ac4e-6b43fe3a6e83", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.directory", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n (\"Invoke-WmiMethod\" or \"Invoke-Command\" or \"Enter-PSSession\") and \"ComputerName\"\n ) and\n not user.id : \"S-1-5-18\" and\n not file.directory : (\n \"C:\\\\Program Files\\\\LogicMonitor\\\\Agent\\\\tmp\" or\n ?\\:\\\\\\\\Program?Files\\\\\\\\Microsoft\\\\\\\\Exchange?Server\\\\\\\\*\\\\\\\\bin or\n ?\\:\\\\\\\\Logicmonitor\\\\\\\\tmp* or\n ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules\\\\\\\\dbatools\\\\\\\\* or\n ?\\:\\\\\\\\ExchangeServer\\\\\\\\bin*\n )\n", - "language": "kuery" - }, - { - "name": "User account exposed to Kerberoasting", - "description": "Detects when a user account has the servicePrincipalName attribute modified. Attackers can abuse write privileges over a user to configure Service Principle Names (SPNs) so that they can perform Kerberoasting. Administrators can also configure this for legitimate purposes, exposing the account to Kerberoasting.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating User account exposed to Kerberoasting\n\nService Principal Names (SPNs) are names by which Kerberos clients uniquely identify service instances for Kerberos target computers.\n\nBy default, only computer accounts have SPNs, which creates no significant risk, since machine accounts have a default domain policy that rotates their passwords every 30 days, and the password is composed of 120 random characters, making them invulnerable to Kerberoasting.\n\nA user account with an SPN assigned is considered a service account, and is accessible to the entire domain. If any user in the directory requests a ticket-granting service (TGS), the domain controller will encrypt it with the secret key of the account executing the service. An attacker can potentially perform a Kerberoasting attack with this information, as the human-defined password is likely to be less complex.\n\nFor scenarios where SPNs cannot be avoided on user accounts, Microsoft provides the Group Managed Service Accounts (gMSA) feature, which ensures that account passwords are robust and changed regularly and automatically. More information can be found [here](https://docs.microsoft.com/en-us/windows-server/security/group-managed-service-accounts/group-managed-service-accounts-overview).\n\nAttackers can also perform \"Targeted Kerberoasting\", which consists of adding fake SPNs to user accounts that they have write privileges to, making them potentially vulnerable to Kerberoasting.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate if the target account is a member of privileged groups (Domain Admins, Enterprise Admins, etc.).\n- Investigate if tickets have been requested for the target account.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- The use of user accounts as service accounts is a bad security practice and should not be allowed in the domain. The security team should map and monitor any potential benign true positive (B-TP), especially if the account is privileged. Domain Administrators that define this kind of setting can put the domain at risk as user accounts don't have the same security standards as computer accounts (which have long, complex, random passwords that change frequently), exposing them to credential cracking attacks (Kerberoasting, brute force, etc.).\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services. Prioritize privileged accounts.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Active Directory", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.thehacker.recipes/ad/movement/access-controls/targeted-kerberoasting", - "https://www.qomplx.com/qomplx-knowledge-kerberoasting-attacks-explained/", - "https://www.thehacker.recipes/ad/movement/kerberos/kerberoast", - "https://attack.stealthbits.com/cracking-kerberos-tgs-tickets-using-kerberoasting", - "https://adsecurity.org/?p=280", - "https://github.com/OTRF/Set-AuditRule" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/", - "subtechnique": [ - { - "id": "T1558.003", - "name": "Kerberoasting", - "reference": "https://attack.mitre.org/techniques/T1558/003/" - } - ] - } - ] - } - ], - "id": "4cc5724e-8b3d-4dc0-837e-ef149d333621", - "rule_id": "0b2f3da5-b5ec-47d1-908b-6ebb74814289", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.AttributeLDAPDisplayName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.ObjectClass", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'Audit Directory Service Changes' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```\n\nThe above policy does not cover User objects, so set up an AuditRule using https://github.com/OTRF/Set-AuditRule.\nAs this specifies the servicePrincipalName Attribute GUID, it is expected to be low noise.\n\n```\nSet-AuditRule -AdObjectPath 'AD:\\CN=Users,DC=Domain,DC=com' -WellKnownSidType WorldSid -Rights WriteProperty -InheritanceFlags Children -AttributeGUID f3a64788-5306-11d1-a9c5-0000f80367c1 -AuditFlags Success\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.action:\"Directory Service Changes\" and event.code:5136 and\n winlog.event_data.ObjectClass:\"user\" and\n winlog.event_data.AttributeLDAPDisplayName:\"servicePrincipalName\"\n", - "language": "kuery" - }, - { - "name": "Potential Shell via Wildcard Injection Detected", - "description": "This rule monitors for the execution of a set of linux binaries, that are potentially vulnerable to wildcard injection, with suspicious command line flags followed by a shell spawn event. Linux wildcard injection is a type of security vulnerability where attackers manipulate commands or input containing wildcards (e.g., *, ?, []) to execute unintended operations or access sensitive data by tricking the system into interpreting the wildcard characters in unexpected ways.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.exploit-db.com/papers/33930" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "53a12a4c-8215-40e7-8a31-e3097db55d90", - "rule_id": "0b803267-74c5-444d-ae29-32b5db2d562a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and (\n (process.name == \"tar\" and process.args : \"--checkpoint=*\" and process.args : \"--checkpoint-action=*\") or\n (process.name == \"rsync\" and process.args : \"-e*\") or\n (process.name == \"zip\" and process.args == \"--unzip-command\") )] by process.entity_id\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.parent.name : (\"tar\", \"rsync\", \"zip\") and \n process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")] by process.parent.entity_id\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Threat Intel IP Address Indicator Match", - "description": "This rule is triggered when an IP address indicator from the Threat Intel Filebeat module or integrations has a match against a network event.", - "risk_score": 99, - "severity": "critical", - "timeline_id": "495ad7a7-316e-4544-8a0f-9c098daee76e", - "timeline_title": "Generic Threat Match Timeline", - "license": "Elastic License v2", - "note": "## Triage and Analysis\n\n### Investigating Threat Intel IP Address Indicator Match\n\nThreat Intel indicator match rules allow matching from a local observation, such as an endpoint event that records a file hash with an entry of a file hash stored within the Threat Intel integrations index. \n\nMatches are based on threat intelligence data that's been ingested during the last 30 days. Some integrations don't place expiration dates on their threat indicators, so we strongly recommend validating ingested threat indicators and reviewing match results. When reviewing match results, check associated activity to determine whether the event requires additional investigation.\n\nThis rule is triggered when an IP address indicator from the Threat Intel Filebeat module or a threat intelligence integration matches against a network event.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Gain context about the field that matched the local observation so you can understand the nature of the connection. This information can be found in the `threat.indicator.matched.field` field.\n- Investigate the IP address, which can be found in the `threat.indicator.matched.atomic` field:\n - Check the reputation of the IP address in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc. \n - Execute a reverse DNS lookup to retrieve hostnames associated with the given IP address.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Identify the process responsible for the connection, and investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Retrieve the involved process executable and examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Using the data collected through the analysis, scope users targeted and other machines infected in the environment.\n\n### False Positive Analysis\n\n- When a match is found, it's important to consider the indicator's initial release date. Threat intelligence is useful for augmenting existing security processes but can quickly become outdated. In other words, some threat intelligence only represents a specific set of activity observed at a specific time. For example, an IP address may have hosted malware observed in a Dridex campaign months ago, but it's possible that IP has been remediated and no longer represents any threat.\n- False positives might occur after large and publicly written campaigns if curious employees interact with attacker infrastructure.\n- Some feeds may include internal or known benign addresses by mistake (e.g., 8.8.8.8, google.com, 127.0.0.1, etc.). Make sure you understand how blocking a specific domain or address might impact the organization or normal system functioning.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nThis rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an [Elastic Agent integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#agent-ti-integration), the [Threat Intel module](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#ti-mod-integration), or a [custom integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#custom-ti-integration).\n\nMore information can be found [here](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html).", - "version": 3, - "tags": [ - "OS: Windows", - "Data Source: Elastic Endgame", - "Rule Type: Indicator Match" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "1h", - "from": "now-65m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-threatintel.html", - "https://www.elastic.co/guide/en/security/master/es-threat-intel-integrations.html", - "https://www.elastic.co/security/tip" - ], - "max_signals": 100, - "threat": [], - "id": "5701d17f-50ae-4f73-80a7-b6b252ae6b15", - "rule_id": "0c41e478-5263-4c69-8f9e-7dfd2c22da64", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "This rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an Elastic Agent integration, the Threat Intel module, or a custom integration.\n\nMore information can be found here.", - "type": "threat_match", - "query": "source.ip:* or destination.ip:*\n", - "threat_query": "@timestamp >= \"now-30d/d\" and event.module:(threatintel or ti_*) and threat.indicator.ip:* and not labels.is_ioc_transform_source:\"true\"", - "threat_mapping": [ - { - "entries": [ - { - "field": "source.ip", - "type": "mapping", - "value": "threat.indicator.ip" - } - ] - }, - { - "entries": [ - { - "field": "destination.ip", - "type": "mapping", - "value": "threat.indicator.ip" - } - ] - } - ], - "threat_index": [ - "filebeat-*", - "logs-ti_*" - ], - "index": [ - "auditbeat-*", - "endgame-*", - "filebeat-*", - "logs-*", - "packetbeat-*", - "winlogbeat-*" - ], - "threat_filters": [ - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.category", - "negate": false, - "params": { - "query": "threat" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.category": "threat" - } - } - }, - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.kind", - "negate": false, - "params": { - "query": "enrichment" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.kind": "enrichment" - } - } - }, - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.type", - "negate": false, - "params": { - "query": "indicator" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.type": "indicator" - } - } - } - ], - "threat_indicator_path": "threat.indicator", - "threat_language": "kuery", - "language": "kuery" - }, - { - "name": "Peripheral Device Discovery", - "description": "Identifies use of the Windows file system utility (fsutil.exe) to gather information about attached peripheral devices and components connected to a computer system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Peripheral Device Discovery\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `fsutil` utility with the `fsinfo` subcommand to enumerate drives attached to the computer, which can be used to identify secondary drives used for backups, mapped network drives, and removable media. These devices can contain valuable information for attackers.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n- Determine whether this activity was followed by suspicious file access/copy operations or uploads to file storage services.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1120", - "name": "Peripheral Device Discovery", - "reference": "https://attack.mitre.org/techniques/T1120/" - } - ] - } - ], - "id": "91c1c234-6e36-4f09-928d-32b72d5ab88f", - "rule_id": "0c7ca5c2-728d-4ad9-b1c5-bbba83ecb1f4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"fsutil.exe\" or process.pe.original_file_name == \"fsutil.exe\") and\n process.args : \"fsinfo\" and process.args : \"drives\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Privilege Escalation via Root Crontab File Modification", - "description": "Identifies modifications to the root crontab file. Adversaries may overwrite this file to gain code execution with root privileges by exploiting privileged file write or move related vulnerabilities.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://phoenhex.re/2017-06-09/pwn2own-diskarbitrationd-privesc", - "https://www.exploit-db.com/exploits/42146" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.003", - "name": "Cron", - "reference": "https://attack.mitre.org/techniques/T1053/003/" - } - ] - } - ] - } - ], - "id": "f8b07bbb-39f0-4a0e-a396-1e904af8513c", - "rule_id": "0ff84c42-873d-41a2-a4ed-08d74d352d01", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:file and host.os.type:macos and not event.type:deletion and\n file.path:/private/var/at/tabs/root and not process.executable:/usr/bin/crontab\n", - "language": "kuery" - }, - { - "name": "WebProxy Settings Modification", - "description": "Identifies the use of the built-in networksetup command to configure webproxy settings. This may indicate an attempt to hijack web browser traffic for credential access via traffic sniffing or redirection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate WebProxy Settings Modification" - ], - "references": [ - "https://unit42.paloaltonetworks.com/mac-malware-steals-cryptocurrency-exchanges-cookies/", - "https://objectivebythesea.com/v2/talks/OBTS_v2_Zohar.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1539", - "name": "Steal Web Session Cookie", - "reference": "https://attack.mitre.org/techniques/T1539/" - } - ] - } - ], - "id": "a0056230-cb94-4cd3-a7a1-8122874674f5", - "rule_id": "10a500bb-a28f-418e-ba29-ca4c8d1a9f2f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:start and\n process.name : networksetup and process.args : ((\"-setwebproxy\" or \"-setsecurewebproxy\" or \"-setautoproxyurl\") and not (Bluetooth or off)) and\n not process.parent.executable : (\"/Library/PrivilegedHelperTools/com.80pct.FreedomHelper\" or\n \"/Applications/Fiddler Everywhere.app/Contents/Resources/app/out/WebServer/Fiddler.WebUi\" or\n \"/usr/libexec/xpcproxy\")\n", - "language": "kuery" - }, - { - "name": "Abnormally Large DNS Response", - "description": "Specially crafted DNS requests can manipulate a known overflow vulnerability in some Windows DNS servers, resulting in Remote Code Execution (RCE) or a Denial of Service (DoS) from crashing the service.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Abnormally Large DNS Response\n\nDetection alerts from this rule indicate possible anomalous activity around large byte DNS responses from a Windows DNS server. This detection rule was created based on activity represented in exploitation of vulnerability (CVE-2020-1350) also known as [SigRed](https://www.elastic.co/blog/detection-rules-for-sigred-vulnerability) during July 2020.\n\n#### Possible investigation steps\n\n- This specific rule is sourced from network log activity such as DNS or network level data. It's important to validate the source of the incoming traffic and determine if this activity has been observed previously within an environment.\n- Activity can be further investigated and validated by reviewing any associated Intrusion Detection Signatures (IDS) alerts.\n- Further examination can include a review of the `dns.question_type` network fieldset with a protocol analyzer, such as Zeek, Packetbeat, or Suricata, for `SIG` or `RRSIG` data.\n- Validate the patch level and OS of the targeted DNS server to validate the observed activity was not large-scale internet vulnerability scanning.\n- Validate that the source of the network activity was not from an authorized vulnerability scan or compromise assessment.\n\n#### False positive analysis\n\n- Based on this rule, which looks for a threshold of 60k bytes, it is possible for activity to be generated under 65k bytes and related to legitimate behavior. In packet capture files received by the [SANS Internet Storm Center](https://isc.sans.edu/forums/diary/PATCH+NOW+SIGRed+CVE20201350+Microsoft+DNS+Server+Vulnerability/26356/), byte responses were all observed as greater than 65k bytes.\n- This activity can be triggered by compliance/vulnerability scanning or compromise assessment; it's important to determine the source of the activity and potentially allowlist the source host.\n\n### Related rules\n\n- Unusual Child Process of dns.exe - 8c37dc0e-e3ac-4c97-8aa0-cf6a9122de45\n- Unusual File Modification by dns.exe - c7ce36c0-32ff-4f9a-bfc2-dcb242bf99f9\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Ensure that you have deployed the latest Microsoft [Security Update](https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-1350) (Monthly Rollup or Security Only) and restarted the patched machines. If unable to patch immediately, Microsoft [released](https://support.microsoft.com/en-us/help/4569509/windows-dns-server-remote-code-execution-vulnerability) a registry-based workaround that doesn’t require a restart. This can be used as a temporary solution before the patch is applied.\n- Maintain backups of your critical systems to aid in quick recovery.\n- Perform routine vulnerability scans of your systems, monitor [CISA advisories](https://us-cert.cisa.gov/ncas/current-activity) and patch identified vulnerabilities.\n- If you observe a true positive, implement a remediation plan and monitor host-based artifacts for additional post-exploitation behavior.\n", - "version": 105, - "tags": [ - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Resources: Investigation Guide", - "Use Case: Vulnerability" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Environments that leverage DNS responses over 60k bytes will result in false positives - if this traffic is predictable and expected, it should be filtered out. Additionally, this detection rule could be triggered by an authorized vulnerability scan or compromise assessment." - ], - "references": [ - "https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/", - "https://msrc-blog.microsoft.com/2020/07/14/july-2020-security-update-cve-2020-1350-vulnerability-in-windows-domain-name-system-dns-server/", - "https://github.com/maxpl0it/CVE-2020-1350-DoS", - "https://www.elastic.co/security-labs/detection-rules-for-sigred-vulnerability" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "5b90adbf-5b4d-4340-bca0-e9ca66156cdd", - "rule_id": "11013227-0301-4a8c-b150-4db924484475", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.bytes", - "type": "long", - "ecs": true - }, - { - "name": "type", - "type": "keyword", - "ecs": false - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.dns or (event.category: (network or network_traffic) and destination.port: 53)) and\n (event.dataset:zeek.dns or type:dns or event.type:connection) and network.bytes > 60000\n", - "language": "kuery" - }, - { - "name": "Persistence via Scheduled Job Creation", - "description": "A job can be used to schedule programs or scripts to be executed at a specified date and time. Adversaries may abuse task scheduling functionality to facilitate initial or recurring execution of malicious code.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate scheduled jobs may be created during installation of new software." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "387a6799-14f7-468b-867d-263822dd7beb", - "rule_id": "1327384f-00f3-44d5-9a8c-2373ba071e92", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.path : \"?:\\\\Windows\\\\Tasks\\\\*\" and file.extension : \"job\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Rare User Logon", - "description": "A machine learning job found an unusual user name in the authentication logs. An unusual user name is one way of detecting credentialed access by means of a new or dormant user account. An inactive user account (because the user has left the organization) that becomes active may be due to credentialed access using a compromised account password. Threat actors will sometimes also create new users as a means of persisting in a compromised web application.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Rare User Logon\n\nThis rule uses a machine learning job to detect an unusual user name in authentication logs, which could detect new accounts created for persistence.\n\n#### Possible investigation steps\n\n- Check if the user was newly created and if the company policies were followed.\n - Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the involved users during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Accounts that are used for specific purposes — and therefore not normally active — may trigger the alert.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 104, - "tags": [ - "Use Case: Identity and Access Audit", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Initial Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "User accounts that are rarely active, such as a site reliability engineer (SRE) or developer logging into a production server for troubleshooting, may trigger this alert. Under some conditions, a newly created user account may briefly trigger this alert while the model is learning." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - }, - { - "id": "T1078.003", - "name": "Local Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/003/" - } - ] - } - ] - } - ], - "id": "2377b4df-7374-41ea-8a85-81d68c368cd4", - "rule_id": "138c5dd5-838b-446e-b1ac-c995c7f8108a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "auth_rare_user" - }, - { - "name": "Virtual Private Network Connection Attempt", - "description": "Identifies the execution of macOS built-in commands to connect to an existing Virtual Private Network (VPN). Adversaries may use VPN connections to laterally move and control remote systems on a network.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/rapid7/metasploit-framework/blob/master/modules/post/osx/manage/vpn.rb", - "https://www.unix.com/man-page/osx/8/networksetup/", - "https://superuser.com/questions/358513/start-configured-vpn-from-command-line-osx" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - } - ], - "id": "59d41551-fd37-4154-a311-24264594a794", - "rule_id": "15dacaa0-5b90-466b-acab-63435a59701a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n (\n (process.name : \"networksetup\" and process.args : \"-connectpppoeservice\") or\n (process.name : \"scutil\" and process.args : \"--nc\" and process.args : \"start\") or\n (process.name : \"osascript\" and process.command_line : \"osascript*set VPN to service*\")\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Kerberos Attack via Bifrost", - "description": "Identifies use of Bifrost, a known macOS Kerberos pentesting tool, which can be used to dump cached Kerberos tickets or attempt unauthorized authentication techniques such as pass-the-ticket/hash and kerberoasting.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/its-a-feature/bifrost" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1550", - "name": "Use Alternate Authentication Material", - "reference": "https://attack.mitre.org/techniques/T1550/", - "subtechnique": [ - { - "id": "T1550.003", - "name": "Pass the Ticket", - "reference": "https://attack.mitre.org/techniques/T1550/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/", - "subtechnique": [ - { - "id": "T1558.003", - "name": "Kerberoasting", - "reference": "https://attack.mitre.org/techniques/T1558/003/" - } - ] - } - ] - } - ], - "id": "c8fbbba4-26e0-45f9-9d56-f4fd4f4a6ec9", - "rule_id": "16904215-2c95-4ac8-bf5c-12354e047192", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:start and\n process.args:(\"-action\" and (\"-kerberoast\" or askhash or asktgs or asktgt or s4u or (\"-ticket\" and ptt) or (dump and (tickets or keytab))))\n", - "language": "kuery" - }, - { - "name": "Startup/Logon Script added to Group Policy Object", - "description": "Detects the modification of Group Policy Objects (GPO) to add a startup/logon script to users or computer objects.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Startup/Logon Script added to Group Policy Object\n\nGroup Policy Objects (GPOs) can be used by attackers to instruct arbitrarily large groups of clients to execute specified commands at startup, logon, shutdown, and logoff. This is done by creating or modifying the `scripts.ini` or `psscripts.ini` files. The scripts are stored in the following paths:\n - `\\Machine\\Scripts\\`\n - `\\User\\Scripts\\`\n\n#### Possible investigation steps\n\n- This attack abuses a legitimate mechanism of Active Directory, so it is important to determine whether the activity is legitimate and the administrator is authorized to perform this operation.\n- Retrieve the contents of the `ScheduledTasks.xml` file, and check the `` and `` XML tags for any potentially malicious commands or binaries.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Scope which objects may be compromised by retrieving information about which objects are controlled by the GPO.\n\n### False positive analysis\n\n- Verify if the execution is legitimately authorized and executed under a change management process.\n\n### Related rules\n\n- Group Policy Abuse for Privilege Addition - b9554892-5e0e-424b-83a0-5aef95aa43bf\n- Scheduled Task Execution at Scale via GPO - 15a8ba77-1c13-4274-88fe-6bd14133861e\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- The investigation and containment must be performed in every computer controlled by the GPO, where necessary.\n- Remove the script from the GPO.\n- Check if other GPOs have suspicious scripts attached.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Active Directory", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate Administrative Activity" - ], - "references": [ - "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0025_windows_audit_directory_service_changes.md", - "https://github.com/atc-project/atc-data/blob/f2bbb51ecf68e2c9f488e3c70dcdd3df51d2a46b/docs/Logging_Policies/LP_0029_windows_audit_detailed_file_share.md", - "https://labs.f-secure.com/tools/sharpgpoabuse" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1484", - "name": "Domain Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1484/", - "subtechnique": [ - { - "id": "T1484.001", - "name": "Group Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1484/001/" - } - ] - }, - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/" - } - ] - } - ], - "id": "650df61b-da2e-4e02-b4ab-3e2df5deb860", - "rule_id": "16fac1a1-21ee-4ca6-b720-458e3855d046", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "message", - "type": "match_only_text", - "ecs": true - }, - { - "name": "winlog.event_data.AccessList", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.AttributeLDAPDisplayName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.AttributeValue", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.RelativeTargetName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.ShareName", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'Audit Detailed File Share' audit policy must be configured (Success Failure).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nObject Access >\nAudit Detailed File Share (Success,Failure)\n```\n\nThe 'Audit Directory Service Changes' audit policy must be configured (Success Failure).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "(\n event.code:5136 and winlog.event_data.AttributeLDAPDisplayName:(gPCMachineExtensionNames or gPCUserExtensionNames) and\n winlog.event_data.AttributeValue:(*42B5FAAE-6536-11D2-AE5A-0000F87571E3* and\n (*40B66650-4972-11D1-A7CA-0000F87571E3* or *40B6664F-4972-11D1-A7CA-0000F87571E3*))\n)\nor\n(\n event.code:5145 and winlog.event_data.ShareName:\\\\\\\\*\\\\SYSVOL and\n winlog.event_data.RelativeTargetName:(*\\\\scripts.ini or *\\\\psscripts.ini) and\n (message:WriteData or winlog.event_data.AccessList:*%%4417*)\n)\n", - "language": "kuery" - }, - { - "name": "Unusual Windows Username", - "description": "A machine learning job detected activity for a username that is not normally active, which can indicate unauthorized changes, activity by unauthorized users, lateral movement, or compromised credentials. In many organizations, new usernames are not often created apart from specific types of system activities, such as creating new accounts for new employees. These user accounts quickly become active and routine. Events from rarely used usernames can point to suspicious activity. Additionally, automated Linux fleets tend to see activity from rarely used usernames only when personnel log in to make authorized or unauthorized changes, or threat actors have acquired credentials and log in for malicious purposes. Unusual usernames can also indicate pivoting, where compromised credentials are used to try and move laterally from one host to another.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating an Unusual Windows User\nDetection alerts from this rule indicate activity for a Windows user name that is rare and unusual. Here are some possible avenues of investigation:\n- Consider the user as identified by the username field. Is this program part of an expected workflow for the user who ran this program on this host? Could this be related to occasional troubleshooting or support activity?\n- Examine the history of user activity. If this user only manifested recently, it might be a service account for a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business process.\n- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks that the user is performing.\n- Consider the same for the parent process. If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon user activity can be due to an administrator or help desk technician logging onto a workstation or server in order to perform manual troubleshooting or reconfiguration." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - }, - { - "id": "T1078.003", - "name": "Local Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/003/" - } - ] - } - ] - } - ], - "id": "518f60f5-03ed-4062-bdae-319f203ae25b", - "rule_id": "1781d055-5c66-4adf-9c59-fc0fa58336a5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_windows_anomalous_user_name" - ] - }, - { - "name": "Unusual Windows Service", - "description": "A machine learning job detected an unusual Windows service, This can indicate execution of unauthorized services, malware, or persistence mechanisms. In corporate Windows environments, hosts do not generally run many rare or unique services. This job helps detect malware and persistence mechanisms that have been installed and run as a service.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - } - ], - "id": "9ce1c5bc-e4b8-4794-b05c-38b982175a83", - "rule_id": "1781d055-5c66-4adf-9c71-fc0fa58338c7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_windows_anomalous_service" - ] - }, - { - "name": "Suspicious Powershell Script", - "description": "A machine learning job detected a PowerShell script with unusual data characteristics, such as obfuscation, that may be a characteristic of malicious PowerShell script text blocks.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Certain kinds of security testing may trigger this alert. PowerShell scripts that use high levels of obfuscation or have unusual script block payloads may trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "509b8bcd-bddb-47d4-b3cd-ca8e3c33ad0c", - "rule_id": "1781d055-5c66-4adf-9d60-fc0fa58337b6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_windows_anomalous_script" - ] - }, - { - "name": "Unusual Windows User Privilege Elevation Activity", - "description": "A machine learning job detected an unusual user context switch, using the runas command or similar techniques, which can indicate account takeover or privilege escalation using compromised accounts. Privilege elevation using tools like runas are more commonly used by domain and network administrators than by regular Windows users.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon user privilege elevation activity can be due to an administrator, help desk technician, or a user performing manual troubleshooting or reconfiguration." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [] - } - ], - "id": "783c5321-5a1f-48b5-bffb-06360b4c002b", - "rule_id": "1781d055-5c66-4adf-9d82-fc0fa58449c8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_windows_rare_user_runas_event" - ] - }, - { - "name": "Unusual Windows Remote User", - "description": "A machine learning job detected an unusual remote desktop protocol (RDP) username, which can indicate account takeover or credentialed persistence using compromised accounts. RDP attacks, such as BlueKeep, also tend to use unusual usernames.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating an Unusual Windows User\nDetection alerts from this rule indicate activity for a rare and unusual Windows RDP (remote desktop) user. Here are some possible avenues of investigation:\n- Consider the user as identified by the username field. Is the user part of a group who normally logs into Windows hosts using RDP (remote desktop protocol)? Is this logon activity part of an expected workflow for the user?\n- Consider the source of the login. If the source is remote, could this be related to occasional troubleshooting or support activity by a vendor or an employee working remotely?", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon username activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "4d22f38c-3d35-4b9a-9a2d-94d26d6eeb2b", - "rule_id": "1781d055-5c66-4adf-9e93-fc0fa69550c9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_windows_rare_user_type10_remote_login" - ] - }, - { - "name": "Unusual Network Destination Domain Name", - "description": "A machine learning job detected an unusual network destination domain name. This can be due to initial access, persistence, command-and-control, or exfiltration activity. For example, when a user clicks on a link in a phishing email or opens a malicious document, a request may be sent to download and run a payload from an uncommon web server name. When malware is already running, it may send requests to an uncommon DNS domain the malware uses for command-and-control communication.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Web activity that occurs rarely in small quantities can trigger this alert. Possible examples are browsing technical support or vendor URLs that are used very sparsely. A user who visits a new and unique web destination may trigger this alert when the activity is sparse. Web applications that generate URLs unique to a transaction may trigger this when they are used sparsely. Web domains can be excluded in cases such as these." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "7d9e9734-64f4-440d-8711-add8aa0dd0ff", - "rule_id": "17e68559-b274-4948-ad0b-f8415bb31126", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": "packetbeat_rare_server_domain" - }, - { - "name": "Execution of COM object via Xwizard", - "description": "Windows Component Object Model (COM) is an inter-process communication (IPC) component of the native Windows application programming interface (API) that enables interaction between software objects or executable code. Xwizard can be used to run a COM object created in registry to evade defensive counter measures.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://lolbas-project.github.io/lolbas/Binaries/Xwizard/", - "http://www.hexacorn.com/blog/2017/07/31/the-wizard-of-x-oppa-plugx-style/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1559", - "name": "Inter-Process Communication", - "reference": "https://attack.mitre.org/techniques/T1559/", - "subtechnique": [ - { - "id": "T1559.001", - "name": "Component Object Model", - "reference": "https://attack.mitre.org/techniques/T1559/001/" - } - ] - } - ] - } - ], - "id": "eca0cbc4-1ceb-4090-b825-bff5e7324343", - "rule_id": "1a6075b0-7479-450e-8fe7-b8b8438ac570", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name : \"xwizard.exe\" and\n (\n (process.args : \"RunWizard\" and process.args : \"{*}\") or\n (process.executable != null and\n not process.executable : (\"C:\\\\Windows\\\\SysWOW64\\\\xwizard.exe\", \"C:\\\\Windows\\\\System32\\\\xwizard.exe\")\n )\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "User Account Creation", - "description": "Identifies attempts to create new users. This is sometimes done by attackers to increase access or establish persistence on a system or domain.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating User Account Creation\n\nAttackers may create new accounts (both local and domain) to maintain access to victim systems.\n\nThis rule identifies the usage of `net.exe` to create new accounts.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Identify if the account was added to privileged groups or assigned special privileges after creation.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Account creation is a common administrative task, so there is a high chance of the activity being legitimate. Before investigating further, verify that this activity is not benign.\n\n### Related rules\n\n- Creation of a Hidden Local User Account - 2edc8076-291e-41e9-81e4-e3fcbc97ae5e\n- Windows User Account Creation - 38e17753-f581-4644-84da-0d60a8318694\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Delete the created account.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/", - "subtechnique": [ - { - "id": "T1136.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1136/001/" - } - ] - } - ] - } - ], - "id": "9a6eee1e-c63b-49f9-8f32-b35b3101b278", - "rule_id": "1aa9181a-492b-4c01-8b16-fa0735786b2b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"net.exe\", \"net1.exe\") and\n not process.parent.name : \"net.exe\" and\n (process.args : \"user\" and process.args : (\"/ad\", \"/add\"))\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Inter-Process Communication via Outlook", - "description": "Detects Inter-Process Communication with Outlook via Component Object Model from an unusual process. Adversaries may target user email to collect sensitive information or send email on their behalf via API.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/center-for-threat-informed-defense/adversary_emulation_library/blob/master/apt29/Archive/CALDERA_DIY/evals/payloads/stepSeventeen_email.ps1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1114", - "name": "Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/", - "subtechnique": [ - { - "id": "T1114.001", - "name": "Local Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1559", - "name": "Inter-Process Communication", - "reference": "https://attack.mitre.org/techniques/T1559/", - "subtechnique": [ - { - "id": "T1559.001", - "name": "Component Object Model", - "reference": "https://attack.mitre.org/techniques/T1559/001/" - } - ] - } - ] - } - ], - "id": "a734868b-2ed2-45bb-9c0f-2100d1039de3", - "rule_id": "1dee0500-4aeb-44ca-b24b-4a285d7b6ba1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.effective_parent.executable", - "type": "unknown", - "ecs": false - }, - { - "name": "process.Ext.effective_parent.name", - "type": "unknown", - "ecs": false - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.action == \"start\" and process.name : \"OUTLOOK.EXE\" and\n process.Ext.effective_parent.name != null and\n not process.Ext.effective_parent.executable : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Execution of File Written or Modified by PDF Reader", - "description": "Identifies a suspicious file that was written by a PDF reader application and subsequently executed. These processes are often launched via exploitation of PDF applications.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Execution of File Written or Modified by PDF Reader\n\nPDF is a common file type used in corporate environments and most machines have software to handle these files. This creates a vector where attackers can exploit the engines and technology behind this class of software for initial access or privilege escalation.\n\nThis rule searches for executable files written by PDF reader software and executed in sequence. This is most likely the result of exploitation for privilege escalation or initial access. This rule can also detect suspicious processes masquerading as PDF readers.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve the PDF documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client.\n- Determine if the collected files are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n - If the malicious file was delivered via phishing:\n - Block the email sender from sending future emails.\n - Block the malicious web pages.\n - Remove emails from the sender from mailboxes.\n - Consider improvements to the security awareness program.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-120m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - }, - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - } - ], - "id": "f5820a16-830a-4b91-b88d-3d728c2dfb42", - "rule_id": "1defdd62-cd8d-426e-a246-81a37751bb2b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=2h\n [file where host.os.type == \"windows\" and event.type != \"deletion\" and file.extension : \"exe\" and\n (process.name : \"AcroRd32.exe\" or\n process.name : \"rdrcef.exe\" or\n process.name : \"FoxitPhantomPDF.exe\" or\n process.name : \"FoxitReader.exe\") and\n not (file.name : \"FoxitPhantomPDF.exe\" or\n file.name : \"FoxitPhantomPDFUpdater.exe\" or\n file.name : \"FoxitReader.exe\" or\n file.name : \"FoxitReaderUpdater.exe\" or\n file.name : \"AcroRd32.exe\" or\n file.name : \"rdrcef.exe\")\n ] by host.id, file.path\n [process where host.os.type == \"windows\" and event.type == \"start\"] by host.id, process.executable\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "PowerShell Script with Discovery Capabilities", - "description": "Identifies the use of Cmdlets and methods related to discovery activities. Attackers can use these to perform various situational awareness related activities, like enumerating users, shares, sessions, domain trusts, groups, etc.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "building_block_type": "default", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Tactic: Discovery", - "Data Source: PowerShell Logs", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1087", - "name": "Account Discovery", - "reference": "https://attack.mitre.org/techniques/T1087/", - "subtechnique": [ - { - "id": "T1087.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1087/001/" - }, - { - "id": "T1087.002", - "name": "Domain Account", - "reference": "https://attack.mitre.org/techniques/T1087/002/" - } - ] - }, - { - "id": "T1482", - "name": "Domain Trust Discovery", - "reference": "https://attack.mitre.org/techniques/T1482/" - }, - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - }, - { - "id": "T1083", - "name": "File and Directory Discovery", - "reference": "https://attack.mitre.org/techniques/T1083/" - }, - { - "id": "T1615", - "name": "Group Policy Discovery", - "reference": "https://attack.mitre.org/techniques/T1615/" - }, - { - "id": "T1135", - "name": "Network Share Discovery", - "reference": "https://attack.mitre.org/techniques/T1135/" - }, - { - "id": "T1201", - "name": "Password Policy Discovery", - "reference": "https://attack.mitre.org/techniques/T1201/" - }, - { - "id": "T1057", - "name": "Process Discovery", - "reference": "https://attack.mitre.org/techniques/T1057/" - }, - { - "id": "T1518", - "name": "Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/", - "subtechnique": [ - { - "id": "T1518.001", - "name": "Security Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/001/" - } - ] - }, - { - "id": "T1012", - "name": "Query Registry", - "reference": "https://attack.mitre.org/techniques/T1012/" - }, - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - }, - { - "id": "T1049", - "name": "System Network Connections Discovery", - "reference": "https://attack.mitre.org/techniques/T1049/" - }, - { - "id": "T1007", - "name": "System Service Discovery", - "reference": "https://attack.mitre.org/techniques/T1007/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "43160aa0-ca19-417c-a6ed-0ec2c31d8365", - "rule_id": "1e0a3f7c-21e7-4bb1-98c7-2036612fb1be", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n (\n (\"Get-ItemProperty\" or \"Get-Item\") and \"-Path\"\n ) or\n (\n \"Get-ADDefaultDomainPasswordPolicy\" or\n \"Get-ADDomain\" or \"Get-ComputerInfo\" or\n \"Get-Disk\" or \"Get-DnsClientCache\" or\n \"Get-GPOReport\" or \"Get-HotFix\" or\n \"Get-LocalUser\" or \"Get-NetFirewallProfile\" or\n \"get-nettcpconnection\" or \"Get-NetAdapter\" or\n \"Get-PhysicalDisk\" or \"Get-Process\" or\n \"Get-PSDrive\" or \"Get-Service\" or\n \"Get-SmbShare\" or \"Get-WinEvent\"\n ) or\n (\n (\"Get-WmiObject\" or \"gwmi\" or \"Get-CimInstance\" or\n \"gcim\" or \"Management.ManagementObjectSearcher\" or\n \"System.Management.ManagementClass\" or\n \"[WmiClass]\" or \"[WMI]\") and\n (\n \"AntiVirusProduct\" or \"CIM_BIOSElement\" or \"CIM_ComputerSystem\" or \"CIM_Product\" or \"CIM_DiskDrive\" or\n \"CIM_LogicalDisk\" or \"CIM_NetworkAdapter\" or \"CIM_StorageVolume\" or \"CIM_OperatingSystem\" or\n \"CIM_Process\" or \"CIM_Service\" or \"MSFT_DNSClientCache\" or \"Win32_BIOS\" or \"Win32_ComputerSystem\" or\n \"Win32_ComputerSystemProduct\" or \"Win32_DiskDrive\" or \"win32_environment\" or \"Win32_Group\" or\n \"Win32_groupuser\" or \"Win32_IP4RouteTable\" or \"Win32_logicaldisk\" or \"Win32_MappedLogicalDisk\" or\n \"Win32_NetworkAdapterConfiguration\" or \"win32_ntdomain\" or \"Win32_OperatingSystem\" or\n \"Win32_PnPEntity\" or \"Win32_Process\" or \"Win32_Product\" or \"Win32_quickfixengineering\" or\n \"win32_service\" or \"Win32_Share\" or \"Win32_UserAccount\"\n )\n ) or\n (\n (\"ADSI\" and \"WinNT\") or\n (\"Get-ChildItem\" and \"sysmondrv.sys\") or\n (\"::GetIPGlobalProperties()\" and \"GetActiveTcpConnections()\") or\n (\"ServiceProcess.ServiceController\" and \"::GetServices\") or\n (\"Diagnostics.Process\" and \"::GetProcesses\") or\n (\"DirectoryServices.Protocols.GroupPolicy\" and \".GetGPOReport()\") or\n (\"DirectoryServices.AccountManagement\" and \"PrincipalSearcher\") or\n (\"NetFwTypeLib.NetFwMgr\" and \"CurrentProfile\") or\n (\"NetworkInformation.NetworkInterface\" and \"GetAllNetworkInterfaces\") or\n (\"Automation.PSDriveInfo\") or\n (\"Microsoft.Win32.RegistryHive\")\n ) or\n (\n \"Get-ItemProperty\" and\n (\n \"\\Control\\SecurityProviders\\WDigest\" or\n \"\\microsoft\\windows\\currentversion\\explorer\\runmru\" or\n \"\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\Kerberos\\Parameters\" or\n \"\\Microsoft\\Windows\\CurrentVersion\\Uninstall\" or\n \"\\Microsoft\\Windows\\WindowsUpdate\" or\n \"Policies\\Microsoft\\Windows\\Installer\" or\n \"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\" or\n (\"\\Services\\SharedAccess\\Parameters\\FirewallPolicy\" and \"EnableFirewall\") or\n (\"Microsoft\\Windows\\CurrentVersion\\Internet Settings\" and \"proxyEnable\")\n )\n ) or\n (\n (\"Directoryservices.Activedirectory\" or\n \"DirectoryServices.AccountManagement\") and \n (\n \"Domain Admins\" or \"DomainControllers\" or\n \"FindAllGlobalCatalogs\" or \"GetAllTrustRelationships\" or\n \"GetCurrentDomain\" or \"GetCurrentForest\"\n ) or\n \"DirectoryServices.DirectorySearcher\" and\n (\n \"samAccountType=805306368\" or\n \"samAccountType=805306369\" or\n \"objectCategory=group\" or\n \"objectCategory=groupPolicyContainer\" or\n \"objectCategory=site\" or\n \"objectCategory=subnet\" or\n \"objectClass=trustedDomain\"\n )\n ) or\n (\n \"Get-Process\" and\n (\n \"mcshield\" or \"windefend\" or \"savservice\" or\n \"TMCCSF\" or \"symantec antivirus\" or\n \"CSFalcon\" or \"TmPfw\" or \"kvoop\"\n )\n )\n ) and\n not user.id : (\"S-1-5-18\" or \"S-1-5-19\" or \"S-1-5-20\") and\n not file.path : (\n ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules\\\\\\\\*.psd1 or\n ?\\:\\\\\\\\Program?Files\\\\\\\\WindowsPowerShell\\\\\\\\Modules\\\\\\\\*.psm1 or\n ?\\:\\\\\\\\Program?Files\\\\\\\\Microsoft?Azure?AD?Sync\\\\\\\\Extensions\\\\\\\\AADConnector.psm1* or\n *ServiceNow?MID?Server*agent\\\\\\\\scripts\\\\\\\\PowerShell\\\\\\\\*.psm1 or\n ?\\:\\\\\\\\*\\\\\\\\IMECache\\\\\\\\HealthScripts\\\\\\\\*\\\\\\\\detect.ps1\n ) and\n not (\n file.path : (\n ?\\:\\\\\\\\*\\\\\\\\TEMP\\\\\\\\SDIAG* or\n ?\\:\\\\\\\\TEMP\\\\\\\\SDIAG* or\n ?\\:\\\\\\\\Temp\\\\\\\\SDIAG* or\n ?\\:\\\\\\\\temp\\\\\\\\SDIAG* or\n ?\\:\\\\\\\\Users\\\\\\\\*\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Temp\\\\\\\\SDIAG* or\n ?\\:\\\\\\\\Users\\\\\\\\*\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Temp\\\\\\\\*\\\\\\\\SDIAG*\n ) and file.name : \"CL_Utility.ps1\"\n )\n", - "language": "kuery" - }, - { - "name": "Unusual Sudo Activity", - "description": "Looks for sudo activity from an unusual user context. An unusual sudo user could be due to troubleshooting activity or it could be a sign of credentialed access via compromised accounts.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon sudo activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/" - } - ] - } - ], - "id": "05eb2f40-21db-4afe-beaf-0143b5c2b7c5", - "rule_id": "1e9fc667-9ff1-4b33-9f40-fefca8537eb0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": [ - "v3_linux_rare_sudo_user" - ] - }, - { - "name": "Unusual Linux User Calling the Metadata Service", - "description": "Looks for anomalous access to the cloud platform metadata service by an unusual user. The metadata service may be targeted in order to harvest credentials or user data scripts containing secrets.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program, or one that runs under a new or rarely used user context, could trigger this detection rule. Manual interrogation of the metadata service during debugging or troubleshooting could trigger this rule." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.005", - "name": "Cloud Instance Metadata API", - "reference": "https://attack.mitre.org/techniques/T1552/005/" - } - ] - } - ] - } - ], - "id": "f014217a-a68e-45d8-9dbe-cb338771f50b", - "rule_id": "1faec04b-d902-4f89-8aff-92cd9043c16f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": [ - "v3_linux_rare_metadata_user" - ] - }, - { - "name": "Creation or Modification of Root Certificate", - "description": "Identifies the creation or modification of a local trusted root certificate in Windows. The install of a malicious root certificate would allow an attacker the ability to masquerade malicious files as valid signed components from any entity (for example, Microsoft). It could also allow an attacker to decrypt SSL traffic.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Creation or Modification of Root Certificate\n\nRoot certificates are the primary level of certifications that tell a browser that the communication is trusted and legitimate. This verification is based upon the identification of a certification authority. Windows adds several trusted root certificates so browsers can use them to communicate with websites.\n\n[Check out this post](https://www.thewindowsclub.com/what-are-root-certificates-windows) for more details on root certificates and the involved cryptography.\n\nThis rule identifies the creation or modification of a root certificate by monitoring registry modifications. The installation of a malicious root certificate would allow an attacker the ability to masquerade malicious files as valid signed components from any entity (for example, Microsoft). It could also allow an attacker to decrypt SSL traffic.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate abnormal behaviors observed by the subject process such as network connections, other registry or file modifications, and any spawned child processes.\n- If one of the processes is suspicious, retrieve it and determine if it is malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This detection may be triggered by certain applications that install root certificates for the purpose of inspecting SSL traffic. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove the malicious certificate from the root certificate store.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Certain applications may install root certificates for the purpose of inspecting SSL traffic." - ], - "references": [ - "https://posts.specterops.io/code-signing-certificate-cloning-attacks-and-defenses-6f98657fc6ec", - "https://www.ired.team/offensive-security/persistence/t1130-install-root-certificate" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1553", - "name": "Subvert Trust Controls", - "reference": "https://attack.mitre.org/techniques/T1553/", - "subtechnique": [ - { - "id": "T1553.004", - "name": "Install Root Certificate", - "reference": "https://attack.mitre.org/techniques/T1553/004/" - } - ] - } - ] - } - ], - "id": "e5648fae-3eed-4fc7-a536-e1de395d4ff1", - "rule_id": "203ab79b-239b-4aa5-8e54-fc50623ee8e4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n registry.path :\n (\n \"HKLM\\\\Software\\\\Microsoft\\\\SystemCertificates\\\\Root\\\\Certificates\\\\*\\\\Blob\",\n \"HKLM\\\\Software\\\\Microsoft\\\\SystemCertificates\\\\AuthRoot\\\\Certificates\\\\*\\\\Blob\",\n \"HKLM\\\\Software\\\\Policies\\\\Microsoft\\\\SystemCertificates\\\\Root\\\\Certificates\\\\*\\\\Blob\",\n \"HKLM\\\\Software\\\\Policies\\\\Microsoft\\\\SystemCertificates\\\\AuthRoot\\\\Certificates\\\\*\\\\Blob\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\SystemCertificates\\\\Root\\\\Certificates\\\\*\\\\Blob\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\SystemCertificates\\\\AuthRoot\\\\Certificates\\\\*\\\\Blob\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Policies\\\\Microsoft\\\\SystemCertificates\\\\Root\\\\Certificates\\\\*\\\\Blob\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Policies\\\\Microsoft\\\\SystemCertificates\\\\AuthRoot\\\\Certificates\\\\*\\\\Blob\"\n ) and\n not process.executable :\n (\"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\*.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\*.exe\",\n \"?:\\\\Windows\\\\Sysmon64.exe\",\n \"?:\\\\Windows\\\\Sysmon.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender\\\\Platform\\\\*\\\\MsMpEng.exe\",\n \"?:\\\\Windows\\\\WinSxS\\\\*.exe\",\n \"?:\\\\Windows\\\\UUS\\\\amd64\\\\MoUsoCoreWorker.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Access of Stored Browser Credentials", - "description": "Identifies the execution of a process with arguments pointing to known browser files that store passwords and cookies. Adversaries may acquire credentials from web browsers by reading files specific to the target browser.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://securelist.com/calisto-trojan-for-macos/86543/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1539", - "name": "Steal Web Session Cookie", - "reference": "https://attack.mitre.org/techniques/T1539/" - }, - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/", - "subtechnique": [ - { - "id": "T1555.003", - "name": "Credentials from Web Browsers", - "reference": "https://attack.mitre.org/techniques/T1555/003/" - } - ] - } - ] - } - ], - "id": "c4b37cb7-0f0c-4894-aadd-12c77ce7dbdb", - "rule_id": "20457e4f-d1de-4b92-ae69-142e27a4342a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.args :\n (\n \"/Users/*/Library/Application Support/Google/Chrome/Default/Login Data\",\n \"/Users/*/Library/Application Support/Google/Chrome/Default/Cookies\",\n \"/Users/*/Library/Application Support/Google/Chrome/Profile*/Cookies\",\n \"/Users/*/Library/Cookies*\",\n \"/Users/*/Library/Application Support/Firefox/Profiles/*.default/cookies.sqlite\",\n \"/Users/*/Library/Application Support/Firefox/Profiles/*.default/key*.db\",\n \"/Users/*/Library/Application Support/Firefox/Profiles/*.default/logins.json\",\n \"Login Data\",\n \"Cookies.binarycookies\",\n \"key4.db\",\n \"key3.db\",\n \"logins.json\",\n \"cookies.sqlite\"\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Full User-Mode Dumps Enabled System-Wide", - "description": "Identifies the enable of the full user-mode dumps feature system-wide. This feature allows Windows Error Reporting (WER) to collect data after an application crashes. This setting is a requirement for the LSASS Shtinkering attack, which fakes the communication of a crash on LSASS, generating a dump of the process memory, which gives the attacker access to the credentials present on the system without having to bring malware to the system. This setting is not enabled by default, and applications must create their registry subkeys to hold settings that enable them to collect dumps.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps", - "https://github.com/deepinstinct/Lsass-Shtinkering", - "https://media.defcon.org/DEF%20CON%2030/DEF%20CON%2030%20presentations/Asaf%20Gilboa%20-%20LSASS%20Shtinkering%20Abusing%20Windows%20Error%20Reporting%20to%20Dump%20LSASS.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "6f02464c-5f8c-4155-9a90-0efb771990f0", - "rule_id": "220be143-5c67-4fdb-b6ce-dd6826d024fd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and registry.path : \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\Windows Error Reporting\\\\LocalDumps\\\\DumpType\" and\n registry.data.strings : (\"2\", \"0x00000002\") and\n not (process.executable : \"?:\\\\Windows\\\\system32\\\\svchost.exe\" and user.id : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\"))\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Potential Suspicious DebugFS Root Device Access", - "description": "This rule monitors for the usage of the built-in Linux DebugFS utility to access a disk device without root permissions. Linux users that are part of the \"disk\" group have sufficient privileges to access all data inside of the machine through DebugFS. Attackers may leverage DebugFS in conjunction with \"disk\" permissions to read sensitive files owned by root, such as the shadow file, root ssh private keys or other sensitive files that may allow them to further escalate privileges.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://book.hacktricks.xyz/linux-hardening/privilege-escalation/interesting-groups-linux-pe#disk-group" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.003", - "name": "Local Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/003/" - } - ] - } - ] - } - ], - "id": "16996e31-1c95-41ba-92d7-27d30082d02f", - "rule_id": "2605aa59-29ac-4662-afad-8d86257c7c91", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "group.Ext.real.id", - "type": "unknown", - "ecs": false - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.Ext.real.id", - "type": "unknown", - "ecs": false - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and event.type == \"start\" and \nprocess.name == \"debugfs\" and process.args : \"/dev/sd*\" and not process.args == \"-R\" and \nnot user.Ext.real.id == \"0\" and not group.Ext.real.id == \"0\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Privileges Elevation via Parent Process PID Spoofing", - "description": "Identifies parent process spoofing used to create an elevated child process. Adversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 5, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://gist.github.com/xpn/a057a26ec81e736518ee50848b9c2cd6", - "https://blog.didierstevens.com/2017/03/20/", - "https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-updateprocthreadattribute", - "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1134.002/T1134.002.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/", - "subtechnique": [ - { - "id": "T1134.002", - "name": "Create Process with Token", - "reference": "https://attack.mitre.org/techniques/T1134/002/" - }, - { - "id": "T1134.004", - "name": "Parent PID Spoofing", - "reference": "https://attack.mitre.org/techniques/T1134/004/" - } - ] - } - ] - } - ], - "id": "ee5d4d7d-1c58-4a73-a655-bf4ab6fceac5", - "rule_id": "26b01043-4f04-4d2f-882a-5a1d2e95751b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.Ext.real.pid", - "type": "unknown", - "ecs": false - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "/* This rule is compatible with Elastic Endpoint only */\n\nprocess where host.os.type == \"windows\" and event.action == \"start\" and\n\n /* process creation via seclogon */\n process.parent.Ext.real.pid > 0 and\n\n /* PrivEsc to SYSTEM */\n user.id : \"S-1-5-18\" and\n\n /* Common FPs - evasion via hollowing is possible, should be covered by code injection */\n not process.executable : (\"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\System32\\\\Wermgr.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\Wermgr.exe\",\n \"?:\\\\Windows\\\\SoftwareDistribution\\\\Download\\\\Install\\\\securityhealthsetup.exe\") and\n /* Logon Utilities */\n not (process.parent.executable : \"?:\\\\Windows\\\\System32\\\\Utilman.exe\" and\n process.executable : (\"?:\\\\Windows\\\\System32\\\\osk.exe\",\n \"?:\\\\Windows\\\\System32\\\\Narrator.exe\",\n \"?:\\\\Windows\\\\System32\\\\Magnify.exe\")) and\n\n not process.parent.executable : \"?:\\\\Windows\\\\System32\\\\AtBroker.exe\" and\n\n not (process.code_signature.subject_name in\n (\"philandro Software GmbH\", \"Freedom Scientific Inc.\", \"TeamViewer Germany GmbH\", \"Projector.is, Inc.\",\n \"TeamViewer GmbH\", \"Cisco WebEx LLC\", \"Dell Inc\") and process.code_signature.trusted == true) and \n\n /* AM_Delta_Patch Windows Update */\n not (process.executable : (\"?:\\\\Windows\\\\System32\\\\MpSigStub.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\MpSigStub.exe\") and\n process.parent.executable : (\"?:\\\\Windows\\\\System32\\\\wuauclt.exe\", \n \"?:\\\\Windows\\\\SysWOW64\\\\wuauclt.exe\", \n \"?:\\\\Windows\\\\UUS\\\\Packages\\\\Preview\\\\*\\\\wuaucltcore.exe\", \n \"?:\\\\Windows\\\\UUS\\\\amd64\\\\wuauclt.exe\", \n \"?:\\\\Windows\\\\UUS\\\\amd64\\\\wuaucltcore.exe\", \n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\UUS\\\\*\\\\wuaucltcore.exe\")) and\n not (process.executable : (\"?:\\\\Windows\\\\System32\\\\MpSigStub.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\MpSigStub.exe\") and process.parent.executable == null) and\n\n /* Other third party SW */\n not process.parent.executable :\n (\"?:\\\\Program Files (x86)\\\\HEAT Software\\\\HEAT Remote\\\\HEATRemoteServer.exe\",\n \"?:\\\\Program Files (x86)\\\\VisualCron\\\\VisualCronService.exe\",\n \"?:\\\\Program Files\\\\BinaryDefense\\\\Vision\\\\Agent\\\\bds-vision-agent-app.exe\",\n \"?:\\\\Program Files\\\\Tablet\\\\Wacom\\\\WacomHost.exe\",\n \"?:\\\\Program Files (x86)\\\\LogMeIn\\\\x64\\\\LogMeIn.exe\",\n \"?:\\\\Program Files (x86)\\\\EMC Captiva\\\\Captiva Cloud Runtime\\\\Emc.Captiva.WebCaptureRunner.exe\",\n \"?:\\\\Program Files\\\\Freedom Scientific\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Google\\\\Chrome Remote Desktop\\\\*\\\\remoting_host.exe\",\n \"?:\\\\Program Files (x86)\\\\GoToAssist Remote Support Customer\\\\*\\\\g2ax_comm_customer.exe\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "PowerShell Script with Archive Compression Capabilities", - "description": "Identifies the use of Cmdlets and methods related to archive compression activities. Adversaries will often compress and encrypt data in preparation for exfiltration.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "building_block_type": "default", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Data Source: PowerShell Logs", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1560", - "name": "Archive Collected Data", - "reference": "https://attack.mitre.org/techniques/T1560/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "f21ad0ff-ecf3-4185-8d5a-54c5c36e05ae", - "rule_id": "27071ea3-e806-4697-8abc-e22c92aa4293", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n(\n powershell.file.script_block_text : (\n \"IO.Compression.ZipFile\" or\n \"IO.Compression.ZipArchive\" or\n \"ZipFile.CreateFromDirectory\" or\n \"IO.Compression.BrotliStream\" or\n \"IO.Compression.DeflateStream\" or\n \"IO.Compression.GZipStream\" or\n \"IO.Compression.ZLibStream\"\n ) and \n powershell.file.script_block_text : (\n \"CompressionLevel\" or\n \"CompressionMode\" or\n \"ZipArchiveMode\"\n ) or\n powershell.file.script_block_text : \"Compress-Archive\"\n) and \n not file.path : (\n ?\\:\\\\\\\\ProgramData\\\\\\\\Microsoft\\\\\\\\Windows?Defender?Advanced?Threat?Protection\\\\\\\\Downloads\\\\\\\\* or\n ?\\:\\\\\\\\ProgramData\\\\\\\\Microsoft\\\\\\\\Windows?Defender?Advanced?Threat?Protection\\\\\\\\DataCollection\\\\\\\\* or\n ?\\:\\\\\\\\Program?Files\\\\\\\\Microsoft?Dependency?Agent\\\\\\\\plugins\\\\\\\\* or\n ?\\:\\\\\\\\Program?Files\\\\\\\\Azure\\\\\\\\StorageSyncAgent\\\\\\\\AFSDiag.ps1\n )\n", - "language": "kuery" - }, - { - "name": "Sudo Command Enumeration Detected", - "description": "This rule monitors for the usage of the sudo -l command, which is used to list the allowed and forbidden commands for the invoking user. Attackers may execute this command to enumerate commands allowed to be executed with sudo permissions, potentially allowing to escalate privileges to root.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1033", - "name": "System Owner/User Discovery", - "reference": "https://attack.mitre.org/techniques/T1033/" - } - ] - } - ], - "id": "f3f7a155-0338-43e7-9b15-0573ce0700d0", - "rule_id": "28d39238-0c01-420a-b77a-24e5a7378663", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "group.Ext.real.id", - "type": "unknown", - "ecs": false - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.Ext.real.id", - "type": "unknown", - "ecs": false - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and \nprocess.name == \"sudo\" and process.args == \"-l\" and process.args_count == 2 and\nprocess.parent.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and \nnot group.Ext.real.id : \"0\" and not user.Ext.real.id : \"0\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Windows Defender Exclusions Added via PowerShell", - "description": "Identifies modifications to the Windows Defender configuration settings using PowerShell to add exclusions at the folder directory or process level.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Windows Defender Exclusions Added via PowerShell\n\nMicrosoft Windows Defender is an antivirus product built into Microsoft Windows. Since this software product is used to prevent and stop malware, it's important to monitor what specific exclusions are made to the product's configuration settings. These can often be signs of an adversary or malware trying to bypass Windows Defender's capabilities. One of the more notable [examples](https://www.cyberbit.com/blog/endpoint-security/latest-trickbot-variant-has-new-tricks-up-its-sleeve/) was observed in 2018 where Trickbot incorporated mechanisms to disable Windows Defender to avoid detection.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Examine the exclusion in order to determine the intent behind it.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- If the exclusion specifies a suspicious file or path, retrieve the file(s) and determine if malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This rule has a high chance to produce false positives due to how often network administrators legitimately configure exclusions. In order to validate the activity further, review the specific exclusion and its intent. There are many legitimate reasons for exclusions, so it's important to gain context.\n\n### Related rules\n\n- Windows Defender Disabled via Registry Modification - 2ffa1f1e-b6db-47fa-994b-1512743847eb\n- Disabling Windows Defender Security Settings via PowerShell - c8cccb06-faf2-4cd5-886e-2c9636cfcb87\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Exclusion lists for antimalware capabilities should always be routinely monitored for review.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.bitdefender.com/files/News/CaseStudies/study/400/Bitdefender-PR-Whitepaper-MosaicLoader-creat5540-en-EN.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - }, - { - "id": "T1562.006", - "name": "Indicator Blocking", - "reference": "https://attack.mitre.org/techniques/T1562/006/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "34135f32-3f98-4f6d-b8c5-4059837fadf2", - "rule_id": "2c17e5d7-08b9-43b2-b58a-0270d65ac85b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : (\"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\") or process.pe.original_file_name in (\"powershell.exe\", \"pwsh.dll\", \"powershell_ise.exe\")) and\n process.args : (\"*Add-MpPreference*\", \"*Set-MpPreference*\") and\n process.args : (\"*-Exclusion*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Microsoft Diagnostics Wizard Execution", - "description": "Identifies potential abuse of the Microsoft Diagnostics Troubleshooting Wizard (MSDT) to proxy malicious command or binary execution via malicious process arguments.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://twitter.com/nao_sec/status/1530196847679401984", - "https://lolbas-project.github.io/lolbas/Binaries/Msdt/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "7c22ddd3-b2be-4bf2-8d6c-108d55202f66", - "rule_id": "2c3c29a4-f170-42f8-a3d8-2ceebc18eb6a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.pe.original_file_name == \"msdt.exe\" or process.name : \"msdt.exe\") and\n (\n process.args : (\"IT_RebrowseForFile=*\", \"ms-msdt:/id\", \"ms-msdt:-id\", \"*FromBase64*\") or\n\n (process.args : \"-af\" and process.args : \"/skip\" and\n process.parent.name : (\"explorer.exe\", \"cmd.exe\", \"powershell.exe\", \"cscript.exe\", \"wscript.exe\", \"mshta.exe\", \"rundll32.exe\", \"regsvr32.exe\") and\n process.args : (\"?:\\\\WINDOWS\\\\diagnostics\\\\index\\\\PCWDiagnostic.xml\", \"PCWDiagnostic.xml\", \"?:\\\\Users\\\\Public\\\\*\", \"?:\\\\Windows\\\\Temp\\\\*\")) or\n\n (process.pe.original_file_name == \"msdt.exe\" and not process.name : \"msdt.exe\" and process.name != null) or\n\n (process.pe.original_file_name == \"msdt.exe\" and not process.executable : (\"?:\\\\Windows\\\\system32\\\\msdt.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\msdt.exe\"))\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Creation of a Hidden Local User Account", - "description": "Identifies the creation of a hidden local user account by appending the dollar sign to the account name. This is sometimes done by attackers to increase access to a system and avoid appearing in the results of accounts listing using the net users command.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Creation of a Hidden Local User Account\n\nAttackers can create accounts ending with a `$` symbol to make the account hidden to user enumeration utilities and bypass detections that identify computer accounts by this pattern to apply filters.\n\nThis rule uses registry events to identify the creation of local hidden accounts.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positive (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Delete the hidden account.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.menasec.net/2019/02/threat-hunting-6-hiding-in-plain-sights_8.html", - "https://github.com/CyberMonitor/APT_CyberCriminal_Campagin_Collections/tree/master/2020/2020.12.15.Lazarus_Campaign" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/", - "subtechnique": [ - { - "id": "T1136.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1136/001/" - } - ] - } - ] - } - ], - "id": "a1477a82-9213-4f12-9900-facfaa8945aa", - "rule_id": "2edc8076-291e-41e9-81e4-e3fcbc97ae5e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKLM\\\\SAM\\\\SAM\\\\Domains\\\\Account\\\\Users\\\\Names\\\\*$\\\\\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SAM\\\\SAM\\\\Domains\\\\Account\\\\Users\\\\Names\\\\*$\\\\\"\n)\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Program Files Directory Masquerading", - "description": "Identifies execution from a directory masquerading as the Windows Program Files directories. These paths are trusted and usually host trusted third party programs. An adversary may leverage masquerading, along with low privileges to bypass detections allowlisting those folders.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - } - ], - "id": "be862f85-8c71-49b8-8297-19452a3ee706", - "rule_id": "32c5cf9c-2ef8-4e87-819e-5ccb7cd18b14", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.executable : \"C:\\\\*Program*Files*\\\\*.exe\" and\n not process.executable : (\"C:\\\\Program Files\\\\*.exe\", \"C:\\\\Program Files (x86)\\\\*.exe\", \"C:\\\\Users\\\\*.exe\", \"C:\\\\ProgramData\\\\*.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Accepted Default Telnet Port Connection", - "description": "This rule detects network events that may indicate the use of Telnet traffic. Telnet is commonly used by system administrators to remotely control older or embedded systems using the command line shell. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector. As a plain-text protocol, it may also expose usernames and passwords to anyone capable of observing the traffic.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "timeline_id": "300afc76-072d-4261-864d-4149714bf3f1", - "timeline_title": "Comprehensive Network Timeline", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Tactic: Lateral Movement", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "IoT (Internet of Things) devices and networks may use telnet and can be excluded if desired. Some business work-flows may use Telnet for administration of older devices. These often have a predictable behavior. Telnet activity involving an unusual source or destination may be more suspicious. Telnet activity involving a production server that has no known associated Telnet work-flow or business requirement is often suspicious." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - } - ], - "id": "b0d33519-c24e-4c87-96fb-8af37990027a", - "rule_id": "34fde489-94b0-4500-a76f-b8a157cf9269", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset:network_traffic.flow or event.category:(network or network_traffic))\n and event.type:connection and not event.action:(\n flow_dropped or denied or deny or\n flow_terminated or timeout or Reject or network_flow)\n and destination.port:23\n", - "language": "kuery" - }, - { - "name": "Execution via Electron Child Process Node.js Module", - "description": "Identifies attempts to execute a child process from within the context of an Electron application using the child_process Node.js module. Adversaries may abuse this technique to inherit permissions from parent processes.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.matthewslipper.com/2019/09/22/everything-you-wanted-electron-child-process.html", - "https://www.trustedsec.com/blog/macos-injection-via-third-party-frameworks/", - "https://nodejs.org/api/child_process.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/" - } - ] - } - ], - "id": "2aaee201-5a92-476d-adc6-e89e053f638b", - "rule_id": "35330ba2-c859-4c98-8b7f-c19159ea0e58", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and process.args:(\"-e\" and const*require*child_process*)\n", - "language": "kuery" - }, - { - "name": "Network Traffic to Rare Destination Country", - "description": "A machine learning job detected a rare destination country name in the network logs. This can be due to initial access, persistence, command-and-control, or exfiltration activity. For example, when a user clicks on a link in a phishing email or opens a malicious document, a request may be sent to download and run a payload from a server in a country which does not normally appear in network traffic or business work-flows. Malware instances and persistence mechanisms may communicate with command-and-control (C2) infrastructure in their country of origin, which may be an unusual destination country for the source network.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Business workflows that occur very occasionally, and involve a business relationship with an organization in a country that does not routinely appear in network events, can trigger this alert. A new business workflow with an organization in a country with which no workflows previously existed may trigger this alert - although the model will learn that the new destination country is no longer anomalous as the activity becomes ongoing. Business travelers who roam to many countries for brief periods may trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "50778b3a-641e-4322-ac7c-db86aa821e09", - "rule_id": "35f86980-1fb1-4dff-b311-3be941549c8d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "rare_destination_country" - }, - { - "name": "Potential Suspicious File Edit", - "description": "This rule monitors for the potential edit of a suspicious file. In Linux, when editing a file through an editor, a temporary .swp file is created. By monitoring for the creation of this .swp file, we can detect potential file edits of suspicious files. The execution of this rule is not a clear sign of the file being edited, as just opening the file through an editor will trigger this event. Attackers may alter any of the files added in this rule to establish persistence, escalate privileges or perform reconnaisance on the system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 1, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1037", - "name": "Boot or Logon Initialization Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/", - "subtechnique": [ - { - "id": "T1037.004", - "name": "RC Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/004/" - } - ] - }, - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.006", - "name": "Dynamic Linker Hijacking", - "reference": "https://attack.mitre.org/techniques/T1574/006/" - } - ] - }, - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.002", - "name": "Systemd Service", - "reference": "https://attack.mitre.org/techniques/T1543/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.003", - "name": "Sudo and Sudo Caching", - "reference": "https://attack.mitre.org/techniques/T1548/003/" - } - ] - } - ] - } - ], - "id": "4d57a0b8-63da-4ceb-8d2b-c08c5c2913c2", - "rule_id": "3728c08d-9b70-456b-b6b8-007c7d246128", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where event.action in (\"creation\", \"file_create_event\") and file.extension == \"swp\" and \nfile.path : (\n /* common interesting files and locations */\n \"/etc/.shadow.swp\", \"/etc/.shadow-.swp\", \"/etc/.shadow~.swp\", \"/etc/.gshadow.swp\", \"/etc/.gshadow-.swp\",\n \"/etc/.passwd.swp\", \"/etc/.pwd.db.swp\", \"/etc/.master.passwd.swp\", \"/etc/.spwd.db.swp\", \"/etc/security/.opasswd.swp\",\n \"/etc/.environment.swp\", \"/etc/.profile.swp\", \"/etc/sudoers.d/.*.swp\", \"/etc/ld.so.conf.d/.*.swp\",\n \"/etc/init.d/.*.swp\", \"/etc/.rc.local.swp\", \"/etc/rc*.d/.*.swp\", \"/dev/shm/.*.swp\", \"/etc/update-motd.d/.*.swp\",\n \"/usr/lib/update-notifier/.*.swp\",\n\n /* service, timer, want, socket and lock files */\n \"/etc/systemd/system/.*.swp\", \"/usr/local/lib/systemd/system/.*.swp\", \"/lib/systemd/system/.*.swp\",\n \"/usr/lib/systemd/system/.*.swp\",\"/home/*/.config/systemd/user/.*.swp\", \"/run/.*.swp\", \"/var/run/.*.swp/\",\n\n /* profile and shell configuration files */ \n \"/home/*.profile.swp\", \"/home/*.bash_profile.swp\", \"/home/*.bash_login.swp\", \"/home/*.bashrc.swp\", \"/home/*.bash_logout.swp\",\n \"/home/*.zshrc.swp\", \"/home/*.zlogin.swp\", \"/home/*.tcshrc.swp\", \"/home/*.kshrc.swp\", \"/home/*.config.fish.swp\",\n \"/root/*.profile.swp\", \"/root/*.bash_profile.swp\", \"/root/*.bash_login.swp\", \"/root/*.bashrc.swp\", \"/root/*.bash_logout.swp\",\n \"/root/*.zshrc.swp\", \"/root/*.zlogin.swp\", \"/root/*.tcshrc.swp\", \"/root/*.kshrc.swp\", \"/root/*.config.fish.swp\"\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Finder Sync Plugin Registered and Enabled", - "description": "Finder Sync plugins enable users to extend Finder’s functionality by modifying the user interface. Adversaries may abuse this feature by adding a rogue Finder Plugin to repeatedly execute malicious payloads for persistence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trusted Finder Sync Plugins" - ], - "references": [ - "https://github.com/specterops/presentations/raw/master/Leo%20Pitt/Hey_Im_Still_in_Here_Modern_macOS_Persistence_SO-CON2020.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/" - } - ] - } - ], - "id": "c8fd065f-1962-4e71-a715-e1c68f91403c", - "rule_id": "37f638ea-909d-4f94-9248-edd21e4a9906", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name : \"pluginkit\" and\n process.args : \"-e\" and process.args : \"use\" and process.args : \"-i\" and\n not process.args :\n (\n \"com.google.GoogleDrive.FinderSyncAPIExtension\",\n \"com.google.drivefs.findersync\",\n \"com.boxcryptor.osx.Rednif\",\n \"com.adobe.accmac.ACCFinderSync\",\n \"com.microsoft.OneDrive.FinderSync\",\n \"com.insynchq.Insync.Insync-Finder-Integration\",\n \"com.box.desktop.findersyncext\"\n ) and\n not process.parent.executable : (\n \"/Library/Application Support/IDriveforMac/IDriveHelperTools/FinderPluginApp.app/Contents/MacOS/FinderPluginApp\"\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Prompt for Credentials with OSASCRIPT", - "description": "Identifies the use of osascript to execute scripts via standard input that may prompt a user with a rogue dialog for credentials.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/EmpireProject/EmPyre/blob/master/lib/modules/collection/osx/prompt.py", - "https://ss64.com/osx/osascript.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1056", - "name": "Input Capture", - "reference": "https://attack.mitre.org/techniques/T1056/", - "subtechnique": [ - { - "id": "T1056.002", - "name": "GUI Input Capture", - "reference": "https://attack.mitre.org/techniques/T1056/002/" - } - ] - } - ] - } - ], - "id": "2c700355-f87e-4e1e-8824-09bf6ccc8b1a", - "rule_id": "38948d29-3d5d-42e3-8aec-be832aaaf8eb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name : \"osascript\" and\n process.command_line : \"osascript*display dialog*password*\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Persistence via Microsoft Outlook VBA", - "description": "Detects attempts to establish persistence on an endpoint by installing a rogue Microsoft Outlook VBA Template.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A legitimate VBA for Outlook is usually configured interactively via OUTLOOK.EXE." - ], - "references": [ - "https://www.mdsec.co.uk/2020/11/a-fresh-outlook-on-mail-based-persistence/", - "https://www.linkedin.com/pulse/outlook-backdoor-using-vba-samir-b-/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1137", - "name": "Office Application Startup", - "reference": "https://attack.mitre.org/techniques/T1137/" - } - ] - } - ], - "id": "af2ac949-f134-4b28-8c83-666043f145e8", - "rule_id": "397945f3-d39a-4e6f-8bcb-9656c2031438", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and\n file.path : \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Outlook\\\\VbaProject.OTM\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Module Loaded by LSASS", - "description": "Identifies LSASS loading an unsigned or untrusted DLL. Windows Security Support Provider (SSP) DLLs are loaded into LSSAS process at system start. Once loaded into the LSA, SSP DLLs have access to encrypted and plaintext passwords that are stored in Windows, such as any logged-on user's Domain password or smart card PINs.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.xpnsec.com/exploring-mimikatz-part-2/", - "https://github.com/jas502n/mimikat_ssp" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "96f1e40c-c276-42fc-b82b-8c0268e1cf82", - "rule_id": "3a6001a0-0939-4bbe-86f4-47d8faeb7b97", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.hash.sha256", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "library where host.os.type == \"windows\" and process.executable : \"?:\\\\Windows\\\\System32\\\\lsass.exe\" and\n not (dll.code_signature.subject_name :\n (\"Microsoft Windows\",\n \"Microsoft Corporation\",\n \"Microsoft Windows Publisher\",\n \"Microsoft Windows Software Compatibility Publisher\",\n \"Microsoft Windows Hardware Compatibility Publisher\",\n \"McAfee, Inc.\",\n \"SecMaker AB\",\n \"HID Global Corporation\",\n \"HID Global\",\n \"Apple Inc.\",\n \"Citrix Systems, Inc.\",\n \"Dell Inc\",\n \"Hewlett-Packard Company\",\n \"Symantec Corporation\",\n \"National Instruments Corporation\",\n \"DigitalPersona, Inc.\",\n \"Novell, Inc.\",\n \"gemalto\",\n \"EasyAntiCheat Oy\",\n \"Entrust Datacard Corporation\",\n \"AuriStor, Inc.\",\n \"LogMeIn, Inc.\",\n \"VMware, Inc.\",\n \"Istituto Poligrafico e Zecca dello Stato S.p.A.\",\n \"Nubeva Technologies Ltd\",\n \"Micro Focus (US), Inc.\",\n \"Yubico AB\",\n \"GEMALTO SA\",\n \"Secure Endpoints, Inc.\",\n \"Sophos Ltd\",\n \"Morphisec Information Security 2014 Ltd\",\n \"Entrust, Inc.\",\n \"Nubeva Technologies Ltd\",\n \"Micro Focus (US), Inc.\",\n \"F5 Networks Inc\",\n \"Bit4id\",\n \"Thales DIS CPL USA, Inc.\",\n \"Micro Focus International plc\",\n \"HYPR Corp\",\n \"Intel(R) Software Development Products\",\n \"PGP Corporation\",\n \"Parallels International GmbH\",\n \"FrontRange Solutions Deutschland GmbH\",\n \"SecureLink, Inc.\",\n \"Tidexa OU\",\n \"Amazon Web Services, Inc.\",\n \"SentryBay Limited\",\n \"Audinate Pty Ltd\",\n \"CyberArk Software Ltd.\",\n \"McAfeeSysPrep\",\n \"NVIDIA Corporation PE Sign v2016\") and\n dll.code_signature.status : (\"trusted\", \"errorExpired\", \"errorCode_endpoint*\", \"errorChaining\")) and\n\n not dll.hash.sha256 :\n (\"811a03a5d7c03802676d2613d741be690b3461022ea925eb6b2651a5be740a4c\",\n \"1181542d9cfd63fb00c76242567446513e6773ea37db6211545629ba2ecf26a1\",\n \"ed6e735aa6233ed262f50f67585949712f1622751035db256811b4088c214ce3\",\n \"26be2e4383728eebe191c0ab19706188f0e9592add2e0bf86b37442083ae5e12\",\n \"9367e78b84ef30cf38ab27776605f2645e52e3f6e93369c674972b668a444faa\",\n \"d46cc934765c5ecd53867070f540e8d6f7701e834831c51c2b0552aba871921b\",\n \"0f77a3826d7a5cd0533990be0269d951a88a5c277bc47cff94553330b715ec61\",\n \"4aca034d3d85a9e9127b5d7a10882c2ef4c3e0daa3329ae2ac1d0797398695fb\",\n \"86031e69914d9d33c34c2f4ac4ae523cef855254d411f88ac26684265c981d95\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Azure Full Network Packet Capture Detected", - "description": "Identifies potential full network packet capture in Azure. Packet Capture is an Azure Network Watcher feature that can be used to inspect network traffic. This feature can potentially be abused to read sensitive data from unencrypted internal traffic.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 103, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Full Network Packet Capture may be done by a system or network administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Full Network Packet Capture from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1040", - "name": "Network Sniffing", - "reference": "https://attack.mitre.org/techniques/T1040/" - } - ] - } - ], - "id": "73453bdc-4189-4cf9-bad0-97698e31b3cb", - "rule_id": "3ad77ed4-4dcf-4c51-8bfc-e3f7ce316b2f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\n (\n MICROSOFT.NETWORK/*/STARTPACKETCAPTURE/ACTION or\n MICROSOFT.NETWORK/*/VPNCONNECTIONS/STARTPACKETCAPTURE/ACTION or\n MICROSOFT.NETWORK/*/PACKETCAPTURES/WRITE\n ) and\nevent.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Unusual Linux Network Port Activity", - "description": "Identifies unusual destination port activity that can indicate command-and-control, persistence mechanism, or data exfiltration activity. Rarely used destination port activity is generally unusual in Linux fleets, and can indicate unauthorized access or threat actor activity.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program or one that rarely uses the network could trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "f45fb3f1-28f2-4854-9009-43430b65d01c", - "rule_id": "3c7e32e6-6104-46d9-a06e-da0f8b5795a0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_linux_anomalous_network_port_activity" - ] - }, - { - "name": "Suspicious Execution via Windows Subsystem for Linux", - "description": "Detects Linux Bash commands from the the Windows Subsystem for Linux. Adversaries may enable and use WSL for Linux to avoid detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.f-secure.com/hunting-for-windows-subsystem-for-linux/", - "https://lolbas-project.github.io/lolbas/OtherMSBinaries/Wsl/", - "https://blog.qualys.com/vulnerabilities-threat-research/2022/03/22/implications-of-windows-subsystem-for-linux-for-adversaries-defenders-part-1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1202", - "name": "Indirect Command Execution", - "reference": "https://attack.mitre.org/techniques/T1202/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "96b441c5-b17c-401c-a153-57abddc1f5a1", - "rule_id": "3e0eeb75-16e8-4f2f-9826-62461ca128b7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type : \"start\" and\n (\n ((process.executable : \"?:\\\\Windows\\\\System32\\\\bash.exe\" or process.pe.original_file_name == \"Bash.exe\") and \n not process.command_line : (\"bash\", \"bash.exe\")) or \n process.executable : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Packages\\\\*\\\\rootfs\\\\usr\\\\bin\\\\bash\" or \n (process.parent.name : \"wsl.exe\" and process.parent.command_line : \"bash*\" and not process.name : \"wslhost.exe\") or \n (process.name : \"wsl.exe\" and process.args : (\"curl\", \"/etc/shadow\", \"/etc/passwd\", \"cat\",\"--system\", \"root\", \"-e\", \"--exec\", \"bash\", \"/mnt/c/*\"))\n ) and \n not process.parent.executable : (\"?:\\\\Program Files\\\\Docker\\\\*.exe\", \"?:\\\\Program Files (x86)\\\\Docker\\\\*.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Emond Child Process", - "description": "Identifies the execution of a suspicious child process of the Event Monitor Daemon (emond). Adversaries may abuse this service by writing a rule to execute commands when a defined event occurs, such as system start up or user authentication.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.xorrior.com/emond-persistence/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.014", - "name": "Emond", - "reference": "https://attack.mitre.org/techniques/T1546/014/" - } - ] - } - ] - } - ], - "id": "d0e9bbdd-7ee8-4165-b389-2eb5f9f78f59", - "rule_id": "3e3d15c6-1509-479a-b125-21718372157e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.parent.name : \"emond\" and\n process.name : (\n \"bash\",\n \"dash\",\n \"sh\",\n \"tcsh\",\n \"csh\",\n \"zsh\",\n \"ksh\",\n \"fish\",\n \"Python\",\n \"python*\",\n \"perl*\",\n \"php*\",\n \"osascript\",\n \"pwsh\",\n \"curl\",\n \"wget\",\n \"cp\",\n \"mv\",\n \"touch\",\n \"echo\",\n \"base64\",\n \"launchctl\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "EggShell Backdoor Execution", - "description": "Identifies the execution of and EggShell Backdoor. EggShell is a known post exploitation tool for macOS and Linux.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/neoneggplant/EggShell" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.006", - "name": "Python", - "reference": "https://attack.mitre.org/techniques/T1059/006/" - } - ] - } - ] - } - ], - "id": "0c1e9d64-04eb-420c-b57d-3d73348cbda1", - "rule_id": "41824afb-d68c-4d0e-bfee-474dac1fa56e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and event.type:(process_started or start) and process.name:espl and process.args:eyJkZWJ1ZyI6*\n", - "language": "kuery" - }, - { - "name": "Potential Hidden Local User Account Creation", - "description": "Identifies attempts to create a local account that will be hidden from the macOS logon window. This may indicate an attempt to evade user attention while maintaining persistence using a separate local account.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://support.apple.com/en-us/HT203998" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.003", - "name": "Local Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/003/" - } - ] - } - ] - } - ], - "id": "435b3bf0-a74f-44cc-a489-05a3ae94cdde", - "rule_id": "41b638a1-8ab6-4f8e-86d9-466317ef2db5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:dscl and process.args:(IsHidden and create and (true or 1 or yes))\n", - "language": "kuery" - }, - { - "name": "Process Creation via Secondary Logon", - "description": "Identifies process creation with alternate credentials. Adversaries may create a new process with a different token to escalate privileges and bypass access controls.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://attack.mitre.org/techniques/T1134/002/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/", - "subtechnique": [ - { - "id": "T1134.002", - "name": "Create Process with Token", - "reference": "https://attack.mitre.org/techniques/T1134/002/" - }, - { - "id": "T1134.003", - "name": "Make and Impersonate Token", - "reference": "https://attack.mitre.org/techniques/T1134/003/" - } - ] - } - ] - } - ], - "id": "68fa2d2b-87fa-4f1d-9eb4-b12315314cbf", - "rule_id": "42eeee3d-947f-46d3-a14d-7036b962c266", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.LogonProcessName", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetLogonId", - "type": "keyword", - "ecs": false - } - ], - "setup": "Audit events 4624 and 4688 are needed to trigger this rule.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "sequence by winlog.computer_name with maxspan=1m\n\n[authentication where event.action:\"logged-in\" and\n event.outcome == \"success\" and user.id : (\"S-1-5-21-*\", \"S-1-12-1-*\") and\n\n /* seclogon service */\n process.name == \"svchost.exe\" and\n winlog.event_data.LogonProcessName : \"seclogo*\" and source.ip == \"::1\" ] by winlog.event_data.TargetLogonId\n\n[process where event.type == \"start\"] by winlog.event_data.TargetLogonId\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Unusual Login Activity", - "description": "Identifies an unusually high number of authentication attempts.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Identity and Access Audit", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Security audits may trigger this alert. Conditions that generate bursts of failed logins, such as misconfigured applications or account lockouts could trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "ebc4b6d1-7730-4bba-af1d-c0b808f5dcd2", - "rule_id": "4330272b-9724-4bc6-a3ca-f1532b81e5c2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": "suspicious_login_activity" - }, - { - "name": "Unusual Windows Path Activity", - "description": "Identifies processes started from atypical folders in the file system, which might indicate malware execution or persistence mechanisms. In corporate Windows environments, software installation is centrally managed and it is unusual for programs to be executed from user or temporary directories. Processes executed from these locations can denote that a user downloaded software directly from the Internet or a malicious script or macro executed malware.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Persistence", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A new and unusual program or artifact download in the course of software upgrades, debugging, or troubleshooting could trigger this alert. Users downloading and running programs from unusual locations, such as temporary directories, browser caches, or profile paths could trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1204", - "name": "User Execution", - "reference": "https://attack.mitre.org/techniques/T1204/", - "subtechnique": [ - { - "id": "T1204.002", - "name": "Malicious File", - "reference": "https://attack.mitre.org/techniques/T1204/002/" - } - ] - } - ] - } - ], - "id": "78ac2ec9-bd9e-42a3-b50e-d06672c3b44d", - "rule_id": "445a342e-03fb-42d0-8656-0367eb2dead5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_windows_anomalous_path_activity" - ] - }, - { - "name": "Windows Event Logs Cleared", - "description": "Identifies attempts to clear Windows event log stores. This is often done by attackers in an attempt to evade detection or destroy forensic evidence on a system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Windows Event Logs Cleared\n\nWindows event logs are a fundamental data source for security monitoring, forensics, and incident response. Adversaries can tamper, clear, and delete this data to break SIEM detections, cover their tracks, and slow down incident response.\n\nThis rule looks for the occurrence of clear actions on the `security` event log.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Investigate the event logs prior to the action for suspicious behaviors that an attacker may be trying to cover up.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n - This activity is potentially done after the adversary achieves its objectives on the host. Ensure that previous actions, if any, are investigated accordingly with their response playbooks.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Anabella Cristaldi" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.001", - "name": "Clear Windows Event Logs", - "reference": "https://attack.mitre.org/techniques/T1070/001/" - } - ] - } - ] - } - ], - "id": "bbc60a41-024f-4835-9390-f0273719e690", - "rule_id": "45ac4800-840f-414c-b221-53dd36a5aaf7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.api", - "type": "keyword", - "ecs": false - } - ], - "setup": "", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.action:(\"audit-log-cleared\" or \"Log clear\") and winlog.api:\"wineventlog\"\n", - "language": "kuery" - }, - { - "name": "Unusual Process For a Linux Host", - "description": "Identifies rare processes that do not usually run on individual hosts, which can indicate execution of unauthorized services, malware, or persistence mechanisms. Processes are considered rare when they only run occasionally as compared with other processes running on the host.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Process For a Linux Host\n\nSearching for abnormal Linux processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.\n\nThis rule uses a machine learning job to detect a Linux process that is rare and unusual for an individual Linux host in your environment.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, and whether they are located in expected locations.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.\n- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.002", - "name": "Systemd Service", - "reference": "https://attack.mitre.org/techniques/T1543/002/" - } - ] - } - ] - } - ], - "id": "5903acfb-3841-4b0b-b44d-b232b5c01329", - "rule_id": "46f804f5-b289-43d6-a881-9387cf594f75", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_rare_process_by_host_linux" - ] - }, - { - "name": "Apple Script Execution followed by Network Connection", - "description": "Detects execution via the Apple script interpreter (osascript) followed by a network connection from the same process within a short time period. Adversaries may use malicious scripts for execution and command and control.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/index.html", - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.002", - "name": "AppleScript", - "reference": "https://attack.mitre.org/techniques/T1059/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - } - ], - "id": "c1c5e363-1140-4c52-b94d-2c8667aac582", - "rule_id": "47f76567-d58a-4fed-b32b-21f571e28910", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=30s\n [process where host.os.type == \"macos\" and event.type == \"start\" and process.name == \"osascript\"]\n [network where host.os.type == \"macos\" and event.type != \"end\" and process.name == \"osascript\" and destination.ip != \"::1\" and\n not cidrmatch(destination.ip,\n \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\", \"192.0.0.0/29\", \"192.0.0.8/32\",\n \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\", \"192.0.2.0/24\", \"192.31.196.0/24\",\n \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\", \"192.175.48.0/24\",\n \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\", \"FE80::/10\", \"FF00::/8\")]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Unexpected Child Process of macOS Screensaver Engine", - "description": "Identifies when a child process is spawned by the screensaver engine process, which is consistent with an attacker's malicious payload being executed after the screensaver activated on the endpoint. An adversary can maintain persistence on a macOS endpoint by creating a malicious screensaver (.saver) file and configuring the screensaver plist file to execute code each time the screensaver is activated.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n- Analyze the descendant processes of the ScreenSaverEngine process for malicious code and suspicious behavior such\nas a download of a payload from a server.\n- Review the installed and activated screensaver on the host. Triage the screensaver (.saver) file that was triggered to\nidentify whether the file is malicious or not.", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://posts.specterops.io/saving-your-access-d562bf5bf90b", - "https://github.com/D00MFist/PersistentJXA" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.002", - "name": "Screensaver", - "reference": "https://attack.mitre.org/techniques/T1546/002/" - } - ] - } - ] - } - ], - "id": "165d86c2-563f-4706-a10c-6b60332b5b55", - "rule_id": "48d7f54d-c29e-4430-93a9-9db6b5892270", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type == \"start\" and process.parent.name == \"ScreenSaverEngine\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Persistence via Periodic Tasks", - "description": "Identifies the creation or modification of the default configuration for periodic tasks. Adversaries may abuse periodic tasks to execute malicious code or maintain persistence.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://opensource.apple.com/source/crontabs/crontabs-13/private/etc/defaults/periodic.conf.auto.html", - "https://www.oreilly.com/library/view/mac-os-x/0596003706/re328.html", - "https://github.com/D00MFist/PersistentJXA/blob/master/PeriodicPersist.js" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.003", - "name": "Cron", - "reference": "https://attack.mitre.org/techniques/T1053/003/" - } - ] - } - ] - } - ], - "id": "f630d15e-58d8-419b-9749-237ee1a3049f", - "rule_id": "48ec9452-e1fd-4513-a376-10a1a26d2c83", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:file and host.os.type:macos and not event.type:\"deletion\" and\n file.path:(/private/etc/periodic/* or /private/etc/defaults/periodic.conf or /private/etc/periodic.conf)\n", - "language": "kuery" - }, - { - "name": "Application Removed from Blocklist in Google Workspace", - "description": "Google Workspace administrators may be aware of malicious applications within the Google marketplace and block these applications for user security purposes. An adversary, with administrative privileges, may remove this application from the explicit block list to allow distribution of the application amongst users. This may also indicate the unauthorized use of an application that had been previously blocked before by a user with admin privileges.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Application Removed from Blocklist in Google Workspace\n\nGoogle Workspace Marketplace is an online store for free and paid web applications that work with Google Workspace services and third-party software. Listed applications are based on Google APIs or Google Apps Script and created by both Google and third-party developers.\n\nMarketplace applications require access to specific Google Workspace resources. Individual users with the appropriate permissions can install applications in their Google Workspace domain. Administrators have additional permissions that allow them to install applications for an entire Google Workspace domain. Consent screens typically display permissions and privileges the user needs to install an application. As a result, malicious Marketplace applications may require more permissions than necessary or have malicious intent.\n\nGoogle clearly states that they are not responsible for any Marketplace product that originates from a source that isn't Google.\n\nThis rule identifies a Marketplace blocklist update that consists of a Google Workspace account with administrative privileges manually removing a previously blocked application.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- This rule relies on data from `google_workspace.admin`, thus indicating the associated user has administrative privileges to the Marketplace.\n- With access to the Google Workspace admin console, visit the `Security > Investigation` tool with filters for the user email and event is `Assign Role` or `Update Role` to determine if new cloud roles were recently updated.\n- After identifying the involved user account, review other potentially related events within the last 48 hours.\n- Re-assess the permissions and reviews of the Marketplace applications to determine if they violate organizational policies or introduce unexpected risks.\n- With access to the Google Workspace admin console, determine if the application was installed domain-wide or individually by visiting `Apps > Google Workspace Marketplace Apps`.\n\n### False positive analysis\n\n- Google Workspace administrators might intentionally remove an application from the blocklist due to a re-assessment or a domain-wide required need for the application.\n- Identify the user account associated with this action and assess their administrative privileges with Google Workspace Marketplace.\n- Contact the user to verify that they intentionally removed the application from the blocklist and their reasoning.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 106, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Configuration Audit", - "Resources: Investigation Guide", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Applications can be added and removed from blocklists by Google Workspace administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://support.google.com/a/answer/6328701?hl=en#" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "09590899-c372-47c8-af24-0725d4d8a0ef", - "rule_id": "495e5f2e-2480-11ed-bea8-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.admin.application.name", - "type": "keyword", - "ecs": false - }, - { - "name": "google_workspace.admin.new_value", - "type": "keyword", - "ecs": false - }, - { - "name": "google_workspace.admin.old_value", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:\"google_workspace.admin\" and event.category:\"iam\" and event.type:\"change\" and\n event.action:\"CHANGE_APPLICATION_SETTING\" and\n google_workspace.admin.application.name:\"Google Workspace Marketplace\" and\n google_workspace.admin.old_value: *allowed*false* and google_workspace.admin.new_value: *allowed*true*\n", - "language": "kuery" - }, - { - "name": "Process Discovery Using Built-in Tools", - "description": "This rule identifies the execution of commands that can be used to enumerate running processes. Adversaries may enumerate processes to identify installed applications and security solutions.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1057", - "name": "Process Discovery", - "reference": "https://attack.mitre.org/techniques/T1057/" - } - ] - } - ], - "id": "b0e5676f-b378-4db9-bb24-af3dd31319c1", - "rule_id": "4982ac3e-d0ee-4818-b95d-d9522d689259", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n process.name :(\"PsList.exe\", \"qprocess.exe\") or \n (process.name : \"powershell.exe\" and process.args : (\"*get-process*\", \"*Win32_Process*\")) or \n (process.name : \"wmic.exe\" and process.args : (\"process\", \"*Win32_Process*\")) or\n (process.name : \"tasklist.exe\" and not process.args : (\"pid eq*\")) or\n (process.name : \"query.exe\" and process.args : \"process\")\n ) and not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Unauthorized Access via Wildcard Injection Detected", - "description": "This rule monitors for the execution of the \"chown\" and \"chmod\" commands with command line flags that could indicate a wildcard injection attack. Linux wildcard injection is a type of security vulnerability where attackers manipulate commands or input containing wildcards (e.g., *, ?, []) to execute unintended operations or access sensitive data by tricking the system into interpreting the wildcard characters in unexpected ways.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.exploit-db.com/papers/33930" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.008", - "name": "/etc/passwd and /etc/shadow", - "reference": "https://attack.mitre.org/techniques/T1003/008/" - } - ] - } - ] - } - ], - "id": "29893c51-68fe-43cb-b35e-e1856f878c5e", - "rule_id": "4a99ac6f-9a54-4ba5-a64f-6eb65695841b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and event.type == \"start\" and \nprocess.name in (\"chown\", \"chmod\") and process.args == \"-R\" and process.args : \"--reference=*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Disable Windows Firewall Rules via Netsh", - "description": "Identifies use of the netsh.exe to disable or weaken the local firewall. Attackers will use this command line tool to disable the firewall during troubleshooting or to enable network mobility.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Disable Windows Firewall Rules via Netsh\n\nThe Windows Defender Firewall is a native component which provides host-based, two-way network traffic filtering for a device, and blocks unauthorized network traffic flowing into or out of the local device.\n\nAttackers can disable the Windows firewall or its rules to enable lateral movement and command and control activity.\n\nThis rule identifies patterns related to disabling the Windows firewall or its rules using the `netsh.exe` utility.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the user to check if they are aware of the operation.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Check whether the user is an administrator and is legitimately performing troubleshooting.\n- In case of an allowed benign true positive (B-TP), assess adding rules to allow needed traffic and re-enable the firewall.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.004", - "name": "Disable or Modify System Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/004/" - } - ] - } - ] - } - ], - "id": "6a7e0b12-5935-4e7c-bd9b-b271ca88ed89", - "rule_id": "4b438734-3793-4fda-bd42-ceeada0be8f9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"netsh.exe\" and\n (\n (process.args : \"disable\" and process.args : \"firewall\" and process.args : \"set\") or\n (process.args : \"advfirewall\" and process.args : \"off\" and process.args : \"state\")\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Container Workload Protection", - "description": "Generates a detection alert each time a 'Container Workload Protection' alert is received. Enabling this rule allows you to immediately begin triaging and investigating these alerts.", - "risk_score": 47, - "severity": "medium", - "rule_name_override": "message", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container" - ], - "enabled": true, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-10m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [], - "id": "e9244e0e-f156-4851-817f-30de0dbedcb5", - "rule_id": "4b4e9c99-27ea-4621-95c8-82341bc6e512", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "logs-cloud_defend.alerts-*" - ], - "query": "event.kind:alert and event.module:cloud_defend\n", - "language": "kuery" - }, - { - "name": "Unusual Process Execution Path - Alternate Data Stream", - "description": "Identifies processes running from an Alternate Data Stream. This is uncommon for legitimate processes and sometimes done by adversaries to hide malware.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1564", - "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/", - "subtechnique": [ - { - "id": "T1564.004", - "name": "NTFS File Attributes", - "reference": "https://attack.mitre.org/techniques/T1564/004/" - } - ] - } - ] - } - ], - "id": "fc21c647-81f8-49ac-806b-b63449f2849d", - "rule_id": "4bd1c1af-79d4-4d37-9efa-6e0240640242", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.args : \"?:\\\\*:*\" and process.args_count == 1\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "PowerShell Share Enumeration Script", - "description": "Detects scripts that contain PowerShell functions, structures, or Windows API functions related to windows share enumeration activities. Attackers, mainly ransomware groups, commonly identify and inspect network shares, looking for critical information for encryption and/or exfiltration.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Share Enumeration Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can use PowerShell to enumerate shares to search for sensitive data like documents, scripts, and other kinds of valuable data for encryption, exfiltration, and lateral movement.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Check for additional PowerShell and command line logs that indicate that imported functions were run.\n - Evaluate which information was potentially mapped and accessed by the attacker.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Tactic: Collection", - "Tactic: Execution", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.advintel.io/post/hunting-for-corporate-insurance-policies-indicators-of-ransom-exfiltrations", - "https://thedfirreport.com/2022/04/04/stolen-images-campaign-ends-in-conti-ransomware/", - "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1135", - "name": "Network Share Discovery", - "reference": "https://attack.mitre.org/techniques/T1135/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - }, - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1039", - "name": "Data from Network Shared Drive", - "reference": "https://attack.mitre.org/techniques/T1039/" - } - ] - } - ], - "id": "159a03c4-b1bc-4eb7-bf1f-d6082f45e63f", - "rule_id": "4c59cff1-b78a-41b8-a9f1-4231984d1fb6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be configured (Enable).\n\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text:(\n \"Invoke-ShareFinder\" or\n \"Invoke-ShareFinderThreaded\" or\n (\n \"shi1_netname\" and\n \"shi1_remark\"\n ) or\n (\n \"NetShareEnum\" and\n \"NetApiBufferFree\"\n )\n ) and not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "Attempt to Disable Gatekeeper", - "description": "Detects attempts to disable Gatekeeper on macOS. Gatekeeper is a security feature that's designed to ensure that only trusted software is run. Adversaries may attempt to disable Gatekeeper before executing malicious code.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://support.apple.com/en-us/HT202491", - "https://community.carbonblack.com/t5/Threat-Advisories-Documents/TAU-TIN-Shlayer-OSX/ta-p/68397" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1553", - "name": "Subvert Trust Controls", - "reference": "https://attack.mitre.org/techniques/T1553/" - } - ] - } - ], - "id": "3cb3c164-8926-4f31-b200-6a71360201bb", - "rule_id": "4da13d6e-904f-4636-81d8-6ab14b4e6ae9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.args:(spctl and \"--master-disable\")\n", - "language": "kuery" - }, - { - "name": "Windows System Information Discovery", - "description": "Detects the execution of commands used to discover information about the system, which attackers may use after compromising a system to gain situational awareness.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend", - "Data Source: Elastic Endgame" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "7dd61fc0-b22b-423f-b5ea-6d486895fb5d", - "rule_id": "51176ed2-2d90-49f2-9f3d-17196428b169", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(\n (\n process.name : \"cmd.exe\" and process.args : \"ver*\" and not\n process.parent.executable : (\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Keybase\\\\upd.exe\",\n \"?:\\\\Users\\\\*\\\\python*.exe\"\n )\n ) or \n process.name : (\"systeminfo.exe\", \"hostname.exe\") or \n (process.name : \"wmic.exe\" and process.args : \"os\" and process.args : \"get\")\n) and not\nprocess.parent.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\ProgramData\\\\*\"\n) and not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Successful Linux RDP Brute Force Attack Detected", - "description": "An RDP (Remote Desktop Protocol) brute force attack involves an attacker repeatedly attempting various username and password combinations to gain unauthorized access to a remote computer via RDP, and if successful, the potential impact can include unauthorized control over the compromised system, data theft, or the ability to launch further attacks within the network, jeopardizing the security and confidentiality of the targeted system and potentially compromising the entire network infrastructure. This rule identifies multiple consecutive authentication failures targeting a specific user account within a short time interval, followed by a successful authentication.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/", - "subtechnique": [ - { - "id": "T1110.001", - "name": "Password Guessing", - "reference": "https://attack.mitre.org/techniques/T1110/001/" - }, - { - "id": "T1110.003", - "name": "Password Spraying", - "reference": "https://attack.mitre.org/techniques/T1110/003/" - } - ] - } - ] - } - ], - "id": "48e672d9-4272-4bb8-bd77-9d20a7ef3646", - "rule_id": "521fbe5c-a78d-4b6b-a323-f978b0e4c4c0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0", - "integration": "auditd" - } - ], - "required_fields": [ - { - "name": "auditd.data.terminal", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "related.user", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Auditbeat integration, or Auditd Manager integration.\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n### Auditd Manager Integration Setup\nThe Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.\nAuditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.\n\n#### The following steps should be executed in order to add the Elastic Agent System integration \"auditd_manager\" on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Auditd Manager and select the integration to see more details about it.\n- Click Add Auditd Manager.\n- Configure the integration name and optionally add a description.\n- Review optional and advanced settings accordingly.\n- Add the newly installed `auditd manager` to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.\n- Click Save and Continue.\n- For more details on the integeration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).\n\n#### Rule Specific Setup Note\nAuditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.\nHowever, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n- For this detection rule no additional audit rules are required to be added to the integration.\n\n", - "type": "eql", - "query": "sequence by host.id, related.user with maxspan=5s\n [authentication where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n event.action == \"authenticated\" and auditd.data.terminal : \"*rdp*\" and event.outcome == \"failure\"] with runs=10\n [authentication where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n event.action == \"authenticated\" and auditd.data.terminal : \"*rdp*\" and event.outcome == \"success\"] | tail 1\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-auditd_manager.auditd-*" - ] - }, - { - "name": "Unusual Network Connection via RunDLL32", - "description": "Identifies unusual instances of rundll32.exe making outbound network connections. This may indicate adversarial Command and Control activity.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Network Connection via RunDLL32\n\nRunDLL32 is a built-in Windows utility and also a vital component used by the operating system itself. The functionality provided by RunDLL32 to execute Dynamic Link Libraries (DLLs) is widely abused by attackers, because it makes it hard to differentiate malicious activity from normal operations.\n\nThis rule looks for external network connections established using RunDLL32 when the utility is being executed with no arguments, which can potentially indicate command and control activity.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the target host that RunDLL32 is communicating with.\n - Check if the domain is newly registered or unexpected.\n - Check the reputation of the domain or IP address.\n- Identify the target computer and its role in the IT environment.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Command and Control", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml", - "https://redcanary.com/threat-detection-report/techniques/rundll32/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.011", - "name": "Rundll32", - "reference": "https://attack.mitre.org/techniques/T1218/011/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/", - "subtechnique": [ - { - "id": "T1071.001", - "name": "Web Protocols", - "reference": "https://attack.mitre.org/techniques/T1071/001/" - } - ] - } - ] - } - ], - "id": "af6f2938-34c1-41d9-b686-43241ff99ff4", - "rule_id": "52aaab7b-b51c-441a-89ce-4387b3aea886", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=1m\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"rundll32.exe\" and process.args_count == 1]\n [network where host.os.type == \"windows\" and process.name : \"rundll32.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Unusual Linux Network Activity", - "description": "Identifies Linux processes that do not usually use the network but have unexpected network activity, which can indicate command-and-control, lateral movement, persistence, or data exfiltration activity. A process with unusual network activity can denote process exploitation or injection, where the process is used to run persistence mechanisms that allow a malicious actor remote access or control of the host, data exfiltration, and execution of unauthorized network applications.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Network Activity\nDetection alerts from this rule indicate the presence of network activity from a Linux process for which network activity is rare and unusual. Here are some possible avenues of investigation:\n- Consider the IP addresses and ports. Are these used by normal but infrequent network workflows? Are they expected or unexpected?\n- If the destination IP address is remote or external, does it associate with an expected domain, organization or geography? Note: avoid interacting directly with suspected malicious IP addresses.\n- Consider the user as identified by the username field. Is this network activity part of an expected workflow for the user who ran the program?\n- Examine the history of execution. If this process only manifested recently, it might be part of a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business or maintenance process.\n- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks it is performing.", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "2f4f57c9-10ee-4b49-91bb-5a08268095a4", - "rule_id": "52afbdc5-db15-485e-bc24-f5707f820c4b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_linux_anomalous_network_activity" - ] - }, - { - "name": "Suspicious CronTab Creation or Modification", - "description": "Identifies attempts to create or modify a crontab via a process that is not crontab (i.e python, osascript, etc.). This activity should not be highly prevalent and could indicate the use of cron as a persistence mechanism by a threat actor.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://taomm.org/PDFs/vol1/CH%200x02%20Persistence.pdf", - "https://theevilbit.github.io/beyond/beyond_0004/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.003", - "name": "Cron", - "reference": "https://attack.mitre.org/techniques/T1053/003/" - } - ] - } - ] - } - ], - "id": "904a6c05-5dd6-4d76-9dd4-45bf965bcafe", - "rule_id": "530178da-92ea-43ce-94c2-8877a826783d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"macos\" and event.type != \"deletion\" and process.name != null and\n file.path : \"/private/var/at/tabs/*\" and not process.executable == \"/usr/bin/crontab\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Network Logon Provider Registry Modification", - "description": "Identifies the modification of the network logon provider registry. Adversaries may register a rogue network logon provider module for persistence and/or credential access via intercepting the authentication credentials in clear text during user logon.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Authorized third party network logon providers." - ], - "references": [ - "https://github.com/gtworek/PSBits/tree/master/PasswordStealing/NPPSpy", - "https://docs.microsoft.com/en-us/windows/win32/api/npapi/nf-npapi-nplogonnotify" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1556", - "name": "Modify Authentication Process", - "reference": "https://attack.mitre.org/techniques/T1556/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/" - } - ] - } - ], - "id": "b271c9cf-1385-4efa-804f-4a866e9afb8e", - "rule_id": "54c3d186-0461-4dc3-9b33-2dc5c7473936", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and registry.data.strings != null and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\NetworkProvider\\\\ProviderPath\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\NetworkProvider\\\\ProviderPath\"\n ) and\n /* Excluding default NetworkProviders RDPNP, LanmanWorkstation and webclient. */\n not ( user.id : \"S-1-5-18\" and\n registry.data.strings in\n (\"%SystemRoot%\\\\System32\\\\ntlanman.dll\",\n \"%SystemRoot%\\\\System32\\\\drprov.dll\",\n \"%SystemRoot%\\\\System32\\\\davclnt.dll\")\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Windows Service Installed via an Unusual Client", - "description": "Identifies the creation of a Windows service by an unusual client process. Services may be created with administrator privileges but are executed under SYSTEM privileges, so an adversary may also use a service to escalate privileges from administrator to SYSTEM.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.x86matthew.com/view_post?id=create_svc_rpc", - "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4697", - "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0100_windows_audit_security_system_extension.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - } - ], - "id": "47e3ce69-7a25-48fb-a251-221e4d0be865", - "rule_id": "55c2bf58-2a39-4c58-a384-c8b1978153c2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.ClientProcessId", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.ParentProcessId", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'Audit Security System Extension' logging policy must be configured for (Success)\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nSystem >\nAudit Security System Extension (Success)\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.action:\"service-installed\" and\n (winlog.event_data.ClientProcessId:\"0\" or winlog.event_data.ParentProcessId:\"0\")\n", - "language": "kuery" - }, - { - "name": "Potential Admin Group Account Addition", - "description": "Identifies attempts to add an account to the admin group via the command line. This could be an indication of privilege escalation activity.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://managingosx.wordpress.com/2010/01/14/add-a-user-to-the-admin-group-via-command-line-3-0/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.003", - "name": "Local Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/003/" - } - ] - } - ] - } - ], - "id": "5eb8da04-028e-4d24-b405-11b437944aaa", - "rule_id": "565c2b44-7a21-4818-955f-8d4737967d2e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:(dscl or dseditgroup) and process.args:((\"/Groups/admin\" or admin) and (\"-a\" or \"-append\"))\n", - "language": "kuery" - }, - { - "name": "Dumping of Keychain Content via Security Command", - "description": "Adversaries may dump the content of the keychain storage data from a system to acquire credentials. Keychains are the built-in way for macOS to keep track of users' passwords and credentials for many services and features, including Wi-Fi and website passwords, secure notes, certificates, and Kerberos.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://ss64.com/osx/security.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/", - "subtechnique": [ - { - "id": "T1555.001", - "name": "Keychain", - "reference": "https://attack.mitre.org/techniques/T1555/001/" - } - ] - } - ] - } - ], - "id": "ab7c74cb-d263-4178-88d1-f19eb0496729", - "rule_id": "565d6ca5-75ba-4c82-9b13-add25353471c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.args : \"dump-keychain\" and process.args : \"-d\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Remote SSH Login Enabled via systemsetup Command", - "description": "Detects use of the systemsetup command to enable remote SSH Login.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://documents.trendmicro.com/assets/pdf/XCSSET_Technical_Brief.pdf", - "https://ss64.com/osx/systemsetup.html", - "https://support.apple.com/guide/remote-desktop/about-systemsetup-apd95406b8d/mac" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.004", - "name": "SSH", - "reference": "https://attack.mitre.org/techniques/T1021/004/" - } - ] - } - ] - } - ], - "id": "902dbd9a-b275-4db7-920a-ddea11124bb6", - "rule_id": "5ae4e6f8-d1bf-40fa-96ba-e29645e1e4dc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:systemsetup and\n process.args:(\"-setremotelogin\" and on) and\n not process.parent.executable : /usr/local/jamf/bin/jamf\n", - "language": "kuery" - }, - { - "name": "SUID/SGUID Enumeration Detected", - "description": "This rule monitors for the usage of the \"find\" command in conjunction with SUID and SGUID permission arguments. SUID (Set User ID) and SGID (Set Group ID) are special permissions in Linux that allow a program to execute with the privileges of the file owner or group, respectively, rather than the privileges of the user running the program. In case an attacker is able to enumerate and find a binary that is misconfigured, they might be able to leverage this misconfiguration to escalate privileges by exploiting vulnerabilities or built-in features in the privileged program.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1083", - "name": "File and Directory Discovery", - "reference": "https://attack.mitre.org/techniques/T1083/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.001", - "name": "Setuid and Setgid", - "reference": "https://attack.mitre.org/techniques/T1548/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - } - ], - "id": "9001b4a7-47c0-48bd-a45f-1dc2a9751583", - "rule_id": "5b06a27f-ad72-4499-91db-0c69667bffa5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "group.Ext.real.id", - "type": "unknown", - "ecs": false - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.Ext.real.id", - "type": "unknown", - "ecs": false - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and \nprocess.name == \"find\" and process.args : \"-perm\" and process.args : (\n \"/6000\", \"-6000\", \"/4000\", \"-4000\", \"/2000\", \"-2000\", \"/u=s\", \"-u=s\", \"/g=s\", \"-g=s\", \"/u=s,g=s\", \"/g=s,u=s\"\n) and not (\n user.Ext.real.id == \"0\" or group.Ext.real.id == \"0\" or process.args_count >= 12 or \n (process.args : \"/usr/bin/pkexec\" and process.args : \"-xdev\" and process.args_count == 7)\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious PrintSpooler Service Executable File Creation", - "description": "Detects attempts to exploit privilege escalation vulnerabilities related to the Print Spooler service. For more information refer to the following CVE's - CVE-2020-1048, CVE-2020-1337 and CVE-2020-1300 and verify that the impacted system is patched.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://voidsec.com/cve-2020-1337-printdemon-is-dead-long-live-printdemon/", - "https://www.thezdi.com/blog/2020/7/8/cve-2020-1300-remote-code-execution-through-microsoft-windows-cab-files" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "8ccc129d-f4ff-4048-ac47-982acc361628", - "rule_id": "5bb4a95d-5a08-48eb-80db-4c3a63ec78a8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n process.name : \"spoolsv.exe\" and file.extension : \"dll\" and\n file.path : (\"?:\\\\Windows\\\\System32\\\\*\", \"?:\\\\Windows\\\\SysWOW64\\\\*\") and\n not file.path :\n (\"?:\\\\WINDOWS\\\\SysWOW64\\\\PrintConfig.dll\",\n \"?:\\\\WINDOWS\\\\system32\\\\x5lrs.dll\",\n \"?:\\\\WINDOWS\\\\sysWOW64\\\\x5lrs.dll\",\n \"?:\\\\WINDOWS\\\\system32\\\\PrintConfig.dll\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Unusual Linux Process Discovery Activity", - "description": "Looks for commands related to system process discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used by a threat actor to engage in system process discovery in order to increase their understanding of software applications running on a target host or network. This may be a precursor to selection of a persistence mechanism or a method of privilege elevation.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Discovery" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon user command activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1057", - "name": "Process Discovery", - "reference": "https://attack.mitre.org/techniques/T1057/" - } - ] - } - ], - "id": "769496f2-683e-4856-9c4f-08f75f7f8a30", - "rule_id": "5c983105-4681-46c3-9890-0c66d05e776b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_linux_system_process_discovery" - ] - }, - { - "name": "User Added to Privileged Group", - "description": "Identifies a user being added to a privileged group in Active Directory. Privileged accounts and groups in Active Directory are those to which powerful rights, privileges, and permissions are granted that allow them to perform nearly any action in Active Directory and on domain-joined systems.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating User Added to Privileged Group in Active Directory\n\nPrivileged accounts and groups in Active Directory are those to which powerful rights, privileges, and permissions are granted that allow them to perform nearly any action in Active Directory and on domain-joined systems.\n\nAttackers can add users to privileged groups to maintain a level of access if their other privileged accounts are uncovered by the security team. This allows them to keep operating after the security team discovers abused accounts.\n\nThis rule monitors events related to a user being added to a privileged group.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should manage members of this group.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- This attack abuses a legitimate Active Directory mechanism, so it is important to determine whether the activity is legitimate, if the administrator is authorized to perform this operation, and if there is a need to grant the account this level of privilege.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- If the admin is not aware of the operation, activate your Active Directory incident response plan.\n- If the user does not need the administrator privileges, remove the account from the privileged group.\n- Review the privileges of the administrator account that performed the action.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring", - "Data Source: Active Directory" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Skoetting" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "921b4552-541a-40fd-928a-2155e56f408a", - "rule_id": "5cd8e1f7-0050-4afc-b2df-904e40b2f5ae", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "group.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.api", - "type": "keyword", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "iam where winlog.api:\"wineventlog\" and event.action == \"added-member-to-group\" and\n group.name : (\"Admin*\",\n \"Local Administrators\",\n \"Domain Admins\",\n \"Enterprise Admins\",\n \"Backup Admins\",\n \"Schema Admins\",\n \"DnsAdmins\",\n \"Exchange Organization Administrators\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Persistence via Login or Logout Hook", - "description": "Identifies use of the Defaults command to install a login or logoff hook in MacOS. An adversary may abuse this capability to establish persistence in an environment by inserting code to be executed at login or logout.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.virusbulletin.com/uploads/pdf/conference_slides/2014/Wardle-VB2014.pdf", - "https://www.manpagez.com/man/1/defaults/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1037", - "name": "Boot or Logon Initialization Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/" - } - ] - } - ], - "id": "226d2499-cad6-4c87-93ba-2a7de47b2484", - "rule_id": "5d0265bf-dea9-41a9-92ad-48a8dcd05080", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type == \"start\" and\n process.name == \"defaults\" and process.args == \"write\" and process.args : (\"LoginHook\", \"LogoutHook\") and\n not process.args :\n (\n \"Support/JAMF/ManagementFrameworkScripts/logouthook.sh\",\n \"Support/JAMF/ManagementFrameworkScripts/loginhook.sh\",\n \"/Library/Application Support/JAMF/ManagementFrameworkScripts/logouthook.sh\",\n \"/Library/Application Support/JAMF/ManagementFrameworkScripts/loginhook.sh\"\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Automator Workflows Execution", - "description": "Identifies the execution of the Automator Workflows process followed by a network connection from it's XPC service. Adversaries may drop a custom workflow template that hosts malicious JavaScript for Automation (JXA) code as an alternative to using osascript.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://posts.specterops.io/persistent-jxa-66e1c3cd1cf5" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "3f951d43-8ab2-4513-90ff-361587ed945b", - "rule_id": "5d9f8cfc-0d03-443e-a167-2b0597ce0965", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=30s\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name == \"automator\"]\n [network where host.os.type == \"macos\" and process.name:\"com.apple.automator.runner\"]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Google Workspace 2SV Policy Disabled", - "description": "Google Workspace admins may setup 2-step verification (2SV) to add an extra layer of security to user accounts by asking users to verify their identity when they use login credentials. Admins have the ability to enforce 2SV from the admin console as well as the methods acceptable for verification and enrollment period. 2SV requires enablement on admin accounts prior to it being enabled for users within organization units. Adversaries may disable 2SV to lower the security requirements to access a valid account.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace 2SV Policy Disabled\n\nGoogle Workspace administrators manage password policies to enforce password requirements for an organization's compliance needs. Administrators have the capability to set restrictions on password length, reset frequencies, reuse capability, expiration, and much more. Google Workspace also allows multi-factor authentication (MFA) and 2-step verification (2SV) for authentication. 2SV allows users to verify their identity using security keys, Google prompt, authentication codes, text messages, and more.\n\n2SV adds an extra authentication layer for Google Workspace users to verify their identity. If 2SV or MFA aren't implemented, users only authenticate with their user name and password credentials. This authentication method has often been compromised and can be susceptible to credential access techniques when weak password policies are used.\n\nThis rule detects when a 2SV policy is disabled in Google Workspace.\n\n#### Possible investigation steps\n\n- Identify the associated user account(s) by reviewing `user.name` or `source.user.email` in the alert.\n- Identify what password setting was created or adjusted by reviewing `google_workspace.admin.setting.name`.\n- Review if a password setting was enabled or disabled by reviewing `google_workspace.admin.new_value` and `google_workspace.admin.old_value`.\n- After identifying the involved user account, verify administrative privileges are scoped properly.\n- Filter `event.dataset` for `google_workspace.login` and aggregate by `user.name`, `event.action`.\n - The `google_workspace.login.challenge_method` field can be used to identify the challenge method that was used for failed and successful logins.\n\n### False positive analysis\n\n- After finding the user account that updated the password policy, verify whether the action was intentional.\n- Verify whether the user should have Google Workspace administrative privileges that allow them to modify password policies.\n- Review organizational units or groups the role may have been added to and ensure its privileges are properly aligned.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 106, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Configuration Audit", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Administrators may remove 2-step verification (2SV) temporarily for testing or during maintenance. If 2SV was previously enabled, it is not common to disable this policy for extended periods of time." - ], - "references": [ - "https://support.google.com/a/answer/9176657?hl=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1556", - "name": "Modify Authentication Process", - "reference": "https://attack.mitre.org/techniques/T1556/" - } - ] - } - ], - "id": "97cadb7d-bc03-43e3-8210-7215eab6a5fd", - "rule_id": "5e161522-2545-11ed-ac47-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:\"google_workspace.login\" and event.action:\"2sv_disable\"\n", - "language": "kuery" - }, - { - "name": "Unusual Process Network Connection", - "description": "Identifies network activity from unexpected system applications. This may indicate adversarial activity as these applications are often leveraged by adversaries to execute code and evade detection.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Process Network Connection\n\nThis rule identifies network activity from unexpected system utilities and applications. These applications are commonly abused by attackers to execute code, evade detections, and bypass security protections.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate the target host that the process is communicating with.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/" - } - ] - } - ], - "id": "e8d7d423-f07e-4598-894e-d10e8e3d6bc6", - "rule_id": "610949a1-312f-4e04-bb55-3a79b8c95267", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and (process.name : \"Microsoft.Workflow.Compiler.exe\" or\n process.name : \"bginfo.exe\" or\n process.name : \"cdb.exe\" or\n process.name : \"cmstp.exe\" or\n process.name : \"csi.exe\" or\n process.name : \"dnx.exe\" or\n process.name : \"fsi.exe\" or\n process.name : \"ieexec.exe\" or\n process.name : \"iexpress.exe\" or\n process.name : \"odbcconf.exe\" or\n process.name : \"rcsi.exe\" or\n process.name : \"xwizard.exe\") and\n event.type == \"start\"]\n [network where host.os.type == \"windows\" and (process.name : \"Microsoft.Workflow.Compiler.exe\" or\n process.name : \"bginfo.exe\" or\n process.name : \"cdb.exe\" or\n process.name : \"cmstp.exe\" or\n process.name : \"csi.exe\" or\n process.name : \"dnx.exe\" or\n process.name : \"fsi.exe\" or\n process.name : \"ieexec.exe\" or\n process.name : \"iexpress.exe\" or\n process.name : \"odbcconf.exe\" or\n process.name : \"rcsi.exe\" or\n process.name : \"xwizard.exe\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Incoming DCOM Lateral Movement via MSHTA", - "description": "Identifies the use of Distributed Component Object Model (DCOM) to execute commands from a remote host, which are launched via the HTA Application COM Object. This behavior may indicate an attacker abusing a DCOM application to move laterally while attempting to evade detection.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://codewhitesec.blogspot.com/2018/07/lethalhta.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.003", - "name": "Distributed Component Object Model", - "reference": "https://attack.mitre.org/techniques/T1021/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.005", - "name": "Mshta", - "reference": "https://attack.mitre.org/techniques/T1218/005/" - } - ] - } - ] - } - ], - "id": "c3bf8a44-9255-4ddc-8fc0-a2e08353d100", - "rule_id": "622ecb68-fa81-4601-90b5-f8cd661e4520", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "source.port", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=1m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"mshta.exe\" and process.args : \"-Embedding\"\n ] by host.id, process.entity_id\n [network where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"mshta.exe\" and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.port > 49151 and destination.port > 49151 and source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ] by host.id, process.entity_id\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Account Configured with Never-Expiring Password", - "description": "Detects the creation and modification of an account with the \"Don't Expire Password\" option Enabled. Attackers can abuse this misconfiguration to persist in the domain and maintain long-term access using compromised accounts with this property.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Account Configured with Never-Expiring Password\n\nActive Directory provides a setting that prevents users' passwords from expiring. Enabling this setting is bad practice and can expose environments to vulnerabilities that weaken security posture, especially when these accounts are privileged.\n\nThe setting is usually configured so a user account can act as a service account. Attackers can abuse these accounts to persist in the domain and maintain long-term access using compromised accounts with a never-expiring password set.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/source host during the past 48 hours.\n- Inspect the account for suspicious or abnormal behaviors in the alert timeframe.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n- Using user accounts as service accounts is a bad security practice and should not be allowed in the domain. The security team should map and monitor potential benign true positives (B-TPs), especially if the account is privileged. For cases in which user accounts cannot be avoided, Microsoft provides the Group Managed Service Accounts (gMSA) feature, which ensures that the account password is robust and changed regularly and automatically.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.\n- Reset the password of the account and update its password settings.\n- Search for other occurrences on the domain.\n - Using the [Active Directory PowerShell module](https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-aduser):\n - `get-aduser -filter { passwordNeverExpires -eq $true -and enabled -eq $true } | ft`\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Active Directory", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "User accounts can be used as service accounts and have their password set never to expire. This is a bad security practice that exposes the account to Credential Access attacks. For cases in which user accounts cannot be avoided, Microsoft provides the Group Managed Service Accounts (gMSA) feature, which ensures that the account password is robust and changed regularly and automatically." - ], - "references": [ - "https://www.cert.ssi.gouv.fr/uploads/guide-ad.html#dont_expire", - "https://blog.menasec.net/2019/02/threat-hunting-26-persistent-password.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "5674bf2d-523c-40f6-baea-bea400725f7c", - "rule_id": "62a70f6f-3c37-43df-a556-f64fa475fba2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "message", - "type": "match_only_text", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.api", - "type": "keyword", - "ecs": false - } - ], - "setup": "", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.action:\"modified-user-account\" and winlog.api:\"wineventlog\" and event.code:\"4738\" and\n message:\"'Don't Expire Password' - Enabled\" and not user.id:\"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "Kubernetes Anonymous Request Authorized", - "description": "This rule detects when an unauthenticated user request is authorized within the cluster. Attackers may attempt to use anonymous accounts to gain initial access to the cluster or to avoid attribution of their activities within the cluster. This rule excludes the /healthz, /livez and /readyz endpoints which are commonly accessed anonymously.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 5, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Execution", - "Tactic: Initial Access", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Anonymous access to the API server is a dangerous setting enabled by default. Common anonymous connections (e.g., health checks) have been excluded from this rule. All other instances of authorized anonymous requests should be investigated." - ], - "references": [ - "https://media.defense.gov/2022/Aug/29/2003066362/-1/-1/0/CTR_KUBERNETES_HARDENING_GUIDANCE_1.2_20220829.PDF" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.001", - "name": "Default Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/001/" - } - ] - } - ] - } - ], - "id": "c5e2912b-2c61-423a-97d2-469222471c38", - "rule_id": "63c057cc-339a-11ed-a261-0242ac120002", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestURI", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.user.username", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset:kubernetes.audit_logs\n and kubernetes.audit.annotations.authorization_k8s_io/decision:allow\n and kubernetes.audit.user.username:(\"system:anonymous\" or \"system:unauthenticated\" or not *)\n and not kubernetes.audit.requestURI:(/healthz* or /livez* or /readyz*)\n", - "language": "kuery" - }, - { - "name": "Anomalous Process For a Linux Population", - "description": "Searches for rare processes running on multiple Linux hosts in an entire fleet or network. This reduces the detection of false positives since automated maintenance processes usually only run occasionally on a single machine but are common to all or many hosts in a fleet.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Anomalous Process For a Linux Population\n\nSearching for abnormal Linux processes is a good methodology to find potentially malicious activity within a network. Understanding what is commonly run within an environment and developing baselines for legitimate activity can help uncover potential malware and suspicious behaviors.\n\nThis rule uses a machine learning job to detect a Linux process that is rare and unusual for all of the monitored Linux hosts in your fleet.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, and whether they are located in expected locations.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Consider the user as identified by the `user.name` field. Is this program part of an expected workflow for the user who ran this program on this host?\n- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Validate if the activity has a consistent cadence (for example, if it runs monthly or quarterly), as it could be part of a monthly or quarterly business process.\n- Examine the arguments and working directory of the process. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n\n### False Positive Analysis\n\n- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.\n- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - } - ], - "id": "52afb768-dd0f-4f3d-bd1c-73fae3b8bfd9", - "rule_id": "647fc812-7996-4795-8869-9c4ea595fe88", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_linux_anomalous_process_all_hosts" - ] - }, - { - "name": "Modification of Safari Settings via Defaults Command", - "description": "Identifies changes to the Safari configuration using the built-in defaults command. Adversaries may attempt to enable or disable certain Safari settings, such as enabling JavaScript from Apple Events to ease in the hijacking of the users browser.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://objectivebythesea.com/v2/talks/OBTS_v2_Zohar.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "67fe1fcf-b141-44b2-8d9e-9afc46526e31", - "rule_id": "6482255d-f468-45ea-a5b3-d3a7de1331ae", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:start and\n process.name:defaults and process.args:\n (com.apple.Safari and write and not\n (\n UniversalSearchEnabled or\n SuppressSearchSuggestions or\n WebKitTabToLinksPreferenceKey or\n ShowFullURLInSmartSearchField or\n com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks\n )\n )\n", - "language": "kuery" - }, - { - "name": "Attempt to Mount SMB Share via Command Line", - "description": "Identifies the execution of macOS built-in commands to mount a Server Message Block (SMB) network share. Adversaries may use valid accounts to interact with a remote network share using SMB.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.freebsd.org/cgi/man.cgi?mount_smbfs", - "https://ss64.com/osx/mount.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.002", - "name": "SMB/Windows Admin Shares", - "reference": "https://attack.mitre.org/techniques/T1021/002/" - } - ] - } - ] - } - ], - "id": "9ebd66a4-5ee3-4a3e-b9c5-6b1529122ec5", - "rule_id": "661545b4-1a90-4f45-85ce-2ebd7c6a15d0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n (\n process.name : \"mount_smbfs\" or\n (process.name : \"open\" and process.args : \"smb://*\") or\n (process.name : \"mount\" and process.args : \"smbfs\") or\n (process.name : \"osascript\" and process.command_line : \"osascript*mount volume*smb://*\")\n ) and\n not process.parent.executable : \"/Applications/Google Drive.app/Contents/MacOS/Google Drive\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "WebServer Access Logs Deleted", - "description": "Identifies the deletion of WebServer access logs. This may indicate an attempt to evade detection or destroy forensic evidence on a system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: Windows", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/" - } - ] - } - ], - "id": "208825b0-0c11-4e5c-aab5-6a1a4f11d1a2", - "rule_id": "665e7a4f-c58e-4fc6-bc83-87a7572670ac", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where event.type == \"deletion\" and\n file.path : (\"C:\\\\inetpub\\\\logs\\\\LogFiles\\\\*.log\",\n \"/var/log/apache*/access.log\",\n \"/etc/httpd/logs/access_log\",\n \"/var/log/httpd/access_log\",\n \"/var/www/*/logs/access.log\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Potential Successful Linux FTP Brute Force Attack Detected", - "description": "An FTP (file transfer protocol) brute force attack is a method where an attacker systematically tries different combinations of usernames and passwords to gain unauthorized access to an FTP server, and if successful, the impact can include unauthorized data access, manipulation, or theft, compromising the security and integrity of the server and potentially exposing sensitive information. This rule identifies multiple consecutive authentication failures targeting a specific user account from the same source address and within a short time interval, followed by a successful authentication.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/", - "subtechnique": [ - { - "id": "T1110.001", - "name": "Password Guessing", - "reference": "https://attack.mitre.org/techniques/T1110/001/" - }, - { - "id": "T1110.003", - "name": "Password Spraying", - "reference": "https://attack.mitre.org/techniques/T1110/003/" - } - ] - } - ] - } - ], - "id": "a4d4e0e0-c516-476e-9fff-ccd52065a467", - "rule_id": "66712812-e7f2-4a1d-bbda-dd0b5cf20c5d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0", - "integration": "auditd" - } - ], - "required_fields": [ - { - "name": "auditd.data.addr", - "type": "unknown", - "ecs": false - }, - { - "name": "auditd.data.terminal", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "related.user", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Auditbeat integration, or Auditd Manager integration.\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n### Auditd Manager Integration Setup\nThe Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.\nAuditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.\n\n#### The following steps should be executed in order to add the Elastic Agent System integration \"auditd_manager\" on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Auditd Manager and select the integration to see more details about it.\n- Click Add Auditd Manager.\n- Configure the integration name and optionally add a description.\n- Review optional and advanced settings accordingly.\n- Add the newly installed `auditd manager` to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.\n- Click Save and Continue.\n- For more details on the integeration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).\n\n#### Rule Specific Setup Note\nAuditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.\nHowever, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n- For this detection rule no additional audit rules are required to be added to the integration.\n\n", - "type": "eql", - "query": "sequence by host.id, auditd.data.addr, related.user with maxspan=5s\n [authentication where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n event.action == \"authenticated\" and auditd.data.terminal == \"ftp\" and event.outcome == \"failure\" and \n auditd.data.addr != null and auditd.data.addr != \"0.0.0.0\" and auditd.data.addr != \"::\"] with runs=10\n [authentication where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n event.action == \"authenticated\" and auditd.data.terminal == \"ftp\" and event.outcome == \"success\" and \n auditd.data.addr != null and auditd.data.addr != \"0.0.0.0\" and auditd.data.addr != \"::\"] | tail 1\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-auditd_manager.auditd-*" - ] - }, - { - "name": "Suspicious macOS MS Office Child Process", - "description": "Identifies suspicious child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, and Excel). These child processes are often launched during exploitation of Office applications or by documents with malicious macros.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.malwarebytes.com/cybercrime/2017/02/microsoft-office-macro-malware-targets-macs/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - } - ] - } - ] - } - ], - "id": "0749e15a-58ea-41fe-93f4-fc4e00f96672", - "rule_id": "66da12b1-ac83-40eb-814c-07ed1d82b7b9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.parent.name:(\"Microsoft Word\", \"Microsoft PowerPoint\", \"Microsoft Excel\") and\n process.name:\n (\n \"bash\",\n \"dash\",\n \"sh\",\n \"tcsh\",\n \"csh\",\n \"zsh\",\n \"ksh\",\n \"fish\",\n \"python*\",\n \"perl*\",\n \"php*\",\n \"osascript\",\n \"pwsh\",\n \"curl\",\n \"wget\",\n \"cp\",\n \"mv\",\n \"base64\",\n \"launchctl\"\n ) and\n /* noisy false positives related to product version discovery and office errors reporting */\n not process.args:\n (\n \"ProductVersion\",\n \"hw.model\",\n \"ioreg\",\n \"ProductName\",\n \"ProductUserVisibleVersion\",\n \"ProductBuildVersion\",\n \"/Library/Application Support/Microsoft/MERP*/Microsoft Error Reporting.app/Contents/MacOS/Microsoft Error Reporting\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Google Workspace Admin Role Assigned to a User", - "description": "Assigning the administrative role to a user will grant them access to the Google Admin console and grant them administrator privileges which allow them to access and manage various resources and applications. An adversary may create a new administrator account for persistence or apply the admin role to an existing user to carry out further intrusion efforts. Users with super-admin privileges can bypass single-sign on if enabled in Google Workspace.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace Admin Role Assigned to a User\n\nGoogle Workspace roles allow administrators to assign specific permissions to users or groups. These assignments should follow the principle of least privilege (PoLP). Admin roles in Google Workspace grant users access to the Google Admin console, where more domain-wide settings are accessible. Google Workspace contains prebuilt administrator roles for performing business functions related to users, groups, and services. Custom administrator roles can be created when prebuilt roles are not sufficient.\n\nAdministrator roles assigned to users will grant them additional permissions and privileges within the Google Workspace domain. Administrative roles also give users access to the admin console, where domain-wide settings can be adjusted. Threat actors might rely on these new privileges to advance their intrusion efforts and laterally move throughout the organization. Users with unexpected administrative privileges may also cause operational dysfunction if unfamiliar settings are adjusted without warning.\n\nThis rule identifies when a Google Workspace administrative role is assigned to a user.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n - The `user.target.email` field contains the user who received the admin role.\n- Identify the role given to the user by reviewing the `google_workspace.admin.role.name` field in the alert.\n- After identifying the involved user, verify their administrative privileges are scoped properly.\n- To identify other users with this role, search the alert for `event.action: ASSIGN_ROLE`.\n - Add `google_workspace.admin.role.name` with the role added as an additional filter.\n - Adjust the relative time accordingly to identify all users that were assigned this admin role.\n- Identify if the user account was recently created by searching for `event.action: CREATE_USER`.\n - Add `user.email` with the target user account that recently received this new admin role.\n- After identifying the involved user, create a filter with their `user.name` or `user.target.email`. Review the last 48 hours of their activity for anything that may indicate a compromise.\n\n### False positive analysis\n\n- After identifying user account that added the admin role, verify the action was intentional.\n- Verify that the target user who was assigned the admin role should have administrative privileges in Google Workspace.\n- Review organizational units or groups the target user might have been added to and ensure the admin role permissions align.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 206, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Identity and Access Audit", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Google Workspace admin role assignments may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://support.google.com/a/answer/172176?hl=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/", - "subtechnique": [ - { - "id": "T1098.003", - "name": "Additional Cloud Roles", - "reference": "https://attack.mitre.org/techniques/T1098/003/" - } - ] - } - ] - } - ], - "id": "32d15a6a-ae7d-4f8b-9328-fb7d66d4f16f", - "rule_id": "68994a6c-c7ba-4e82-b476-26a26877adf6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.admin.role.name", - "type": "keyword", - "ecs": false - }, - { - "name": "google_workspace.event.type", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:\"google_workspace.admin\" and event.category:\"iam\" and event.action:\"ASSIGN_ROLE\"\n and google_workspace.event.type:\"DELEGATED_ADMIN_SETTINGS\" and google_workspace.admin.role.name : *_ADMIN_ROLE\n", - "language": "kuery" - }, - { - "name": "Modification of Boot Configuration", - "description": "Identifies use of bcdedit.exe to delete boot configuration data. This tactic is sometimes used as by malware or an attacker as a destructive technique.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Modification of Boot Configuration\n\nBoot entry parameters, or boot parameters, are optional, system-specific settings that represent configuration options. These are stored in a boot configuration data (BCD) store, and administrators can use utilities like `bcdedit.exe` to configure these.\n\nThis rule identifies the usage of `bcdedit.exe` to:\n\n- Disable Windows Error Recovery (recoveryenabled).\n- Ignore errors if there is a failed boot, failed shutdown, or failed checkpoint (bootstatuspolicy ignoreallfailures).\n\nThese are common steps in destructive attacks by adversaries leveraging ransomware.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.\n- Check if any files on the host machine have been encrypted.\n\n### False positive analysis\n\n- The usage of these options is not inherently malicious. Administrators can modify these configurations to force a machine to boot for troubleshooting or data recovery purposes.\n\n### Related rules\n\n- Deleting Backup Catalogs with Wbadmin - 581add16-df76-42bb-af8e-c979bfb39a59\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- If any other destructive action was identified on the host, it is recommended to prioritize the investigation and look for ransomware preparation and execution activities.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Impact", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1490", - "name": "Inhibit System Recovery", - "reference": "https://attack.mitre.org/techniques/T1490/" - } - ] - } - ], - "id": "8bbc9a5a-8510-4caf-a3ec-9ac95affe596", - "rule_id": "69c251fb-a5d6-4035-b5ec-40438bd829ff", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"bcdedit.exe\" or process.pe.original_file_name == \"bcdedit.exe\") and\n (\n (process.args : \"/set\" and process.args : \"bootstatuspolicy\" and process.args : \"ignoreallfailures\") or\n (process.args : \"no\" and process.args : \"recoveryenabled\")\n )\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Enumeration of Users or Groups via Built-in Commands", - "description": "Identifies the execution of macOS built-in commands related to account or group enumeration. Adversaries may use account and group information to orient themselves before deciding how to act.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1069", - "name": "Permission Groups Discovery", - "reference": "https://attack.mitre.org/techniques/T1069/", - "subtechnique": [ - { - "id": "T1069.001", - "name": "Local Groups", - "reference": "https://attack.mitre.org/techniques/T1069/001/" - } - ] - }, - { - "id": "T1087", - "name": "Account Discovery", - "reference": "https://attack.mitre.org/techniques/T1087/", - "subtechnique": [ - { - "id": "T1087.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1087/001/" - } - ] - } - ] - } - ], - "id": "7823b00e-e5d0-402c-8c69-7be232cf317a", - "rule_id": "6e9b351e-a531-4bdc-b73e-7034d6eed7ff", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n (\n process.name : (\"ldapsearch\", \"dsmemberutil\") or\n (process.name : \"dscl\" and\n process.args : (\"read\", \"-read\", \"list\", \"-list\", \"ls\", \"search\", \"-search\") and\n process.args : (\"/Active Directory/*\", \"/Users*\", \"/Groups*\"))\n\t) and\n not process.parent.executable : (\"/Applications/NoMAD.app/Contents/MacOS/NoMAD\",\n \"/Applications/ZoomPresence.app/Contents/MacOS/ZoomPresence\",\n \"/Applications/Sourcetree.app/Contents/MacOS/Sourcetree\",\n \"/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon\",\n \"/Applications/Jamf Connect.app/Contents/MacOS/Jamf Connect\",\n \"/usr/local/jamf/bin/jamf\",\n \"/Library/Application Support/AirWatch/hubd\",\n \"/opt/jc/bin/jumpcloud-agent\",\n \"/Applications/ESET Endpoint Antivirus.app/Contents/MacOS/esets_daemon\",\n \"/Applications/ESET Endpoint Security.app/Contents/MacOS/esets_daemon\",\n \"/Library/PrivilegedHelperTools/com.fortinet.forticlient.uninstall_helper\"\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Google Workspace Role Modified", - "description": "Detects when a custom admin role or its permissions are modified. An adversary may modify a custom admin role in order to elevate the permissions of other user accounts and persist in their target’s environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace Role Modified\n\nGoogle Workspace roles allow administrators to assign specific permissions to users or groups where the principle of least privilege (PoLP) is recommended. Admin roles in Google Workspace grant users access to the Google Admin console, where more domain-wide settings are accessible. Google Workspace contains prebuilt admin roles for performing business functions related to users, groups, and services. Custom administrator roles can be created where prebuilt roles are not preferred. Each Google Workspace service has a set of custodial privileges that can be added to custom roles.\n\nRoles assigned to users will grant them additional permissions and privileges within the Google Workspace domain. Threat actors might modify existing roles with new privileges to advance their intrusion efforts and laterally move throughout the organization. Users with unexpected privileges might also cause operational dysfunction if unfamiliar settings are adjusted without warning.\n\nThis rule identifies when a Google Workspace role is modified.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- Identify the role modified by reviewing the `google_workspace.admin.role.name` field in the alert.\n- Identify the privilege that was added or removed by reviewing the `google_workspace.admin.privilege.name` field in the alert.\n- After identifying the involved user, verify administrative privileges are scoped properly.\n- To identify other users with this role, search for `event.action: ASSIGN_ROLE`\n - Add `google_workspace.admin.role.name` with the role added as an additional filter.\n - Adjust the relative time accordingly to identify all users that were assigned this role.\n- Identify if the user account was recently created by searching for `event.action: CREATE_USER`.\n- If a privilege was added, monitor users assigned this role for the next 24 hours and look for attempts to use the new privilege.\n - The `event.provider` field will help filter for specific services in Google Workspace such as Drive or Admin.\n - The `event.action` field will help trace actions that are being taken by users.\n\n### False positive analysis\n\n- After identifying the user account that modified the role, verify the action was intentional.\n- Verify that the user is expected to have administrative privileges in Google Workspace to modify roles.\n- Review organizational units or groups the role might have been added to and ensure the new privileges align properly.\n- Use the `user.name` to filter for `event.action` where `ADD_PRIVILEGE` or `UPDATE_ROLE` has been seen before to check if these actions are new or historical.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Google Workspace admin roles may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://support.google.com/a/answer/2406043?hl=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "ce841ab3-0676-41bb-80f8-ab4e48ed94b4", - "rule_id": "6f435062-b7fc-4af9-acea-5b1ead65c5a5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:(ADD_PRIVILEGE or UPDATE_ROLE)\n", - "language": "kuery" - }, - { - "name": "Persistence via WMI Standard Registry Provider", - "description": "Identifies use of the Windows Management Instrumentation StdRegProv (registry provider) to modify commonly abused registry locations for persistence.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/previous-versions/windows/desktop/regprov/stdregprov", - "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - }, - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "65b53c89-3831-453f-ae68-6dc469726b38", - "rule_id": "70d12c9c-0dbd-4a1a-bc44-1467502c9cf6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n registry.data.strings != null and process.name : \"WmiPrvSe.exe\" and\n registry.path : (\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\WOW6432Node\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ServiceDLL\",\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ImagePath\",\n \"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\\\\*\",\n \"HKEY_USERS\\\\*\\\\Environment\\\\UserInitMprLogonScript\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\Load\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\Shell\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logoff\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logon\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Shutdown\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Startup\\\\Script\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Ctf\\\\LangBarAddin\\\\*\\\\FilePath\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Exec\",\n \"HKEY_USERS\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Command Processor\\\\Autorun\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\WOW6432Node\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run\\\\*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\Explorer\\\\Run\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnce\\\\*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\RunOnceEx\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ServiceDLL\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ImagePath\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\\\\*\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Environment\\\\UserInitMprLogonScript\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Windows\\\\Load\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\\\\Shell\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\Shell\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logoff\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Logon\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Shutdown\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\System\\\\Scripts\\\\Startup\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Ctf\\\\LangBarAddin\\\\*\\\\FilePath\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Exec\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\Extensions\\\\*\\\\Script\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Command Processor\\\\Autorun\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Attempt to Unload Elastic Endpoint Security Kernel Extension", - "description": "Identifies attempts to unload the Elastic Endpoint Security kernel extension via the kextunload command.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.006", - "name": "Kernel Modules and Extensions", - "reference": "https://attack.mitre.org/techniques/T1547/006/" - } - ] - } - ] - } - ], - "id": "619a35c1-4126-4575-9c76-93aaa8481ae1", - "rule_id": "70fa1af4-27fd-4f26-bd03-50b6af6b9e24", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:kextunload and process.args:(\"/System/Library/Extensions/EndpointSecurity.kext\" or \"EndpointSecurity.kext\")\n", - "language": "kuery" - }, - { - "name": "Modification of Environment Variable via Launchctl", - "description": "Identifies modifications to an environment variable using the built-in launchctl command. Adversaries may execute their own malicious payloads by hijacking certain environment variables to load arbitrary libraries or bypass certain restrictions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/rapid7/metasploit-framework/blob/master//modules/post/osx/escalate/tccbypass.rb" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.007", - "name": "Path Interception by PATH Environment Variable", - "reference": "https://attack.mitre.org/techniques/T1574/007/" - } - ] - } - ] - } - ], - "id": "019510d5-e68d-4fe9-9ced-8ef38664bce1", - "rule_id": "7453e19e-3dbf-4e4e-9ae0-33d6c6ed15e1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:start and \n process.name:launchctl and \n process.args:(setenv and not (ANT_HOME or \n DBUS_LAUNCHD_SESSION_BUS_SOCKET or \n EDEN_ENV or \n LG_WEBOS_TV_SDK_HOME or \n RUNTIME_JAVA_HOME or \n WEBOS_CLI_TV or \n JAVA*_HOME) and \n not *.vmoptions) and \n not process.parent.executable:(\"/Applications/IntelliJ IDEA CE.app/Contents/jbr/Contents/Home/lib/jspawnhelper\" or \n /Applications/NoMachine.app/Contents/Frameworks/bin/nxserver.bin or \n /Applications/NoMachine.app/Contents/Frameworks/bin/nxserver.bin or \n /usr/local/bin/kr)\n", - "language": "kuery" - }, - { - "name": "Unusual Hour for a User to Logon", - "description": "A machine learning job detected a user logging in at a time of day that is unusual for the user. This can be due to credentialed access via a compromised account when the user and the threat actor are in different time zones. In addition, unauthorized user activity often takes place during non-business hours.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Hour for a User to Logon\n\nThis rule uses a machine learning job to detect a user logging in at a time of day that is unusual for the user. This can be due to credentialed access via a compromised account when the user and the threat actor are in different time zones. It can also indicate unauthorized user activity, as it often occurs during non-business hours.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, network connections, data access, and logon events.\n- Investigate other alerts associated with the involved users during the past 48 hours.\n\n### False positive analysis\n\n- Users may need to log in during non-business hours to perform work-related tasks. Examine whether the company policies authorize this or if the activity is done under change management.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 104, - "tags": [ - "Use Case: Identity and Access Audit", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Initial Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Users working late, or logging in from unusual time zones while traveling, may trigger this rule." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "1a6e4520-a2a8-4658-828c-46ab8b07c9ee", - "rule_id": "745b0119-0560-43ba-860a-7235dd8cee8d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "auth_rare_hour_for_a_user" - }, - { - "name": "Unusual DNS Activity", - "description": "A machine learning job detected a rare and unusual DNS query that indicate network activity with unusual DNS domains. This can be due to initial access, persistence, command-and-control, or exfiltration activity. For example, when a user clicks on a link in a phishing email or opens a malicious document, a request may be sent to download and run a payload from an uncommon domain. When malware is already running, it may send requests to an uncommon DNS domain the malware uses for command-and-control communication.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Command and Control" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program or one that runs rarely as part of a monthly or quarterly workflow could trigger this alert. Network activity that occurs rarely, in small quantities, can trigger this alert. Possible examples are browsing technical support or vendor networks sparsely. A user who visits a new or unique web destination may trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/", - "subtechnique": [ - { - "id": "T1071.004", - "name": "DNS", - "reference": "https://attack.mitre.org/techniques/T1071/004/" - } - ] - } - ] - } - ], - "id": "fff9f687-b6ba-4edd-acb4-2b3a3eedcee7", - "rule_id": "746edc4c-c54c-49c6-97a1-651223819448", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": "packetbeat_rare_dns_question" - }, - { - "name": "Potential Privilege Escalation via Sudoers File Modification", - "description": "A sudoers file specifies the commands users or groups can run and from which terminals. Adversaries can take advantage of these configurations to execute commands as other users or spawn processes with higher privileges.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.003", - "name": "Sudo and Sudo Caching", - "reference": "https://attack.mitre.org/techniques/T1548/003/" - } - ] - } - ] - } - ], - "id": "6f67000a-8e9c-4069-a7e9-a7c2884d9295", - "rule_id": "76152ca1-71d0-4003-9e37-0983e12832da", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and event.type:start and process.args:(echo and *NOPASSWD*ALL*)\n", - "language": "kuery" - }, - { - "name": "Application Added to Google Workspace Domain", - "description": "Detects when a Google marketplace application is added to the Google Workspace domain. An adversary may add a malicious application to an organization’s Google Workspace domain in order to maintain a presence in their target’s organization and steal data.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Application Added to Google Workspace Domain\n\nGoogle Workspace Marketplace is an online store for free and paid web applications that work with Google Workspace services and third-party software. Listed applications are based on Google APIs or on Google Apps Script and created by both Google and third-party developers.\n\nMarketplace applications require access to specific Google Workspace resources. Applications can be installed by individual users, if they have permission, or can be installed for an entire Google Workspace domain by administrators. Consent screens typically display what permissions and privileges the application requires during installation. As a result, malicious Marketplace applications may require more permissions than necessary or have malicious intent.\n\nGoogle clearly states that they are not responsible for any product on the Marketplace that originates from a source other than Google.\n\nThis rule checks for applications that were manually added to the Marketplace by a Google Workspace account.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- This rule relies on data from `google_workspace.admin`, thus indicating the associated user has administrative privileges to the Marketplace.\n- With access to the Google Workspace admin console, visit the `Security > Investigation tool` with filters for the user email and event is `Assign Role` or `Update Role` to determine if new cloud roles were recently updated.\n- With the user account, review other potentially related events within the last 48 hours.\n- Re-assess the permissions and reviews of the Marketplace applications to determine if they violate organizational policies or introduce unexpected risks.\n- With access to the Google Workspace admin console, determine if the application was installed domain-wide or individually by visiting `Apps > Google Workspace Marketplace Apps`.\n\n### False positive analysis\n\n- Google Workspace administrators might intentionally remove an application from the blocklist due to a re-assessment or a domain-wide required need for the application.\n- Identify the user account associated with this action and assess their administrative privileges with Google Workspace Marketplace.\n- Contact the user to verify that they intentionally removed the application from the blocklist and their reasoning.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Configuration Audit", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Applications can be added to a Google Workspace domain by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://support.google.com/a/answer/6328701?hl=en#" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - } - ], - "id": "62267f09-6e71-45db-bab4-0fac9fdceb43", - "rule_id": "785a404b-75aa-4ffd-8be5-3334a5a544dd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:ADD_APPLICATION\n", - "language": "kuery" - }, - { - "name": "Potential Shadow Credentials added to AD Object", - "description": "Identify the modification of the msDS-KeyCredentialLink attribute in an Active Directory Computer or User Object. Attackers can abuse control over the object and create a key pair, append to raw public key in the attribute, and obtain persistent and stealthy access to the target user or computer object.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Potential Shadow Credentials added to AD Object\n\nThe msDS-KeyCredentialLink is an Active Directory (AD) attribute that links cryptographic certificates to a user or computer for domain authentication.\n\nAttackers with write privileges on this attribute over an object can abuse it to gain access to the object or maintain persistence. This means they can authenticate and perform actions on behalf of the exploited identity, and they can use Shadow Credentials to request Ticket Granting Tickets (TGTs) on behalf of the identity.\n\n#### Possible investigation steps\n\n- Identify whether Windows Hello for Business (WHfB) and/or Azure AD is used in the environment.\n - Review the event ID 4624 for logon events involving the subject identity (`winlog.event_data.SubjectUserName`).\n - Check whether the `source.ip` is the server running Azure AD Connect.\n- Contact the account and system owners and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Review the event IDs 4768 and 4769 for suspicious ticket requests involving the modified identity (`winlog.event_data.ObjectDN`).\n - Extract the source IP addresses from these events and use them as indicators of compromise (IoCs) to investigate whether the host is compromised and to scope the attacker's access to the environment.\n\n### False positive analysis\n\n- Administrators might use custom accounts on Azure AD Connect. If this is the case, make sure the account is properly secured. You can also create an exception for the account if expected activity makes too much noise in your environment.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n - Remove the Shadow Credentials from the object.\n- Investigate how the attacker escalated privileges and identify systems they used to conduct lateral movement. Use this information to determine ways the attacker could regain access to the environment.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Active Directory", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Modifications in the msDS-KeyCredentialLink attribute can be done legitimately by the Azure AD Connect synchronization account or the ADFS service account. These accounts can be added as Exceptions." - ], - "references": [ - "https://posts.specterops.io/shadow-credentials-abusing-key-trust-account-mapping-for-takeover-8ee1a53566ab", - "https://www.thehacker.recipes/ad/movement/kerberos/shadow-credentials", - "https://github.com/OTRF/Set-AuditRule", - "https://cyberstoph.org/posts/2022/03/detecting-shadow-credentials/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1556", - "name": "Modify Authentication Process", - "reference": "https://attack.mitre.org/techniques/T1556/" - } - ] - } - ], - "id": "2c864277-e211-49d4-a188-de177ed8e21a", - "rule_id": "79f97b31-480e-4e63-a7f4-ede42bf2c6de", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.AttributeLDAPDisplayName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.AttributeValue", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectUserName", - "type": "keyword", - "ecs": false - } - ], - "setup": "The 'Audit Directory Service Changes' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```\n\nThe above policy does not cover User objects, so we need to set up an AuditRule using https://github.com/OTRF/Set-AuditRule.\nAs this specifies the msDS-KeyCredentialLink Attribute GUID, it is expected to be low noise.\n\n```\nSet-AuditRule -AdObjectPath 'AD:\\CN=Users,DC=Domain,DC=com' -WellKnownSidType WorldSid -Rights WriteProperty -InheritanceFlags Children -AttributeGUID 5b47d60f-6090-40b2-9f37-2a4de88f3063 -AuditFlags Success\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.action:\"Directory Service Changes\" and event.code:\"5136\" and\n winlog.event_data.AttributeLDAPDisplayName:\"msDS-KeyCredentialLink\" and winlog.event_data.AttributeValue :B\\:828* and\n not winlog.event_data.SubjectUserName: MSOL_*\n", - "language": "kuery" - }, - { - "name": "Potential Privilege Escalation through Writable Docker Socket", - "description": "This rule monitors for the usage of Docker runtime sockets to escalate privileges on Linux systems. Docker sockets by default are only be writable by the root user and docker group. Attackers that have permissions to write to these sockets may be able to create and run a container that allows them to escalate privileges and gain further access onto the host file system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Domain: Container", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://book.hacktricks.xyz/linux-hardening/privilege-escalation/docker-security/docker-breakout-privilege-escalation#automatic-enumeration-and-escape" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1611", - "name": "Escape to Host", - "reference": "https://attack.mitre.org/techniques/T1611/" - } - ] - } - ], - "id": "8e10aac5-d99f-45de-8fa8-1b9195479b6a", - "rule_id": "7acb2de3-8465-472a-8d9c-ccd7b73d0ed8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "group.Ext.real.id", - "type": "unknown", - "ecs": false - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.Ext.real.id", - "type": "unknown", - "ecs": false - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and \n(\n (process.name == \"docker\" and process.args : \"run\" and process.args : \"-it\" and \n process.args : (\"unix://*/docker.sock\", \"unix://*/dockershim.sock\")) or \n (process.name == \"socat\" and process.args : (\"UNIX-CONNECT:*/docker.sock\", \"UNIX-CONNECT:*/dockershim.sock\"))\n) and not user.Ext.real.id : \"0\" and not group.Ext.real.id : \"0\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Tampering of Bash Command-Line History", - "description": "Adversaries may attempt to clear or disable the Bash command-line history in an attempt to evade detection or forensic investigations.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.003", - "name": "Clear Command History", - "reference": "https://attack.mitre.org/techniques/T1070/003/" - } - ] - } - ] - } - ], - "id": "9c22828c-c99e-45b7-975d-7050bd528f21", - "rule_id": "7bcbb3ac-e533-41ad-a612-d6c3bf666aba", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where event.type in (\"start\", \"process_started\") and\n (\n ((process.args : (\"rm\", \"echo\") or\n (process.args : \"ln\" and process.args : \"-sf\" and process.args : \"/dev/null\") or\n (process.args : \"truncate\" and process.args : \"-s0\"))\n and process.args : (\".bash_history\", \"/root/.bash_history\", \"/home/*/.bash_history\",\"/Users/.bash_history\", \"/Users/*/.bash_history\",\n \".zsh_history\", \"/root/.zsh_history\", \"/home/*/.zsh_history\", \"/Users/.zsh_history\", \"/Users/*/.zsh_history\")) or\n (process.name : \"history\" and process.args : \"-c\") or\n (process.args : \"export\" and process.args : (\"HISTFILE=/dev/null\", \"HISTFILESIZE=0\")) or\n (process.args : \"unset\" and process.args : \"HISTFILE\") or\n (process.args : \"set\" and process.args : \"history\" and process.args : \"+o\")\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Google Workspace Bitlocker Setting Disabled", - "description": "Google Workspace administrators whom manage Windows devices and have Windows device management enabled may also enable BitLocker drive encryption to mitigate unauthorized data access on lost or stolen computers. Adversaries with valid account access may disable BitLocker to access sensitive data on an endpoint added to Google Workspace device management.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace Bitlocker Setting Disabled\n\nBitLocker Drive Encryption is a data protection feature that integrates with the Windows operating system to address the data theft or exposure threats from lost, stolen, or inappropriately decommissioned computers. BitLocker helps mitigate unauthorized data access by enhancing file and system protections, such as data encryption and rendering data inaccessible. Google Workspace can sync with Windows endpoints that are registered in inventory, where BitLocker can be enabled and disabled.\n\nDisabling Bitlocker on an endpoint decrypts data at rest and makes it accessible, which raises the risk of exposing sensitive endpoint data.\n\nThis rule identifies a user with administrative privileges and access to the admin console, disabling BitLocker for Windows endpoints.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- After identifying the user, verify if the user should have administrative privileges to disable BitLocker on Windows endpoints.\n- From the Google Workspace admin console, review `Reporting > Audit` and `Investigation > Device` logs, filtering on the user email identified from the alert.\n - If a Google Workspace user logged into their account using a potentially compromised account, this will create an `Device sync event` event.\n\n### False positive analysis\n\n- An administrator may have intentionally disabled BitLocker for routine maintenance or endpoint updates.\n - Verify with the user that they intended to disable BitLocker on Windows endpoints.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 106, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Administrators may temporarily disabled Bitlocker on managed devices for maintenance, testing or to resolve potential endpoint conflicts." - ], - "references": [ - "https://support.google.com/a/answer/9176657?hl=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "74d3774f-5f51-4878-87db-85be8d2aa335", - "rule_id": "7caa8e60-2df0-11ed-b814-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.admin.new_value", - "type": "keyword", - "ecs": false - }, - { - "name": "google_workspace.admin.setting.name", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:\"google_workspace.admin\" and event.action:\"CHANGE_APPLICATION_SETTING\" and event.category:(iam or configuration)\n and google_workspace.admin.new_value:\"Disabled\" and google_workspace.admin.setting.name:BitLocker*\n", - "language": "kuery" - }, - { - "name": "Apple Scripting Execution with Administrator Privileges", - "description": "Identifies execution of the Apple script interpreter (osascript) without a password prompt and with administrator privileges.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://discussions.apple.com/thread/2266150" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "6a4791c5-a01b-4c10-b2fe-507dde4437fd", - "rule_id": "827f8d8f-4117-4ae4-b551-f56d54b9da6b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name : \"osascript\" and\n process.command_line : \"osascript*with administrator privileges\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Linux Local Account Brute Force Detected", - "description": "Identifies multiple consecutive login attempts executed by one process targeting a local linux user account within a short time interval. Adversaries might brute force login attempts across different users with a default wordlist or a set of customly crafted passwords in an attempt to gain access to these accounts.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/", - "subtechnique": [ - { - "id": "T1110.001", - "name": "Password Guessing", - "reference": "https://attack.mitre.org/techniques/T1110/001/" - } - ] - } - ] - } - ], - "id": "dcc18dd0-5921-459b-b0b2-8d9b85e9f4f4", - "rule_id": "835c0622-114e-40b5-a346-f843ea5d01f1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, process.parent.executable, user.id with maxspan=1s\n [process where host.os.type == \"linux\" and event.type == \"start\" and event.action == \"exec\" and process.name == \"su\" and \n not process.parent.name in (\n \"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"clickhouse-server\"\n )] with runs=10\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Sublime Plugin or Application Script Modification", - "description": "Adversaries may create or modify the Sublime application plugins or scripts to execute a malicious payload each time the Sublime application is started.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://posts.specterops.io/persistent-jxa-66e1c3cd1cf5" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1554", - "name": "Compromise Client Software Binary", - "reference": "https://attack.mitre.org/techniques/T1554/" - } - ] - } - ], - "id": "92e5c13c-16d4-470e-bea6-5405d0a189ae", - "rule_id": "88817a33-60d3-411f-ba79-7c905d865b2a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"macos\" and event.type in (\"change\", \"creation\") and file.extension : \"py\" and\n file.path :\n (\n \"/Users/*/Library/Application Support/Sublime Text*/Packages/*.py\",\n \"/Applications/Sublime Text.app/Contents/MacOS/sublime.py\"\n ) and\n not process.executable :\n (\n \"/Applications/Sublime Text*.app/Contents/*\",\n \"/usr/local/Cellar/git/*/bin/git\",\n \"/Library/Developer/CommandLineTools/usr/bin/git\",\n \"/usr/libexec/xpcproxy\",\n \"/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Resources/DesktopServicesHelper\"\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Sudo Hijacking Detected", - "description": "Identifies the creation of a sudo binary located at /usr/bin/sudo. Attackers may hijack the default sudo binary and replace it with a custom binary or script that can read the user's password in clear text to escalate privileges or enable persistence onto the system every time the sudo binary is executed.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://eapolsniper.github.io/2020/08/17/Sudo-Hijacking/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.003", - "name": "Sudo and Sudo Caching", - "reference": "https://attack.mitre.org/techniques/T1548/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/" - } - ] - } - ], - "id": "1226aa6e-56e5-4aca-8582-713875d4bde8", - "rule_id": "88fdcb8c-60e5-46ee-9206-2663adf1b1ce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "new_terms", - "query": "host.os.type:linux and event.category:file and event.type:(\"creation\" or \"file_create_event\") and\nfile.path:(\"/usr/bin/sudo\" or \"/bin/sudo\") and not process.name:(docker or dockerd)\n", - "new_terms_fields": [ - "host.id", - "user.id", - "process.executable" - ], - "history_window_start": "now-7d", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Suspicious WMI Image Load from MS Office", - "description": "Identifies a suspicious image load (wmiutils.dll) from Microsoft Office processes. This behavior may indicate adversarial activity where child processes are spawned via Windows Management Instrumentation (WMI). This technique can be used to execute code and evade traditional parent/child processes spawned from Microsoft Office products.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "583aac3d-fbf2-4683-a256-ddc7a12f7e17", - "rule_id": "891cb88e-441a-4c3e-be2d-120d99fe7b0d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "any where host.os.type == \"windows\" and\n (event.category : (\"library\", \"driver\") or (event.category == \"process\" and event.action : \"Image loaded*\")) and\n process.name : (\"WINWORD.EXE\", \"EXCEL.EXE\", \"POWERPNT.EXE\", \"MSPUB.EXE\", \"MSACCESS.EXE\") and\n (dll.name : \"wmiutils.dll\" or file.name : \"wmiutils.dll\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Persistence via DirectoryService Plugin Modification", - "description": "Identifies the creation or modification of a DirectoryService PlugIns (dsplug) file. The DirectoryService daemon launches on each system boot and automatically reloads after crash. It scans and executes bundles that are located in the DirectoryServices PlugIns folder and can be abused by adversaries to maintain persistence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.chichou.me/2019/11/21/two-macos-persistence-tricks-abusing-plugins/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/" - } - ] - } - ], - "id": "b17b5b05-8e9e-480b-b3ef-6a76576818ed", - "rule_id": "89fa6cb7-6b53-4de2-b604-648488841ab8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:file and host.os.type:macos and not event.type:deletion and\n file.path:/Library/DirectoryServices/PlugIns/*.dsplug\n", - "language": "kuery" - }, - { - "name": "Suspicious Symbolic Link Created", - "description": "Identifies the creation of a symbolic link to a suspicious file or location. A symbolic link is a reference to a file or directory that acts as a pointer or shortcut, allowing users to access the target file or directory from a different location in the file system. An attacker can potentially leverage symbolic links for privilege escalation by tricking a privileged process into following the symbolic link to a sensitive file, giving the attacker access to data or capabilities they would not normally have.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.008", - "name": "/etc/passwd and /etc/shadow", - "reference": "https://attack.mitre.org/techniques/T1003/008/" - } - ] - } - ] - } - ], - "id": "5be8bbd3-c776-4a92-9404-6879a64b3e6b", - "rule_id": "8a024633-c444-45c0-a4fe-78128d8c1ab6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "group.Ext.real.id", - "type": "unknown", - "ecs": false - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.working_directory", - "type": "keyword", - "ecs": true - }, - { - "name": "user.Ext.real.id", - "type": "unknown", - "ecs": false - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and\nevent.type == \"start\" and process.name == \"ln\" and process.args in (\"-s\", \"-sf\") and \n (\n /* suspicious files */\n (process.args in (\"/etc/shadow\", \"/etc/shadow-\", \"/etc/shadow~\", \"/etc/gshadow\", \"/etc/gshadow-\") or \n (process.working_directory == \"/etc\" and process.args in (\"shadow\", \"shadow-\", \"shadow~\", \"gshadow\", \"gshadow-\"))) or \n \n /* suspicious bins */\n (process.args in (\"/bin/bash\", \"/bin/dash\", \"/bin/sh\", \"/bin/tcsh\", \"/bin/csh\", \"/bin/zsh\", \"/bin/ksh\", \"/bin/fish\") or \n (process.working_directory == \"/bin\" and process.args : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\"))) or \n (process.args in (\"/usr/bin/bash\", \"/usr/bin/dash\", \"/usr/bin/sh\", \"/usr/bin/tcsh\", \"/usr/bin/csh\", \"/usr/bin/zsh\", \"/usr/bin/ksh\", \"/usr/bin/fish\") or \n (process.working_directory == \"/usr/bin\" and process.args in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\"))) or\n \n /* suspicious locations */\n (process.args : (\"/etc/cron.d/*\", \"/etc/cron.daily/*\", \"/etc/cron.hourly/*\", \"/etc/cron.weekly/*\", \"/etc/cron.monthly/*\")) or\n (process.args : (\"/home/*/.ssh/*\", \"/root/.ssh/*\",\"/etc/sudoers.d/*\", \"/dev/shm/*\"))\n ) and \n process.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\") and \n not user.Ext.real.id == \"0\" and not group.Ext.real.id == \"0\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Setuid / Setgid Bit Set via chmod", - "description": "An adversary may add the setuid or setgid bit to a file or directory in order to run a file with the privileges of the owning user or group. An adversary can take advantage of this to either do a shell escape or exploit a vulnerability in an application with the setuid or setgid bit to get code running in a different user’s context. Additionally, adversaries can use this mechanism on their own malware to make sure they're able to execute in elevated contexts in the future.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 33, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.001", - "name": "Setuid and Setgid", - "reference": "https://attack.mitre.org/techniques/T1548/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - } - ], - "id": "8c49c0ed-9a34-41c3-affa-6e039e4fca94", - "rule_id": "8a1b0278-0f9a-487d-96bd-d4833298e87a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process AND event.type:(start OR process_started) AND\n process.name:chmod AND process.args:(\"+s\" OR \"u+s\" OR /4[0-9]{3}/ OR g+s OR /2[0-9]{3}/) AND\n NOT process.args:\n (\n /.*\\/Applications\\/VirtualBox.app\\/.+/ OR\n /\\/usr\\/local\\/lib\\/python.+/ OR\n /\\/var\\/folders\\/.+\\/FP.*nstallHelper/ OR\n /\\/Library\\/Filesystems\\/.+/ OR\n /\\/usr\\/lib\\/virtualbox\\/.+/ OR\n /\\/Library\\/Application.*/ OR\n \"/run/postgresql\" OR\n \"/var/crash\" OR\n \"/var/run/postgresql\" OR\n /\\/usr\\/bin\\/.+/ OR /\\/usr\\/local\\/share\\/.+/ OR\n /\\/Applications\\/.+/ OR /\\/usr\\/libexec\\/.+/ OR\n \"/var/metrics\" OR /\\/var\\/lib\\/dpkg\\/.+/ OR\n /\\/run\\/log\\/journal\\/.*/ OR\n \\/Users\\/*\\/.minikube\\/bin\\/docker-machine-driver-hyperkit\n ) AND\n NOT process.parent.executable:\n (\n /\\/var\\/lib\\/docker\\/.+/ OR\n \"/System/Library/PrivateFrameworks/PackageKit.framework/Versions/A/XPCServices/package_script_service.xpc/Contents/MacOS/package_script_service\" OR\n \"/var/lib/dpkg/info/whoopsie.postinst\"\n )\n", - "language": "lucene" - }, - { - "name": "Executable File Creation with Multiple Extensions", - "description": "Masquerading can allow an adversary to evade defenses and better blend in with the environment. One way it occurs is when the name or location of a file is manipulated as a means of tricking a user into executing what they think is a benign file type but is actually executable code.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.007", - "name": "Double File Extension", - "reference": "https://attack.mitre.org/techniques/T1036/007/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1204", - "name": "User Execution", - "reference": "https://attack.mitre.org/techniques/T1204/", - "subtechnique": [ - { - "id": "T1204.002", - "name": "Malicious File", - "reference": "https://attack.mitre.org/techniques/T1204/002/" - } - ] - } - ] - } - ], - "id": "4404cedd-e5a4-4543-abff-4cf7a8aeec3e", - "rule_id": "8b2b3a62-a598-4293-bc14-3d5fa22bb98f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and file.extension : \"exe\" and\n file.name regex~ \"\"\".*\\.(vbs|vbe|bat|js|cmd|wsh|ps1|pdf|docx?|xlsx?|pptx?|txt|rtf|gif|jpg|png|bmp|hta|txt|img|iso)\\.exe\"\"\" and\n not (process.executable : (\"?:\\\\Windows\\\\System32\\\\msiexec.exe\", \"C:\\\\Users\\\\*\\\\QGIS_SCCM\\\\Files\\\\QGIS-OSGeo4W-*-Setup-x86_64.exe\") and\n file.path : \"?:\\\\Program Files\\\\QGIS *\\\\apps\\\\grass\\\\*.exe\") and\n not process.executable : (\"/bin/sh\", \"/usr/sbin/MailScanner\", \"/usr/bin/perl\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Enable Host Network Discovery via Netsh", - "description": "Identifies use of the netsh.exe program to enable host discovery via the network. Attackers can use this command-line tool to weaken the host firewall settings.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Enable Host Network Discovery via Netsh\n\nThe Windows Defender Firewall is a native component that provides host-based, two-way network traffic filtering for a device and blocks unauthorized network traffic flowing into or out of the local device.\n\nAttackers can enable Network Discovery on the Windows firewall to find other systems present in the same network. Systems with this setting enabled will communicate with other systems using broadcast messages, which can be used to identify targets for lateral movement. This rule looks for the setup of this setting using the netsh utility.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Inspect the host for suspicious or abnormal behavior in the alert timeframe.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Analysts can dismiss the alert if the Administrator is aware of the activity and there are justifications for this configuration.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Disable Network Discovery:\n - Using netsh: `netsh advfirewall firewall set rule group=\"Network Discovery\" new enable=No`\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Host Windows Firewall planned system administration changes." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.004", - "name": "Disable or Modify System Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/004/" - } - ] - } - ] - } - ], - "id": "19a09fd9-269c-4aa4-81da-b631bb4a2547", - "rule_id": "8b4f0816-6a65-4630-86a6-c21c179c0d09", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\nprocess.name : \"netsh.exe\" and\nprocess.args : (\"firewall\", \"advfirewall\") and process.args : \"group=Network Discovery\" and process.args : \"enable=Yes\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential SharpRDP Behavior", - "description": "Identifies potential behavior of SharpRDP, which is a tool that can be used to perform authenticated command execution against a remote target via Remote Desktop Protocol (RDP) for the purposes of lateral movement.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://posts.specterops.io/revisiting-remote-desktop-lateral-movement-8fb905cb46c3", - "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Lateral%20Movement/LM_sysmon_3_12_13_1_SharpRDP.evtx" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.001", - "name": "Remote Desktop Protocol", - "reference": "https://attack.mitre.org/techniques/T1021/001/" - } - ] - } - ] - } - ], - "id": "521e7627-d599-407e-be0a-0b13b75384b2", - "rule_id": "8c81e506-6e82-4884-9b9a-75d3d252f967", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "/* Incoming RDP followed by a new RunMRU string value set to cmd, powershell, taskmgr or tsclient, followed by process execution within 1m */\n\nsequence by host.id with maxspan=1m\n [network where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"svchost.exe\" and destination.port == 3389 and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ]\n\n [registry where host.os.type == \"windows\" and process.name : \"explorer.exe\" and\n registry.path : (\"HKEY_USERS\\\\*\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\RunMRU\\\\*\") and\n registry.data.strings : (\"cmd.exe*\", \"powershell.exe*\", \"taskmgr*\", \"\\\\\\\\tsclient\\\\*.exe\\\\*\")\n ]\n\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.parent.name : (\"cmd.exe\", \"powershell.exe\", \"taskmgr.exe\") or process.args : (\"\\\\\\\\tsclient\\\\*.exe\")) and\n not process.name : \"conhost.exe\"\n ]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Incoming DCOM Lateral Movement with ShellBrowserWindow or ShellWindows", - "description": "Identifies use of Distributed Component Object Model (DCOM) to run commands from a remote host, which are launched via the ShellBrowserWindow or ShellWindows Application COM Object. This behavior may indicate an attacker abusing a DCOM application to stealthily move laterally.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.003", - "name": "Distributed Component Object Model", - "reference": "https://attack.mitre.org/techniques/T1021/003/" - } - ] - } - ] - } - ], - "id": "4d368b03-a74d-4baa-bfec-0668f36545de", - "rule_id": "8f919d4b-a5af-47ca-a594-6be59cd924a4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "network.transport", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "source.port", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=5s\n [network where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"explorer.exe\" and\n network.direction : (\"incoming\", \"ingress\") and network.transport == \"tcp\" and\n source.port > 49151 and destination.port > 49151 and source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ] by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"explorer.exe\"\n ] by process.parent.entity_id\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Keychain Password Retrieval via Command Line", - "description": "Adversaries may collect keychain storage data from a system to in order to acquire credentials. Keychains are the built-in way for macOS to keep track of users' passwords and credentials for many services and features, including Wi-Fi and website passwords, secure notes, certificates, and Kerberos.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Applications for password management." - ], - "references": [ - "https://www.netmeister.org/blog/keychain-passwords.html", - "https://github.com/priyankchheda/chrome_password_grabber/blob/master/chrome.py", - "https://ss64.com/osx/security.html", - "https://www.intezer.com/blog/research/operation-electrorat-attacker-creates-fake-companies-to-drain-your-crypto-wallets/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/", - "subtechnique": [ - { - "id": "T1555.001", - "name": "Keychain", - "reference": "https://attack.mitre.org/techniques/T1555/001/" - } - ] - }, - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/", - "subtechnique": [ - { - "id": "T1555.003", - "name": "Credentials from Web Browsers", - "reference": "https://attack.mitre.org/techniques/T1555/003/" - } - ] - } - ] - } - ], - "id": "2ea2d004-ad5c-4b0f-b632-cf887d30a1f9", - "rule_id": "9092cd6c-650f-4fa3-8a8a-28256c7489c9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type == \"start\" and\n process.name : \"security\" and process.args : \"-wa\" and process.args : (\"find-generic-password\", \"find-internet-password\") and\n process.args : (\"Chrome*\", \"Chromium\", \"Opera\", \"Safari*\", \"Brave\", \"Microsoft Edge\", \"Edge\", \"Firefox*\") and\n not process.parent.executable : \"/Applications/Keeper Password Manager.app/Contents/Frameworks/Keeper Password Manager Helper*/Contents/MacOS/Keeper Password Manager Helper*\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual Web User Agent", - "description": "A machine learning job detected a rare and unusual user agent indicating web browsing activity by an unusual process other than a web browser. This can be due to persistence, command-and-control, or exfiltration activity. Uncommon user agents coming from remote sources to local destinations are often the result of scanners, bots, and web scrapers, which are part of common Internet background traffic. Much of this is noise, but more targeted attacks on websites using tools like Burp or SQLmap can sometimes be discovered by spotting uncommon user agents. Uncommon user agents in traffic from local sources to remote destinations can be any number of things, including harmless programs like weather monitoring or stock-trading programs. However, uncommon user agents from local sources can also be due to malware or scanning activity.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Command and Control" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Web activity that is uncommon, like security scans, may trigger this alert and may need to be excluded. A new or rarely used program that calls web services may trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/", - "subtechnique": [ - { - "id": "T1071.001", - "name": "Web Protocols", - "reference": "https://attack.mitre.org/techniques/T1071/001/" - } - ] - } - ] - } - ], - "id": "86a60826-6b37-4d8c-8761-b724f041aa6a", - "rule_id": "91f02f01-969f-4167-8d77-07827ac4cee0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": "packetbeat_rare_user_agent" - }, - { - "name": "Unusual Web Request", - "description": "A machine learning job detected a rare and unusual URL that indicates unusual web browsing activity. This can be due to initial access, persistence, command-and-control, or exfiltration activity. For example, in a strategic web compromise or watering hole attack, when a trusted website is compromised to target a particular sector or organization, targeted users may receive emails with uncommon URLs for trusted websites. These URLs can be used to download and run a payload. When malware is already running, it may send requests to uncommon URLs on trusted websites the malware uses for command-and-control communication. When rare URLs are observed being requested for a local web server by a remote source, these can be due to web scanning, enumeration or attack traffic, or they can be due to bots and web scrapers which are part of common Internet background traffic.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Command and Control" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Web activity that occurs rarely in small quantities can trigger this alert. Possible examples are browsing technical support or vendor URLs that are used very sparsely. A user who visits a new and unique web destination may trigger this alert when the activity is sparse. Web applications that generate URLs unique to a transaction may trigger this when they are used sparsely. Web domains can be excluded in cases such as these." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/", - "subtechnique": [ - { - "id": "T1071.001", - "name": "Web Protocols", - "reference": "https://attack.mitre.org/techniques/T1071/001/" - } - ] - } - ] - } - ], - "id": "4f1ecf8a-8b1d-4f34-bbba-9a9f2fc57ead", - "rule_id": "91f02f01-969f-4167-8f55-07827ac3acc9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": "packetbeat_rare_urls" - }, - { - "name": "DNS Tunneling", - "description": "A machine learning job detected unusually large numbers of DNS queries for a single top-level DNS domain, which is often used for DNS tunneling. DNS tunneling can be used for command-and-control, persistence, or data exfiltration activity. For example, dnscat tends to generate many DNS questions for a top-level domain as it uses the DNS protocol to tunnel data.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Command and Control" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "DNS domains that use large numbers of child domains, such as software or content distribution networks, can trigger this alert and such parent domains can be excluded." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - } - ], - "id": "f0847bfa-a551-406e-8fc0-e9aef0ff705e", - "rule_id": "91f02f01-969f-4167-8f66-07827ac3bdd9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": "packetbeat_dns_tunneling" - }, - { - "name": "A scheduled task was created", - "description": "Indicates the creation of a scheduled task using Windows event logs. Adversaries can use these to establish persistence, move laterally, and/or escalate privileges.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 7, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate scheduled tasks may be created during installation of new software." - ], - "references": [ - "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4698" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "7d32fa0a-057e-4de7-98cc-6ec292164405", - "rule_id": "92a6faf5-78ec-4e25-bea1-73bacc9b59d9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.TaskName", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "iam where event.action == \"scheduled-task-created\" and\n\n /* excluding tasks created by the computer account */\n not user.name : \"*$\" and\n\n /* TaskContent is not parsed, exclude by full taskname noisy ones */\n not winlog.event_data.TaskName :\n (\"\\\\OneDrive Standalone Update Task-S-1-5-21*\",\n \"\\\\OneDrive Standalone Update Task-S-1-12-1-*\",\n \"\\\\Hewlett-Packard\\\\HP Web Products Detection\",\n \"\\\\Hewlett-Packard\\\\HPDeviceCheck\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Suspicious SolarWinds Child Process", - "description": "A suspicious SolarWinds child process was detected, which may indicate an attempt to execute malicious programs.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trusted SolarWinds child processes, verify process details such as network connections and file writes." - ], - "references": [ - "https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html", - "https://github.com/mandiant/sunburst_countermeasures/blob/main/rules/SUNBURST/hxioc/SUNBURST%20SUSPICIOUS%20CHILD%20PROCESSES%20(METHODOLOGY).ioc" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1106", - "name": "Native API", - "reference": "https://attack.mitre.org/techniques/T1106/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1195", - "name": "Supply Chain Compromise", - "reference": "https://attack.mitre.org/techniques/T1195/", - "subtechnique": [ - { - "id": "T1195.002", - "name": "Compromise Software Supply Chain", - "reference": "https://attack.mitre.org/techniques/T1195/002/" - } - ] - } - ] - } - ], - "id": "b3cb40bf-04bc-48bf-81d9-e0644897060f", - "rule_id": "93b22c0a-06a0-4131-b830-b10d5e166ff4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name: (\"SolarWinds.BusinessLayerHost.exe\", \"SolarWinds.BusinessLayerHostx64.exe\") and\n not process.name : (\n \"APMServiceControl*.exe\",\n \"ExportToPDFCmd*.Exe\",\n \"SolarWinds.Credentials.Orion.WebApi*.exe\",\n \"SolarWinds.Orion.Topology.Calculator*.exe\",\n \"Database-Maint.exe\",\n \"SolarWinds.Orion.ApiPoller.Service.exe\",\n \"WerFault.exe\",\n \"WerMgr.exe\",\n \"SolarWinds.BusinessLayerHost.exe\",\n \"SolarWinds.BusinessLayerHostx64.exe\") and\n not process.executable : (\"?:\\\\Windows\\\\SysWOW64\\\\ARP.EXE\", \"?:\\\\Windows\\\\SysWOW64\\\\lodctr.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\unlodctr.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Encoded Executable Stored in the Registry", - "description": "Identifies registry write modifications to hide an encoded portable executable. This could be indicative of adversary defense evasion by avoiding the storing of malicious content directly on disk.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - }, - { - "id": "T1140", - "name": "Deobfuscate/Decode Files or Information", - "reference": "https://attack.mitre.org/techniques/T1140/" - } - ] - } - ], - "id": "ca69e4d5-caed-405c-a9e9-9ff255be00ca", - "rule_id": "93c1ce76-494c-4f01-8167-35edfb52f7b1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n/* update here with encoding combinations */\n registry.data.strings : \"TVqQAAMAAAAEAAAA*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Google Workspace Admin Role Deletion", - "description": "Detects when a custom admin role is deleted. An adversary may delete a custom admin role in order to impact the permissions or capabilities of system administrators.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace Admin Role Deletion\n\nGoogle Workspace roles allow administrators to assign specific permissions to users or groups where the principle of least privilege (PoLP) is recommended. Admin roles in Google Workspace grant users access to the Google Admin console, where further domain-wide settings are accessible. Google Workspace contains prebuilt administrator roles for performing business functions related to users, groups, and services. Custom administrator roles can be created where prebuilt roles are not preferred.\n\nDeleted administrator roles may render some user accounts inaccessible or cause operational failure where these roles are relied upon to perform daily administrative tasks. The deletion of roles may also hinder the response and remediation actions of administrators responding to security-related alerts and events. Without specific roles assigned, users will inherit the permissions and privileges of the root organizational unit.\n\nThis rule identifies when a Google Workspace administrative role is deleted within the Google Admin console.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- Identify the role deleted by reviewing `google_workspace.admin.role.name` in the alert.\n- With the user identified, verify if he has administrative privileges to disable or delete administrative roles.\n- To identify other users affected by this role removed, search for `event.action: ASSIGN_ROLE`.\n - Add `google_workspace.admin.role.name` with the role deleted as an additional filter.\n - Adjust the relative time accordingly to identify all users that were assigned this admin role.\n\n### False positive analysis\n\n- After identifying the user account that disabled the admin role, verify the action was intentional.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Discuss with the user the affected users as a result of this action to mitigate operational discrepencies.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Identity and Access Audit", - "Tactic: Impact", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Google Workspace admin roles may be deleted by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://support.google.com/a/answer/2406043?hl=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1531", - "name": "Account Access Removal", - "reference": "https://attack.mitre.org/techniques/T1531/" - } - ] - } - ], - "id": "fda0574e-d81b-44cd-bb14-4c5f41adaded", - "rule_id": "93e63c3e-4154-4fc6-9f86-b411e0987bbf", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:DELETE_ROLE\n", - "language": "kuery" - }, - { - "name": "Group Policy Discovery via Microsoft GPResult Utility", - "description": "Detects the usage of gpresult.exe to query group policy objects. Attackers may query group policy objects during the reconnaissance phase after compromising a system to gain a better understanding of the active directory environment and possible methods to escalate privileges or move laterally.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1615", - "name": "Group Policy Discovery", - "reference": "https://attack.mitre.org/techniques/T1615/" - } - ] - } - ], - "id": "0f6c3d06-0ac4-4475-8043-9d06985d5a90", - "rule_id": "94a401ba-4fa2-455c-b7ae-b6e037afc0b7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n(process.name: \"gpresult.exe\" or process.pe.original_file_name == \"gprslt.exe\") and process.args: (\"/z\", \"/v\", \"/r\", \"/x\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Google Workspace Custom Gmail Route Created or Modified", - "description": "Detects when a custom Gmail route is added or modified in Google Workspace. Adversaries can add a custom e-mail route for outbound mail to route these e-mails to their own inbox of choice for data gathering. This allows adversaries to capture sensitive information from e-mail and potential attachments, such as invoices or payment documents. By default, all email from current Google Workspace users with accounts are routed through a domain's mail server for inbound and outbound mail.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace Custom Gmail Route Created or Modified\n\nGmail is a popular cloud-based email service developed and managed by Google. Gmail is one of many services available for users with Google Workspace accounts.\n\nThreat actors often send phishing emails containing malicious URL links or attachments to corporate Gmail accounts. Google Workspace identity relies on the corporate user Gmail account and if stolen, allows threat actors to further their intrusion efforts from valid user accounts.\n\nThis rule identifies the creation of a custom global Gmail route by an administrator from the Google Workspace admin console. Custom email routes could indicate an attempt to secretly forward sensitive emails to unintentional recipients.\n\n#### Possible investigation steps\n\n- Identify the user account that created the custom email route and verify that they should have administrative privileges.\n- Review the added recipients from the custom email route and confidentiality of potential email contents.\n- Identify the user account, then review `event.action` values for related activity within the last 48 hours.\n- If the Google Workspace license is Enterprise Plus or Education Plus, search for emails matching the route filters. To find the Gmail event logs, go to `Reporting > Audit and investigation > Gmail log events`.\n- If existing emails have been sent and match the custom route criteria, review the sender and contents for malicious URL links and attachments.\n- Identified URLs or attachments can be submitted to VirusTotal for reputational services.\n\n### False positive analysis\n\n- This rule searches for domain-wide custom email routes created in the admin console of Google Workspace. Administrators might create custom email routes to fulfill organizational requirements.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 106, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Tactic: Collection", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Administrators may create custom email routes in Google Workspace based on organizational policies, administrative preference or for security purposes regarding spam." - ], - "references": [ - "https://support.google.com/a/answer/2685650?hl=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1114", - "name": "Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/", - "subtechnique": [ - { - "id": "T1114.003", - "name": "Email Forwarding Rule", - "reference": "https://attack.mitre.org/techniques/T1114/003/" - } - ] - } - ] - } - ], - "id": "c96e87b8-4a7e-4b49-8723-853a9083c193", - "rule_id": "9510add4-3392-11ed-bd01-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.admin.setting.name", - "type": "keyword", - "ecs": false - }, - { - "name": "google_workspace.event.type", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:\"google_workspace.admin\" and event.action:(\"CREATE_GMAIL_SETTING\" or \"CHANGE_GMAIL_SETTING\")\n and google_workspace.event.type:\"EMAIL_SETTINGS\" and google_workspace.admin.setting.name:(\"EMAIL_ROUTE\" or \"MESSAGE_SECURITY_RULE\")\n", - "language": "kuery" - }, - { - "name": "Remote Scheduled Task Creation", - "description": "Identifies remote scheduled task creations on a target host. This could be indicative of adversary lateral movement.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remote Scheduled Task Creation\n\n[Scheduled tasks](https://docs.microsoft.com/en-us/windows/win32/taskschd/about-the-task-scheduler) are a great mechanism for persistence and program execution. These features can be used remotely for a variety of legitimate reasons, but at the same time used by malware and adversaries. When investigating scheduled tasks that were set up remotely, one of the first steps should be to determine the original intent behind the configuration and to verify if the activity is tied to benign behavior such as software installation or any kind of network administrator work. One objective for these alerts is to understand the configured action within the scheduled task. This is captured within the registry event data for this rule and can be base64 decoded to view the value.\n\n#### Possible investigation steps\n\n- Review the base64 encoded tasks actions registry value to investigate the task configured action.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Further examination should include review of host-based artifacts and network logs from around when the scheduled task was created, on both the source and target machines.\n\n### False positive analysis\n\n- There is a high possibility of benign activity tied to the creation of remote scheduled tasks as it is a general feature within Windows and used for legitimate purposes for a wide range of activity. Any kind of context should be found to further understand the source of the activity and determine the intent based on the scheduled task's contents.\n\n### Related rules\n\n- Service Command Lateral Movement - d61cbcf8-1bc1-4cff-85ba-e7b21c5beedc\n- Remotely Started Services via RPC - aa9a274d-6b53-424d-ac5e-cb8ca4251650\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Remove scheduled task and any other related artifacts.\n- Review privileged account management and user account management settings. Consider implementing group policy object (GPO) policies to further restrict activity, or configuring settings that only allow administrators to create remote scheduled tasks.\n", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "c4352786-a04a-4345-9000-fbce9e5230dc", - "rule_id": "954ee7c8-5437-49ae-b2d6-2960883898e9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "source.port", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "/* Task Scheduler service incoming connection followed by TaskCache registry modification */\n\nsequence by host.id, process.entity_id with maxspan = 1m\n [network where host.os.type == \"windows\" and process.name : \"svchost.exe\" and\n network.direction : (\"incoming\", \"ingress\") and source.port >= 49152 and destination.port >= 49152 and\n source.ip != \"127.0.0.1\" and source.ip != \"::1\"\n ]\n [registry where host.os.type == \"windows\" and registry.path : \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Schedule\\\\TaskCache\\\\Tasks\\\\*\\\\Actions\"]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Access to Keychain Credentials Directories", - "description": "Adversaries may collect the keychain storage data from a system to acquire credentials. Keychains are the built-in way for macOS to keep track of users' passwords and credentials for many services and features such as WiFi passwords, websites, secure notes and certificates.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://objective-see.com/blog/blog_0x25.html", - "https://securelist.com/calisto-trojan-for-macos/86543/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/", - "subtechnique": [ - { - "id": "T1555.001", - "name": "Keychain", - "reference": "https://attack.mitre.org/techniques/T1555/001/" - } - ] - } - ] - } - ], - "id": "1c212cbf-393f-41dd-85af-a4af9725ac09", - "rule_id": "96e90768-c3b7-4df6-b5d9-6237f8bc36a8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.args :\n (\n \"/Users/*/Library/Keychains/*\",\n \"/Library/Keychains/*\",\n \"/Network/Library/Keychains/*\",\n \"System.keychain\",\n \"login.keychain-db\",\n \"login.keychain\"\n ) and\n not process.args : (\"find-certificate\",\n \"add-trusted-cert\",\n \"set-keychain-settings\",\n \"delete-certificate\",\n \"/Users/*/Library/Keychains/openvpn.keychain-db\",\n \"show-keychain-info\",\n \"lock-keychain\",\n \"set-key-partition-list\",\n \"import\",\n \"find-identity\") and\n not process.parent.executable :\n (\n \"/Applications/OpenVPN Connect/OpenVPN Connect.app/Contents/MacOS/OpenVPN Connect\",\n \"/Applications/Microsoft Defender.app/Contents/MacOS/wdavdaemon_enterprise.app/Contents/MacOS/wdavdaemon_enterprise\",\n \"/opt/jc/bin/jumpcloud-agent\"\n ) and\n not process.executable : \"/opt/jc/bin/jumpcloud-agent\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "MacOS Installer Package Spawns Network Event", - "description": "Detects the execution of a MacOS installer package with an abnormal child process (e.g bash) followed immediately by a network connection via a suspicious process (e.g curl). Threat actors will build and distribute malicious MacOS installer packages, which have a .pkg extension, many times imitating valid software in order to persuade and infect their victims often using the package files (e.g pre/post install scripts etc.) to download additional tools or malicious software. If this rule fires it should indicate the installation of a malicious or suspicious package.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Command and Control", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Custom organization-specific macOS packages that use .pkg files to run cURL could trigger this rule. If known behavior is causing false positives, it can be excluded from the rule." - ], - "references": [ - "https://redcanary.com/blog/clipping-silver-sparrows-wings", - "https://posts.specterops.io/introducing-mystikal-4fbd2f7ae520", - "https://github.com/D00MFist/Mystikal" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.007", - "name": "JavaScript", - "reference": "https://attack.mitre.org/techniques/T1059/007/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/", - "subtechnique": [ - { - "id": "T1071.001", - "name": "Web Protocols", - "reference": "https://attack.mitre.org/techniques/T1071/001/" - } - ] - } - ] - } - ], - "id": "67ce7dc7-e9d1-4a03-b071-6ed2f106e12b", - "rule_id": "99239e7d-b0d4-46e3-8609-acafcf99f68c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, user.id with maxspan=30s\n[process where host.os.type == \"macos\" and event.type == \"start\" and event.action == \"exec\" and process.parent.name : (\"installer\", \"package_script_service\") and process.name : (\"bash\", \"sh\", \"zsh\", \"python\", \"osascript\", \"tclsh*\")]\n[network where host.os.type == \"macos\" and event.type == \"start\" and process.name : (\"curl\", \"osascript\", \"wget\", \"python\")]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Spike in Failed Logon Events", - "description": "A machine learning job found an unusually large spike in authentication failure events. This can be due to password spraying, user enumeration or brute force activity and may be a precursor to account takeover or credentialed access.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Spike in Failed Logon Events\n\nThis rule uses a machine learning job to detect a substantial spike in failed authentication events. This could indicate attempts to enumerate users, password spraying, brute force, etc.\n\n#### Possible investigation steps\n\n- Identify the users involved and if the activity targets a specific user or a set of users.\n- Check if the authentication comes from different sources.\n- Investigate if the host where the failed authentication events occur is exposed to the internet.\n - If the host is exposed to the internet, and the source of these attempts is external, the activity can be related to bot activity and possibly not directed at your organization.\n - If the host is not exposed to the internet, investigate the hosts where the authentication attempts are coming from, as this can indicate that they are compromised and the attacker is trying to move laterally.\n- Investigate other alerts associated with the involved users and hosts during the past 48 hours.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Investigate whether there are successful authentication events from the involved sources. This could indicate a successful brute force or password spraying attack.\n\n### False positive analysis\n\n- If the account is used in automation tasks, it is possible that they are using expired credentials, causing a spike in authentication failures.\n- Authentication failures can be related to permission issues.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Assess whether the asset should be exposed to the internet, and take action to reduce your attack surface.\n - If the asset needs to be exposed to the internet, restrict access to remote login services to specific IPs.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 104, - "tags": [ - "Use Case: Identity and Access Audit", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Credential Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A misconfigured service account can trigger this alert. A password change on an account used by an email client can trigger this alert. Security test cycles that include brute force or password spraying activities may trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "11c2033b-1593-4725-91c5-5cb5aa5e7671", - "rule_id": "99dcf974-6587-4f65-9252-d866a3fdfd9c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "auth_high_count_logon_fails" - }, - { - "name": "Remote Logon followed by Scheduled Task Creation", - "description": "Identifies a remote logon followed by a scheduled task creation on the target host. This could be indicative of adversary lateral movement.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Remote Scheduled Task Creation\n\n[Scheduled tasks](https://docs.microsoft.com/en-us/windows/win32/taskschd/about-the-task-scheduler) are a great mechanism for persistence and program execution. These features can be used remotely for a variety of legitimate reasons, but at the same time used by malware and adversaries. When investigating scheduled tasks that were set up remotely, one of the first steps should be to determine the original intent behind the configuration and to verify if the activity is tied to benign behavior such as software installation or any kind of network administrator work. One objective for these alerts is to understand the configured action within the scheduled task. This is captured within the registry event data for this rule and can be base64 decoded to view the value.\n\n#### Possible investigation steps\n\n- Review the TaskContent value to investigate the task configured action.\n- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.\n- Further examination should include review of host-based artifacts and network logs from around when the scheduled task was created, on both the source and target machines.\n\n### False positive analysis\n\n- There is a high possibility of benign activity tied to the creation of remote scheduled tasks as it is a general feature within Windows and used for legitimate purposes for a wide range of activity. Any kind of context should be found to further understand the source of the activity and determine the intent based on the scheduled task's contents.\n\n### Related rules\n\n- Service Command Lateral Movement - d61cbcf8-1bc1-4cff-85ba-e7b21c5beedc\n- Remotely Started Services via RPC - aa9a274d-6b53-424d-ac5e-cb8ca4251650\n- Remote Scheduled Task Creation - 954ee7c8-5437-49ae-b2d6-2960883898e9\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Remove scheduled task and any other related artifacts.\n- Review privileged account management and user account management settings. Consider implementing group policy object (GPO) policies to further restrict activity, or configuring settings that only allow administrators to create remote scheduled tasks.\n", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "76d989ec-f1b4-434f-96dd-6679c81e1c87", - "rule_id": "9c865691-5599-447a-bac9-b3f2df5f9a9d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectLogonId", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectUserName", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetLogonId", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.logon.type", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "/* Network Logon followed by Scheduled Task creation */\n\nsequence by winlog.computer_name with maxspan=1m\n [authentication where event.action == \"logged-in\" and\n winlog.logon.type == \"Network\" and event.outcome == \"success\" and\n not user.name == \"ANONYMOUS LOGON\" and not winlog.event_data.SubjectUserName : \"*$\" and\n not user.domain == \"NT AUTHORITY\" and source.ip != \"127.0.0.1\" and source.ip !=\"::1\"] by winlog.event_data.TargetLogonId\n\n [iam where event.action == \"scheduled-task-created\"] by winlog.event_data.SubjectLogonId\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Process Injection by the Microsoft Build Engine", - "description": "An instance of MSBuild, the Microsoft Build Engine, created a thread in another process. This technique is sometimes used to evade detection or elevate privileges.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Privilege Escalation", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "The Build Engine is commonly used by Windows developers but use by non-engineers is unusual." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - }, - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/", - "subtechnique": [ - { - "id": "T1127.001", - "name": "MSBuild", - "reference": "https://attack.mitre.org/techniques/T1127/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - } - ], - "id": "08a3a24a-53bd-4928-8bc3-e9f643546f26", - "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "process.name:MSBuild.exe and host.os.type:windows and event.action:\"CreateRemoteThread detected (rule: CreateRemoteThread)\"\n", - "language": "kuery" - }, - { - "name": "LaunchDaemon Creation or Modification and Immediate Loading", - "description": "Indicates the creation or modification of a launch daemon, which adversaries may use to repeatedly execute malicious payloads as part of persistence.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trusted applications persisting via LaunchDaemons" - ], - "references": [ - "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/" - } - ] - } - ], - "id": "2a8ea69c-b841-453c-904b-943f0554f3b3", - "rule_id": "9d19ece6-c20e-481a-90c5-ccca596537de", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=1m\n [file where host.os.type == \"macos\" and event.type != \"deletion\" and file.path : (\"/System/Library/LaunchDaemons/*\", \"/Library/LaunchDaemons/*\")]\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name == \"launchctl\" and process.args == \"load\"]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual Linux Process Calling the Metadata Service", - "description": "Looks for anomalous access to the metadata service by an unusual process. The metadata service may be targeted in order to harvest credentials or user data scripts containing secrets.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program or one that runs very rarely as part of a monthly or quarterly workflow could trigger this detection rule." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.005", - "name": "Cloud Instance Metadata API", - "reference": "https://attack.mitre.org/techniques/T1552/005/" - } - ] - } - ] - } - ], - "id": "e3793710-8ccd-4a7d-828d-7fd474738fce", - "rule_id": "9d302377-d226-4e12-b54c-1906b5aec4f6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_linux_rare_metadata_process" - ] - }, - { - "name": "InstallUtil Process Making Network Connections", - "description": "Identifies InstallUtil.exe making outbound network connections. This may indicate adversarial activity as InstallUtil is often leveraged by adversaries to execute code and evade detection.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.004", - "name": "InstallUtil", - "reference": "https://attack.mitre.org/techniques/T1218/004/" - } - ] - } - ] - } - ], - "id": "63796665-a801-4f3e-b79c-18d142935b67", - "rule_id": "a13167f1-eec2-4015-9631-1fee60406dcf", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "/* the benefit of doing this as an eql sequence vs kql is this will limit to alerting only on the first network connection */\n\nsequence by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"installutil.exe\"]\n [network where host.os.type == \"windows\" and process.name : \"installutil.exe\" and network.direction : (\"outgoing\", \"egress\")]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Windows Subsystem for Linux Distribution Installed", - "description": "Detects changes to the registry that indicates the install of a new Windows Subsystem for Linux distribution by name. Adversaries may enable and use WSL for Linux to avoid detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "timeline_id": "3e47ef71-ebfc-4520-975c-cb27fc090799", - "timeline_title": "Comprehensive Registry Timeline", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://learn.microsoft.com/en-us/windows/wsl/wsl-config" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - }, - { - "id": "T1202", - "name": "Indirect Command Execution", - "reference": "https://attack.mitre.org/techniques/T1202/" - } - ] - } - ], - "id": "facf7f66-86a1-4a57-8e77-25962165c82c", - "rule_id": "a1699af0-8e1e-4ed0-8ec1-89783538a061", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and\n registry.path : \n (\"HK*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Lxss\\\\*\\\\PackageFamilyName\",\n \"\\\\REGISTRY\\\\*\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Lxss\\\\*\\\\PackageFamilyName\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Google Workspace Restrictions for Google Marketplace Modified to Allow Any App", - "description": "Detects when the Google Marketplace restrictions are changed to allow any application for users in Google Workspace. Malicious APKs created by adversaries may be uploaded to the Google marketplace but not installed on devices managed within Google Workspace. Administrators should set restrictions to not allow any application from the marketplace for security reasons. Adversaries may enable any app to be installed and executed on mobile devices within a Google Workspace environment prior to distributing the malicious APK to the end user.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace Restrictions for Google Marketplace Modified to Allow Any App\n\nGoogle Workspace Marketplace is an online store for free and paid web applications that work with Google Workspace services and third-party software. Listed applications are based on Google APIs or Google Apps Script and created by both Google and third-party developers.\n\nMarketplace applications require access to specific Google Workspace resources. Applications can be installed by individual users, if they have permission, or can be installed for an entire Google Workspace domain by administrators. Consent screens typically display what permissions and privileges the application requires during installation. As a result, malicious Marketplace applications may require more permissions than necessary or have malicious intent.\n\nGoogle clearly states that they are not responsible for any product on the Marketplace that originates from a source other than Google.\n\nThis rule identifies when the global allow-all setting is enabled for Google Workspace Marketplace applications.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- This rule relies on data from `google_workspace.admin`, thus indicating the associated user has administrative privileges to the Marketplace.\n- Search for `event.action` is `ADD_APPLICATION` to identify applications installed after these changes were made.\n - The `google_workspace.admin.application.name` field will help identify what applications were added.\n- With the user account, review other potentially related events within the last 48 hours.\n- Re-assess the permissions and reviews of the Marketplace applications to determine if they violate organizational policies or introduce unexpected risks.\n- With access to the Google Workspace admin console, determine if the application was installed domain-wide or individually by visiting `Apps > Google Workspace Marketplace Apps`.\n\n### False positive analysis\n\n- Identify the user account associated with this action and assess their administrative privileges with Google Workspace Marketplace.\n- Google Workspace administrators may intentionally add an application from the marketplace based on organizational needs.\n - Follow up with the user who added the application to ensure this was intended.\n- Verify the application identified has been assessed thoroughly by an administrator.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 106, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Applications can be added and removed from blocklists by Google Workspace administrators, but they can all be explicitly allowed for users. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://support.google.com/a/answer/6089179?hl=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "d3625acb-bd42-4bc6-9592-f90a331d3a71", - "rule_id": "a2795334-2499-11ed-9e1a-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.admin.application.name", - "type": "keyword", - "ecs": false - }, - { - "name": "google_workspace.admin.new_value", - "type": "keyword", - "ecs": false - }, - { - "name": "google_workspace.admin.setting.name", - "type": "keyword", - "ecs": false - }, - { - "name": "google_workspace.event.type", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:\"google_workspace.admin\" and event.action:\"CHANGE_APPLICATION_SETTING\" and event.category:(iam or configuration)\n and google_workspace.event.type:\"APPLICATION_SETTINGS\" and google_workspace.admin.application.name:\"Google Workspace Marketplace\"\n and google_workspace.admin.setting.name:\"Apps Access Setting Allowlist access\" and google_workspace.admin.new_value:\"ALLOW_ALL\"\n", - "language": "kuery" - }, - { - "name": "Execution via local SxS Shared Module", - "description": "Identifies the creation, change, or deletion of a DLL module within a Windows SxS local folder. Adversaries may abuse shared modules to execute malicious payloads by instructing the Windows module loader to load DLLs from arbitrary local paths.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\nThe SxS DotLocal folder is a legitimate feature that can be abused to hijack standard modules loading order by forcing an executable on the same application.exe.local folder to load a malicious DLL module from the same directory.", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-redirection" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1129", - "name": "Shared Modules", - "reference": "https://attack.mitre.org/techniques/T1129/" - } - ] - } - ], - "id": "f82b921c-ffb8-4fcc-af28-9e85e031f6c9", - "rule_id": "a3ea12f3-0d4e-4667-8b44-4230c63f3c75", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and file.extension : \"dll\" and file.path : \"C:\\\\*\\\\*.exe.local\\\\*.dll\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Windows Registry File Creation in SMB Share", - "description": "Identifies the creation or modification of a medium-size registry hive file on a Server Message Block (SMB) share, which may indicate an exfiltration attempt of a previously dumped Security Account Manager (SAM) registry hive for credential extraction on an attacker-controlled system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Windows Registry File Creation in SMB Share\n\nDumping registry hives is a common way to access credential information. Some hives store credential material, as is the case for the SAM hive, which stores locally cached credentials (SAM secrets), and the SECURITY hive, which stores domain cached credentials (LSA secrets). Dumping these hives in combination with the SYSTEM hive enables the attacker to decrypt these secrets.\n\nAttackers can try to evade detection on the host by transferring this data to a system that is not monitored to be parsed and decrypted. This rule identifies the creation or modification of a medium-size registry hive file on an SMB share, which may indicate this kind of exfiltration attempt.\n\n#### Possible investigation steps\n\n- Investigate other alerts associated with the user/source host during the past 48 hours.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Inspect the source host for suspicious or abnormal behaviors in the alert timeframe.\n- Capture the registry file(s) to determine the extent of the credential compromise in an eventual incident response.\n\n### False positive analysis\n\n- Administrators can export registry hives for backup purposes. Check whether the user should be performing this kind of activity and is aware of it.\n\n### Related rules\n\n- Credential Acquisition via Registry Hive Dumping - a7e7bfa3-088e-4f13-b29e-3986e0e756b8\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system and restore compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.002", - "name": "Security Account Manager", - "reference": "https://attack.mitre.org/techniques/T1003/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.002", - "name": "SMB/Windows Admin Shares", - "reference": "https://attack.mitre.org/techniques/T1021/002/" - } - ] - } - ] - } - ], - "id": "3b616155-863b-4967-8f73-52df8930d583", - "rule_id": "a4c7473a-5cb4-4bc1-9d06-e4a75adbc494", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.header_bytes", - "type": "unknown", - "ecs": false - }, - { - "name": "file.size", - "type": "long", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n /* regf file header */\n file.Ext.header_bytes : \"72656766*\" and file.size >= 30000 and\n process.pid == 4 and user.id : (\"S-1-5-21*\", \"S-1-12-1-*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Threat Intel Windows Registry Indicator Match", - "description": "This rule is triggered when a Windows registry indicator from the Threat Intel Filebeat module or integrations has a match against an event that contains registry data.", - "risk_score": 99, - "severity": "critical", - "timeline_id": "495ad7a7-316e-4544-8a0f-9c098daee76e", - "timeline_title": "Generic Threat Match Timeline", - "license": "Elastic License v2", - "note": "## Triage and Analysis\n\n### Investigating Threat Intel Windows Registry Indicator Match\n\nThreat Intel indicator match rules allow matching from a local observation, such as an endpoint event that records a file hash with an entry of a file hash stored within the Threat Intel integrations index. \n\nMatches are based on threat intelligence data that's been ingested during the last 30 days. Some integrations don't place expiration dates on their threat indicators, so we strongly recommend validating ingested threat indicators and reviewing match results. When reviewing match results, check associated activity to determine whether the event requires additional investigation.\n\nThis rule is triggered when a Windows registry indicator from the Threat Intel Filebeat module or a threat intelligence integration matches against an event that contains registry data.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Check related threat reports to gain context about the registry indicator of compromise (IoC) and to understand if it's a system-native mechanism abused for persistence, to store data, to disable security mechanisms, etc. Use this information to define the appropriate triage and respond steps.\n- Identify the process responsible for the registry operation and investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Retrieve the involved process executable and examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Using the data collected through the analysis, scope users targeted and other machines infected in the environment.\n\n### False Positive Analysis\n\n- Adversaries can leverage dual-use registry mechanisms that are commonly used by normal applications. These registry keys can be added into indicator lists creating the potential for false positives.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nThis rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an [Elastic Agent integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#agent-ti-integration), the [Threat Intel module](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#ti-mod-integration), or a [custom integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#custom-ti-integration).\n\nMore information can be found [here](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html).", - "version": 3, - "tags": [ - "OS: Windows", - "Data Source: Elastic Endgame", - "Rule Type: Indicator Match" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "1h", - "from": "now-65m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-threatintel.html", - "https://www.elastic.co/guide/en/security/master/es-threat-intel-integrations.html", - "https://www.elastic.co/security/tip" - ], - "max_signals": 100, - "threat": [], - "id": "54525228-a077-44ea-99e9-498bdf2529fb", - "rule_id": "a61809f3-fb5b-465c-8bff-23a8a068ac60", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "This rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an Elastic Agent integration, the Threat Intel module, or a custom integration.\n\nMore information can be found here.", - "type": "threat_match", - "query": "registry.path:*\n", - "threat_query": "@timestamp >= \"now-30d/d\" and event.module:(threatintel or ti_*) and threat.indicator.registry.path:* and not labels.is_ioc_transform_source:\"true\"", - "threat_mapping": [ - { - "entries": [ - { - "field": "registry.path", - "type": "mapping", - "value": "threat.indicator.registry.path" - } - ] - } - ], - "threat_index": [ - "filebeat-*", - "logs-ti_*" - ], - "index": [ - "auditbeat-*", - "endgame-*", - "filebeat-*", - "logs-*", - "winlogbeat-*" - ], - "threat_filters": [ - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.category", - "negate": false, - "params": { - "query": "threat" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.category": "threat" - } - } - }, - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.kind", - "negate": false, - "params": { - "query": "enrichment" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.kind": "enrichment" - } - } - }, - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.type", - "negate": false, - "params": { - "query": "indicator" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.type": "indicator" - } - } - } - ], - "threat_indicator_path": "threat.indicator", - "threat_language": "kuery", - "language": "kuery" - }, - { - "name": "Emond Rules Creation or Modification", - "description": "Identifies the creation or modification of the Event Monitor Daemon (emond) rules. Adversaries may abuse this service by writing a rule to execute commands when a defined event occurs, such as system start up or user authentication.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.xorrior.com/emond-persistence/", - "https://www.sentinelone.com/blog/how-malware-persists-on-macos/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.014", - "name": "Emond", - "reference": "https://attack.mitre.org/techniques/T1546/014/" - } - ] - } - ] - } - ], - "id": "8f7d49dd-bd2b-43db-8573-4d67fa9bdde1", - "rule_id": "a6bf4dd4-743e-4da8-8c03-3ebd753a6c90", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"macos\" and event.type != \"deletion\" and\n file.path : (\"/private/etc/emond.d/rules/*.plist\", \"/etc/emon.d/rules/*.plist\", \"/private/var/db/emondClients/*\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Credential Acquisition via Registry Hive Dumping", - "description": "Identifies attempts to export a registry hive which may contain credentials using the Windows reg.exe tool.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Credential Acquisition via Registry Hive Dumping\n\nDumping registry hives is a common way to access credential information as some hives store credential material.\n\nFor example, the SAM hive stores locally cached credentials (SAM Secrets), and the SECURITY hive stores domain cached credentials (LSA secrets).\n\nDumping these hives in combination with the SYSTEM hive enables the attacker to decrypt these secrets.\n\nThis rule identifies the usage of `reg.exe` to dump SECURITY and/or SAM hives, which potentially indicates the compromise of the credentials stored in the host.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate if the credential material was exfiltrated or processed locally by other tools.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (e.g., 4624) to the target host.\n\n### False positive analysis\n\n- Administrators can export registry hives for backup purposes using command line tools like `reg.exe`. Check whether the user is legitamitely performing this kind of activity.\n\n### Related rules\n\n- Registry Hive File Creation via SMB - a4c7473a-5cb4-4bc1-9d06-e4a75adbc494\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system and restore compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://medium.com/threatpunter/detecting-attempts-to-steal-passwords-from-the-registry-7512674487f8", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.002", - "name": "Security Account Manager", - "reference": "https://attack.mitre.org/techniques/T1003/002/" - }, - { - "id": "T1003.004", - "name": "LSA Secrets", - "reference": "https://attack.mitre.org/techniques/T1003/004/" - } - ] - } - ] - } - ], - "id": "8900daa6-de9d-4fdb-b7ac-5e5440911cc2", - "rule_id": "a7e7bfa3-088e-4f13-b29e-3986e0e756b8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.pe.original_file_name == \"reg.exe\" and\n process.args : (\"save\", \"export\") and\n process.args : (\"hklm\\\\sam\", \"hklm\\\\security\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Google Workspace Password Policy Modified", - "description": "Detects when a Google Workspace password policy is modified. An adversary may attempt to modify a password policy in order to weaken an organization’s security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace Password Policy Modified\n\nGoogle Workspace administrators manage password policies to enforce password requirements for an organization's compliance needs. Administrators have the capability to set restrictions on password length, reset frequency, reuse capability, expiration, and much more. Google Workspace also allows multi-factor authentication (MFA) and 2-step verification (2SV) for authentication.\n\nThreat actors might rely on weak password policies or restrictions to attempt credential access by using password stuffing or spraying techniques for cloud-based user accounts. Administrators might introduce increased risk to credential access from a third-party by weakening the password restrictions for an organization.\n\nThis rule detects when a Google Workspace password policy is modified to decrease password complexity or to adjust the reuse and reset frequency.\n\n#### Possible investigation steps\n\n- Identify associated user account(s) by reviewing the `user.name` or `source.user.email` fields in the alert.\n- Identify the password setting that was created or adjusted by reviewing `google_workspace.admin.setting.name` field.\n- Check if a password setting was enabled or disabled by reviewing the `google_workspace.admin.new_value` and `google_workspace.admin.old_value` fields.\n- After identifying the involved user, verify administrative privileges are scoped properly to change.\n- Filter `event.dataset` for `google_workspace.login` and aggregate by `user.name`, `event.action`.\n - The `google_workspace.login.challenge_method` field can be used to identify the challenge method used for failed and successful logins.\n\n### False positive analysis\n\n- After identifying the user account that updated the password policy, verify whether the action was intentional.\n- Verify whether the user should have administrative privileges in Google Workspace to modify password policies.\n- Review organizational units or groups the role may have been added to and ensure the new privileges align properly.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider resetting passwords for potentially affected users.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate multi-factor authentication for the user.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators might observe lag times ranging from several minutes to 3 days between the event occurrence time and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Identity and Access Audit", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Password policies may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "f1768fdd-854b-423e-9a74-a17269148ace", - "rule_id": "a99f82f5-8e77-4f8b-b3ce-10c0f6afbc73", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.admin.setting.name", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, the Filebeat module, or data that's similarly structured is required for this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and\n event.action:(CHANGE_APPLICATION_SETTING or CREATE_APPLICATION_SETTING) and\n google_workspace.admin.setting.name:(\n \"Password Management - Enforce strong password\" or\n \"Password Management - Password reset frequency\" or\n \"Password Management - Enable password reuse\" or\n \"Password Management - Enforce password policy at next login\" or\n \"Password Management - Minimum password length\" or\n \"Password Management - Maximum password length\"\n )\n", - "language": "kuery" - }, - { - "name": "Unusual Windows Process Calling the Metadata Service", - "description": "Looks for anomalous access to the metadata service by an unusual process. The metadata service may be targeted in order to harvest credentials or user data scripts containing secrets.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program or one that runs very rarely as part of a monthly or quarterly workflow could trigger this detection rule." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.005", - "name": "Cloud Instance Metadata API", - "reference": "https://attack.mitre.org/techniques/T1552/005/" - } - ] - } - ] - } - ], - "id": "0a6d6056-d9e2-4949-991e-2b9501bb893c", - "rule_id": "abae61a8-c560-4dbd-acca-1e1438bff36b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_windows_rare_metadata_process" - ] - }, - { - "name": "Potential Persistence via Login Hook", - "description": "Identifies the creation or modification of the login window property list (plist). Adversaries may modify plist files to run a program during system boot or user login for persistence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\nStarting in Mac OS X 10.7 (Lion), users can specify certain applications to be re-opened when a user reboots their machine. This can be abused to establish or maintain persistence on a compromised system.", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/D00MFist/PersistentJXA/blob/master/LoginScript.js" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1647", - "name": "Plist File Modification", - "reference": "https://attack.mitre.org/techniques/T1647/" - } - ] - } - ], - "id": "4fe37c81-3709-4078-b967-8b8f3f9d74f2", - "rule_id": "ac412404-57a5-476f-858f-4e8fbb4f48d8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:file and host.os.type:macos and not event.type:\"deletion\" and\n file.name:\"com.apple.loginwindow.plist\" and\n process.name:(* and not (systemmigrationd or DesktopServicesHelper or diskmanagementd or rsync or launchd or cfprefsd or xpcproxy or ManagedClient or MCXCompositor or backupd or \"iMazing Profile Editor\"\n))\n", - "language": "kuery" - }, - { - "name": "Google Workspace API Access Granted via Domain-Wide Delegation of Authority", - "description": "Detects when a domain-wide delegation of authority is granted to a service account. Domain-wide delegation can be configured to grant third-party and internal applications to access the data of Google Workspace users. An adversary may configure domain-wide delegation to maintain access to their target’s data.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating API Access Granted via Domain-Wide Delegation of Authority\n\nDomain-wide delegation is a feature that allows apps to access users' data across an organization's Google Workspace environment. Only super admins can manage domain-wide delegation, and they must specify each API scope that the application can access. Google Workspace services all have APIs that can be interacted with after domain-wide delegation is established with an OAuth2 client ID of the application. Typically, GCP service accounts and applications are created where the Google Workspace APIs are enabled, thus allowing the application to access resources and services in Google Workspace.\n\nApplications authorized to interact with Google Workspace resources and services through APIs have a wide range of capabilities depending on the scopes applied. If the principle of least privilege (PoLP) is not practiced when setting API scopes, threat actors could abuse additional privileges if the application is compromised. New applications created and given API access could indicate an attempt by a threat actor to register their malicious application with the Google Workspace domain in an attempt to establish a command and control foothold.\n\nThis rule identifies when an application is authorized API client access.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n - Only users with super admin privileges can authorize API client access.\n- Identify the API client name by reviewing the `google_workspace.admin.api.client.name` field in the alert.\n - If GCP audit logs are ingested, pivot to reviewing the last 48 hours of activity related to the service account ID.\n - Search for the `google_workspace.admin.api.client.name` value with wildcards in the `gcp.audit.resource_name` field.\n - Search for API client name and aggregated results on `event.action` to determine what the service account is being used for in GWS.\n- After identifying the involved user, verify super administrative privileges to access domain-wide delegation settings.\n\n### False positive analysis\n\n- Changes to domain-wide delegation require super admin privileges. Check with the user to ensure these changes were expected.\n- Review scheduled maintenance notes related to expected API access changes.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Review the scope of the authorized API client access in Google Workspace.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Domain-wide delegation of authority may be granted to service accounts by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://developers.google.com/admin-sdk/directory/v1/guides/delegation" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "b7a98a60-0ece-49e0-ba5e-30e68c605de8", - "rule_id": "acbc8bb9-2486-49a8-8779-45fb5f9a93ee", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:AUTHORIZE_API_CLIENT_ACCESS\n", - "language": "kuery" - }, - { - "name": "Potential Command and Control via Internet Explorer", - "description": "Identifies instances of Internet Explorer (iexplore.exe) being started via the Component Object Model (COM) making unusual network connections. Adversaries could abuse Internet Explorer via COM to avoid suspicious processes making network connections and bypass host-based firewall restrictions.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Processes such as MS Office using IEproxy to render HTML content." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1559", - "name": "Inter-Process Communication", - "reference": "https://attack.mitre.org/techniques/T1559/", - "subtechnique": [ - { - "id": "T1559.001", - "name": "Component Object Model", - "reference": "https://attack.mitre.org/techniques/T1559/001/" - } - ] - } - ] - } - ], - "id": "45b5f4c5-0c76-4017-a850-c8dee7da426d", - "rule_id": "acd611f3-2b93-47b3-a0a3-7723bcc46f6d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "dns.question.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, user.name with maxspan = 5s\n [library where host.os.type == \"windows\" and dll.name : \"IEProxy.dll\" and process.name : (\"rundll32.exe\", \"regsvr32.exe\")]\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"iexplore.exe\" and process.parent.args : \"-Embedding\"]\n /* IE started via COM in normal conditions makes few connections, mainly to Microsoft and OCSP related domains, add FPs here */\n [network where host.os.type == \"windows\" and network.protocol == \"dns\" and process.name : \"iexplore.exe\" and\n not dns.question.name :\n (\n \"*.microsoft.com\",\n \"*.digicert.com\",\n \"*.msocsp.com\",\n \"*.windowsupdate.com\",\n \"*.bing.com\",\n \"*.identrust.com\",\n \"*.sharepoint.com\",\n \"*.office365.com\",\n \"*.office.com\"\n )\n ] /* with runs=5 */\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Potential macOS SSH Brute Force Detected", - "description": "Identifies a high number (20) of macOS SSH KeyGen process executions from the same host. An adversary may attempt a brute force attack to obtain unauthorized access to user accounts.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://themittenmac.com/detecting-ssh-activity-via-process-monitoring/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "da76ace8-a0a0-40f9-acb7-f26d8599a795", - "rule_id": "ace1e989-a541-44df-93a8-a8b0591b63c0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "event.category:process and host.os.type:macos and event.type:start and process.name:\"sshd-keygen-wrapper\" and process.parent.name:launchd\n", - "threshold": { - "field": [ - "host.id" - ], - "value": 20 - }, - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "Google Workspace Custom Admin Role Created", - "description": "Detects when a custom admin role is created in Google Workspace. An adversary may create a custom admin role in order to elevate the permissions of other user accounts and persist in their target’s environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace Custom Admin Role Created\n\nGoogle Workspace roles allow administrators to assign specific permissions to users or groups where the principle of least privilege (PoLP) is recommended. Admin roles in Google Workspace grant users access to the Google Admin console, where more domain-wide settings are accessible. Google Workspace contains prebuilt administrator roles for performing business functions related to users, groups, and services. Custom administrator roles can be created where prebuilt roles are not preferred.\n\nRoles assigned to users will grant them additional permissions and privileges within the Google Workspace domain. Threat actors might create new admin roles with privileges to advance their intrusion efforts and laterally move throughout the organization if existing roles or users do not have privileges aligned with their modus operandi. Users with unexpected privileges from new admin roles may also cause operational dysfunction if unfamiliar settings are adjusted without warning. Instead of modifying existing roles, administrators might create new roles to accomplish short-term goals and unintentionally introduce additional risk exposure.\n\nThis rule identifies when a Google Workspace administrative role is added within the Google Workspace admin console.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- Identify the role added by reviewing the `google_workspace.admin.role.name` field in the alert.\n- After identifying the involved user, verify if they should have administrative privileges to add administrative roles.\n- To identify if users have been assigned this role, search for `event.action: ASSIGN_ROLE`.\n - Add `google_workspace.admin.role.name` with the role added as an additional filter.\n - Adjust the relative time accordingly to identify all users that were possibly assigned this admin role.\n- Monitor users assigned the admin role for the next 24 hours and look for attempts to use related privileges.\n - The `event.provider` field will help filter for specific services in Google Workspace such as Drive or Admin.\n - The `event.action` field will help trace what actions are being taken by users.\n\n### False positive analysis\n\n- After identifying the user account that created the role, verify whether the action was intentional.\n- Verify that the user who created the role should have administrative privileges in Google Workspace to create custom roles.\n- Review organizational units or groups the role may have been added to and ensure the new privileges align properly.\n- Create a filter with the user's `user.name` and filter for `event.action`. In the results, check if there are multiple `CREATE_ROLE` actions and note whether they are new or historical.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Custom Google Workspace admin roles may be created by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://support.google.com/a/answer/2406043?hl=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "a4716539-c36a-48dc-9451-aadf6f210d19", - "rule_id": "ad3f2807-2b3e-47d7-b282-f84acbbe14be", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:CREATE_ROLE\n", - "language": "kuery" - }, - { - "name": "Kerberos Cached Credentials Dumping", - "description": "Identifies the use of the Kerberos credential cache (kcc) utility to dump locally cached Kerberos tickets. Adversaries may attempt to dump credential material in the form of tickets that can be leveraged for lateral movement.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/EmpireProject/EmPyre/blob/master/lib/modules/collection/osx/kerberosdump.py", - "https://opensource.apple.com/source/Heimdal/Heimdal-323.12/kuser/kcc-commands.in.auto.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - }, - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/", - "subtechnique": [ - { - "id": "T1558.003", - "name": "Kerberoasting", - "reference": "https://attack.mitre.org/techniques/T1558/003/" - } - ] - } - ] - } - ], - "id": "a58e6e13-2576-4641-980c-22ad13794c3f", - "rule_id": "ad88231f-e2ab-491c-8fc6-64746da26cfe", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:kcc and\n process.args:copy_cred_cache\n", - "language": "kuery" - }, - { - "name": "Suspicious Execution via Microsoft Office Add-Ins", - "description": "Identifies execution of common Microsoft Office applications to launch an Office Add-In from a suspicious path or with an unusual parent process. This may indicate an attempt to get initial access via a malicious phishing MS Office Add-In.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/Octoberfest7/XLL_Phishing", - "https://labs.f-secure.com/archive/add-in-opportunities-for-office-persistence/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1137", - "name": "Office Application Startup", - "reference": "https://attack.mitre.org/techniques/T1137/", - "subtechnique": [ - { - "id": "T1137.006", - "name": "Add-ins", - "reference": "https://attack.mitre.org/techniques/T1137/006/" - } - ] - } - ] - } - ], - "id": "895576cb-372c-435b-a44a-f379ae1887f3", - "rule_id": "ae8a142c-6a1d-4918-bea7-0b617e99ecfa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where \n \n host.os.type == \"windows\" and event.type == \"start\" and \n \n process.name : (\"WINWORD.EXE\", \"EXCEL.EXE\", \"POWERPNT.EXE\", \"MSACCESS.EXE\", \"VSTOInstaller.exe\") and \n \n process.args regex~ \"\"\".+\\.(wll|xll|ppa|ppam|xla|xlam|vsto)\"\"\" and \n \n /* Office Add-In from suspicious paths */\n (process.args :\n (\"?:\\\\Users\\\\*\\\\Temp\\\\7z*\",\n \"?:\\\\Users\\\\*\\\\Temp\\\\Rar$*\",\n \"?:\\\\Users\\\\*\\\\Temp\\\\Temp?_*\",\n \"?:\\\\Users\\\\*\\\\Temp\\\\BNZ.*\",\n \"?:\\\\Users\\\\*\\\\Downloads\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\*\",\n \"?:\\\\Users\\\\Public\\\\*\",\n \"?:\\\\ProgramData\\\\*\",\n \"?:\\\\Windows\\\\Temp\\\\*\",\n \"\\\\Device\\\\*\",\n \"http*\") or\n\t \n process.parent.name : (\"explorer.exe\", \"OpenWith.exe\") or \n \n /* Office Add-In from suspicious parent */\n process.parent.name : (\"cmd.exe\", \"powershell.exe\")) and\n\t \n /* False Positives */\n not (process.args : \"*.vsto\" and\n process.parent.executable :\n (\"?:\\\\Program Files\\\\Logitech\\\\LogiOptions\\\\PlugInInstallerUtility*.exe\",\n \"?:\\\\ProgramData\\\\Logishrd\\\\LogiOptions\\\\Plugins\\\\VSTO\\\\*\\\\VSTOInstaller.exe\",\n \"?:\\\\Program Files\\\\Logitech\\\\LogiOptions\\\\PlugInInstallerUtility.exe\",\n \"?:\\\\Program Files\\\\LogiOptionsPlus\\\\PlugInInstallerUtility*.exe\",\n \"?:\\\\ProgramData\\\\Logishrd\\\\LogiOptionsPlus\\\\Plugins\\\\VSTO\\\\*\\\\VSTOInstaller.exe\",\n \"?:\\\\Program Files\\\\Common Files\\\\microsoft shared\\\\VSTO\\\\*\\\\VSTOInstaller.exe\")) and\n not (process.args : \"/Uninstall\" and process.name : \"VSTOInstaller.exe\") and\n not (process.parent.name : \"rundll32.exe\" and\n process.parent.args : \"?:\\\\WINDOWS\\\\Installer\\\\MSI*.tmp,zzzzInvokeManagedCustomActionOutOfProc\") and\n not (process.name : \"VSTOInstaller.exe\" and process.args : \"https://dl.getsidekick.com/outlook/vsto/Sidekick.vsto\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Local Scheduled Task Creation", - "description": "Indicates the creation of a scheduled task. Adversaries can use these to establish persistence, move laterally, and/or escalate privileges.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate scheduled tasks may be created during installation of new software." - ], - "references": [ - "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1", - "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-2" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "86b86eb7-4bf3-47c3-bc4a-33aee69f0fba", - "rule_id": "afcce5ad-65de-4ed2-8516-5e093d3ac99a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.token.integrity_level_name", - "type": "unknown", - "ecs": false - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.IntegrityLevel", - "type": "keyword", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=1m\n [process where host.os.type == \"windows\" and event.type != \"end\" and\n ((process.name : (\"cmd.exe\", \"wscript.exe\", \"rundll32.exe\", \"regsvr32.exe\", \"wmic.exe\", \"mshta.exe\",\n \"powershell.exe\", \"pwsh.exe\", \"powershell_ise.exe\", \"WmiPrvSe.exe\", \"wsmprovhost.exe\", \"winrshost.exe\") or\n process.pe.original_file_name : (\"cmd.exe\", \"wscript.exe\", \"rundll32.exe\", \"regsvr32.exe\", \"wmic.exe\", \"mshta.exe\",\n \"powershell.exe\", \"pwsh.dll\", \"powershell_ise.exe\", \"WmiPrvSe.exe\", \"wsmprovhost.exe\",\n \"winrshost.exe\")) or\n process.code_signature.trusted == false)] by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"schtasks.exe\" or process.pe.original_file_name == \"schtasks.exe\") and\n process.args : (\"/create\", \"-create\") and process.args : (\"/RU\", \"/SC\", \"/TN\", \"/TR\", \"/F\", \"/XML\") and\n /* exclude SYSTEM Integrity Level - look for task creations by non-SYSTEM user */\n not (?process.Ext.token.integrity_level_name : \"System\" or ?winlog.event_data.IntegrityLevel : \"System\")\n ] by process.parent.entity_id\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Potential Privilege Escalation via Container Misconfiguration", - "description": "This rule monitors for the execution of processes that interact with Linux containers through an interactive shell without root permissions. Utilities such as runc and ctr are universal command-line utilities leveraged to interact with containers via root permissions. On systems where the access to these utilities are misconfigured, attackers might be able to create and run a container that mounts the root folder or spawn a privileged container vulnerable to a container escape attack, which might allow them to escalate privileges and gain further access onto the host file system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Domain: Container", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://book.hacktricks.xyz/linux-hardening/privilege-escalation/runc-privilege-escalation", - "https://book.hacktricks.xyz/linux-hardening/privilege-escalation/containerd-ctr-privilege-escalation" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1611", - "name": "Escape to Host", - "reference": "https://attack.mitre.org/techniques/T1611/" - } - ] - } - ], - "id": "ef3fe415-aef2-41d2-8a5a-7082df28b3fd", - "rule_id": "afe6b0eb-dd9d-4922-b08a-1910124d524d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "group.Ext.real.id", - "type": "unknown", - "ecs": false - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.interactive", - "type": "boolean", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.interactive", - "type": "boolean", - "ecs": true - }, - { - "name": "user.Ext.real.id", - "type": "unknown", - "ecs": false - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\nSession View uses process data collected by the Elastic Defend integration, but this data is not always collected by default. Session View is available on enterprise subscription for versions 8.3 and above.\n#### To confirm that Session View data is enabled:\n- Go to Manage → Policies, and edit one or more of your Elastic Defend integration policies.\n- Select the Policy settings tab, then scroll down to the Linux event collection section near the bottom.\n- Check the box for Process events, and turn on the Include session data toggle.\n- If you want to include file and network alerts in Session View, check the boxes for Network and File events.\n- If you want to enable terminal output capture, turn on the Capture terminal output toggle.\nFor more information about the additional fields collected when this setting is enabled and\nthe usage of Session View for Analysis refer to the [helper guide](https://www.elastic.co/guide/en/security/current/session-view.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and (\n (process.name == \"runc\" and process.args == \"run\") or\n (process.name == \"ctr\" and process.args == \"run\" and process.args in (\"--privileged\", \"--mount\"))\n) and not user.Ext.real.id == \"0\" and not group.Ext.real.id == \"0\" and \nprocess.interactive == true and process.parent.interactive == true\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Timestomping using Touch Command", - "description": "Timestomping is an anti-forensics technique which is used to modify the timestamps of a file, often to mimic files that are in the same folder.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 33, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.006", - "name": "Timestomp", - "reference": "https://attack.mitre.org/techniques/T1070/006/" - } - ] - } - ] - } - ], - "id": "153d46c7-32d0-4cca-8f45-b549c02991a6", - "rule_id": "b0046934-486e-462f-9487-0d4cf9e429c6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where event.type == \"start\" and\n process.name : \"touch\" and user.id != \"0\" and\n process.args : (\"-r\", \"-t\", \"-a*\",\"-m*\") and\n not process.args : (\"/usr/lib/go-*/bin/go\", \"/usr/lib/dracut/dracut-functions.sh\", \"/tmp/KSInstallAction.*/m/.patch/*\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "TCC Bypass via Mounted APFS Snapshot Access", - "description": "Identifies the use of the mount_apfs command to mount the entire file system through Apple File System (APFS) snapshots as read-only and with the noowners flag set. This action enables the adversary to access almost any file in the file system, including all user data and files protected by Apple’s privacy framework (TCC).", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://theevilbit.github.io/posts/cve_2020_9771/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1006", - "name": "Direct Volume Access", - "reference": "https://attack.mitre.org/techniques/T1006/" - } - ] - } - ], - "id": "8432fa9d-a77c-4358-9945-b2e2fc6722b3", - "rule_id": "b00bcd89-000c-4425-b94c-716ef67762f6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and process.name:mount_apfs and\n process.args:(/System/Volumes/Data and noowners)\n", - "language": "kuery" - }, - { - "name": "Spike in Network Traffic", - "description": "A machine learning job detected an unusually large spike in network traffic. Such a burst of traffic, if not caused by a surge in business activity, can be due to suspicious or malicious activity. Large-scale data exfiltration may produce a burst of network traffic; this could also be due to unusually large amounts of reconnaissance or enumeration traffic. Denial-of-service attacks or traffic floods may also produce such a surge in traffic.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Business workflows that occur very occasionally, and involve an unusual surge in network traffic, can trigger this alert. A new business workflow or a surge in business activity may trigger this alert. A misconfigured network application or firewall may trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "1ce8ec8e-5041-42cb-a52a-25fb35982b6c", - "rule_id": "b240bfb8-26b7-4e5e-924e-218144a3fa71", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "high_count_network_events" - }, - { - "name": "Unusual Linux Username", - "description": "A machine learning job detected activity for a username that is not normally active, which can indicate unauthorized changes, activity by unauthorized users, lateral movement, or compromised credentials. In many organizations, new usernames are not often created apart from specific types of system activities, such as creating new accounts for new employees. These user accounts quickly become active and routine. Events from rarely used usernames can point to suspicious activity. Additionally, automated Linux fleets tend to see activity from rarely used usernames only when personnel log in to make authorized or unauthorized changes, or threat actors have acquired credentials and log in for malicious purposes. Unusual usernames can also indicate pivoting, where compromised credentials are used to try and move laterally from one host to another.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating an Unusual Linux User\nDetection alerts from this rule indicate activity for a Linux user name that is rare and unusual. Here are some possible avenues of investigation:\n- Consider the user as identified by the username field. Is this program part of an expected workflow for the user who ran this program on this host? Could this be related to troubleshooting or debugging activity by a developer or site reliability engineer?\n- Examine the history of user activity. If this user only manifested recently, it might be a service account for a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business process.\n- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks that the user is performing.", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon user activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "b4503564-4978-4640-812e-e891e3fc61a2", - "rule_id": "b347b919-665f-4aac-b9e8-68369bf2340c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_linux_anomalous_user_name" - ] - }, - { - "name": "Potential Persistence via Atom Init Script Modification", - "description": "Identifies modifications to the Atom desktop text editor Init File. Adversaries may add malicious JavaScript code to the init.coffee file that will be executed upon the Atom application opening.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/D00MFist/PersistentJXA/blob/master/AtomPersist.js", - "https://flight-manual.atom.io/hacking-atom/sections/the-init-file/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1037", - "name": "Boot or Logon Initialization Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/" - } - ] - } - ], - "id": "4b5c68ee-4799-4e50-8830-8d0ae5a42330", - "rule_id": "b4449455-f986-4b5a-82ed-e36b129331f7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:file and host.os.type:macos and not event.type:\"deletion\" and\n file.path:/Users/*/.atom/init.coffee and not process.name:(Atom or xpcproxy) and not user.name:root\n", - "language": "kuery" - }, - { - "name": "Potential Privilege Escalation via OverlayFS", - "description": "Identifies an attempt to exploit a local privilege escalation (CVE-2023-2640 and CVE-2023-32629) via a flaw in Ubuntu's modifications to OverlayFS. These flaws allow the creation of specialized executables, which, upon execution, grant the ability to escalate privileges to root on the affected machine.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.wiz.io/blog/ubuntu-overlayfs-vulnerability", - "https://twitter.com/liadeliyahu/status/1684841527959273472" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "ba0b45fd-6c1a-48aa-af50-9729d9908e4b", - "rule_id": "b51dbc92-84e2-4af1-ba47-65183fcd0c57", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by process.parent.entity_id, host.id with maxspan=5s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name == \"unshare\" and process.args : (\"-r\", \"-rm\", \"m\") and process.args : \"*cap_setuid*\" and user.id != \"0\"]\n [process where host.os.type == \"linux\" and event.action == \"uid_change\" and event.type == \"change\" and \n user.id == \"0\"]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Volume Shadow Copy Deleted or Resized via VssAdmin", - "description": "Identifies use of vssadmin.exe for shadow copy deletion or resizing on endpoints. This commonly occurs in tandem with ransomware or other destructive attacks.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Volume Shadow Copy Deleted or Resized via VssAdmin\n\nThe Volume Shadow Copy Service (VSS) is a Windows feature that enables system administrators to take snapshots of volumes that can later be restored or mounted to recover specific files or folders.\n\nA typical step in the playbook of an attacker attempting to deploy ransomware is to delete Volume Shadow Copies to ensure that victims have no alternative to paying the ransom, making any action that deletes shadow copies worth monitoring.\n\nThis rule monitors the execution of Vssadmin.exe to either delete or resize shadow copies.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- In the case of a resize operation, check if the resize value is equal to suspicious values, like 401MB.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- If unsigned files are found on the process tree, retrieve them and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Use process name, command line, and file hash to search for occurrences in other hosts.\n- Check if any files on the host machine have been encrypted.\n\n\n### False positive analysis\n\n- This rule may produce benign true positives (B-TPs). If this activity is expected and noisy in your environment, consider adding exceptions — preferably with a combination of user and command line conditions.\n\n### Related rules\n\n- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921\n- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.\n- Priority should be given due to the advanced stage of this activity on the attack.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- If data was encrypted, deleted, or modified, activate your data recovery plan.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Perform data recovery locally or restore the backups from replicated copies (cloud, other servers, etc.).\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Impact", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1490", - "name": "Inhibit System Recovery", - "reference": "https://attack.mitre.org/techniques/T1490/" - } - ] - } - ], - "id": "54e20874-f3e4-4d6b-9edd-98a0c51ebb79", - "rule_id": "b5ea4bfe-a1b2-421f-9d47-22a75a6f2921", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\"\n and (process.name : \"vssadmin.exe\" or process.pe.original_file_name == \"VSSADMIN.EXE\") and\n process.args in (\"delete\", \"resize\") and process.args : \"shadows*\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "PowerShell Invoke-NinjaCopy script", - "description": "Detects PowerShell scripts that contain the default exported functions used on Invoke-NinjaCopy. Attackers can use Invoke-NinjaCopy to read SYSTEM files that are normally locked, such as the NTDS.dit file or registry hives.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Invoke-NinjaCopy script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks, making it available for use in various environments, creating an attractive way for attackers to execute code.\n\nInvoke-NinjaCopy is a PowerShell script capable of reading SYSTEM files that were normally locked, such as `NTDS.dit` or sensitive registry locations. It does so by using the direct volume access technique, which enables attackers to bypass access control mechanisms and file system monitoring by reading the raw data directly from the disk and extracting the file by parsing the file system structures.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Determine whether the script stores the captured data locally.\n- Check if the imported function was executed and which file it targeted.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Any activity that triggered the alert and is not inherently malicious must be monitored by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: PowerShell Logs", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/BC-SECURITY/Empire/blob/main/empire/server/data/module_source/collection/Invoke-NinjaCopy.ps1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.002", - "name": "Security Account Manager", - "reference": "https://attack.mitre.org/techniques/T1003/002/" - }, - { - "id": "T1003.003", - "name": "NTDS", - "reference": "https://attack.mitre.org/techniques/T1003/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1006", - "name": "Direct Volume Access", - "reference": "https://attack.mitre.org/techniques/T1006/" - } - ] - } - ], - "id": "3be2db29-2d9d-4b41-9dcd-4e1cf39be958", - "rule_id": "b8386923-b02c-4b94-986a-d223d9b01f88", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"StealthReadFile\" or\n \"StealthReadFileAddr\" or\n \"StealthCloseFileDelegate\" or\n \"StealthOpenFile\" or\n \"StealthCloseFile\" or\n \"StealthReadFile\" or\n \"Invoke-NinjaCopy\"\n )\n and not user.id : \"S-1-5-18\"\n and not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n", - "language": "kuery" - }, - { - "name": "Creation or Modification of Domain Backup DPAPI private key", - "description": "Identifies the creation or modification of Domain Backup private keys. Adversaries may extract the Data Protection API (DPAPI) domain backup key from a Domain Controller (DC) to be able to decrypt any domain user master key file.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\nDomain DPAPI Backup keys are stored on domain controllers and can be dumped remotely with tools such as Mimikatz. The resulting .pvk private key can be used to decrypt ANY domain user masterkeys, which then can be used to decrypt any secrets protected by those keys.", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.dsinternals.com/en/retrieving-dpapi-backup-keys-from-active-directory/", - "https://posts.specterops.io/operational-guidance-for-offensive-user-dpapi-abuse-1fb7fac8b107" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.004", - "name": "Private Keys", - "reference": "https://attack.mitre.org/techniques/T1552/004/" - } - ] - }, - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/" - } - ] - } - ], - "id": "d011bc68-ace9-4f89-8a60-62997dd42cf3", - "rule_id": "b83a7e96-2eb3-4edf-8346-427b6858d3bd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and file.name : (\"ntds_capi_*.pfx\", \"ntds_capi_*.pvk\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Network Connection via MsXsl", - "description": "Identifies msxsl.exe making a network connection. This may indicate adversarial activity as msxsl.exe is often leveraged by adversaries to execute malicious scripts and evade detection.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1220", - "name": "XSL Script Processing", - "reference": "https://attack.mitre.org/techniques/T1220/" - } - ] - } - ], - "id": "f36617b3-0798-42c5-933e-5a6d7832ed06", - "rule_id": "b86afe07-0d98-4738-b15d-8d7465f95ff5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id\n [process where host.os.type == \"windows\" and process.name : \"msxsl.exe\" and event.type == \"start\"]\n [network where host.os.type == \"windows\" and process.name : \"msxsl.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\",\n \"192.0.2.0/24\", \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\",\n \"100.64.0.0/10\", \"192.175.48.0/24\",\"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\",\n \"FE80::/10\", \"FF00::/8\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Group Policy Abuse for Privilege Addition", - "description": "Detects the first occurrence of a modification to Group Policy Object Attributes to add privileges to user accounts or use them to add users as local admins.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Group Policy Abuse for Privilege Addition\n\nGroup Policy Objects (GPOs) can be used to add rights and/or modify Group Membership on GPOs by changing the contents of an INF file named GptTmpl.inf, which is responsible for storing every setting under the Security Settings container in the GPO. This file is unique for each GPO, and only exists if the GPO contains security settings. Example Path: \"\\\\DC.com\\SysVol\\DC.com\\Policies\\{PolicyGUID}\\Machine\\Microsoft\\Windows NT\\SecEdit\\GptTmpl.inf\"\n\n#### Possible investigation steps\n\n- This attack abuses a legitimate mechanism of Active Directory, so it is important to determine whether the activity is legitimate and the administrator is authorized to perform this operation.\n- Retrieve the contents of the `GptTmpl.inf` file, and under the `Privilege Rights` section, look for potentially dangerous high privileges, for example: SeTakeOwnershipPrivilege, SeEnableDelegationPrivilege, etc.\n- Inspect the user security identifiers (SIDs) associated with these privileges, and if they should have these privileges.\n\n### False positive analysis\n\n- Inspect whether the user that has done the modifications should be allowed to. The user name can be found in the `winlog.event_data.SubjectUserName` field.\n\n### Related rules\n\n- Scheduled Task Execution at Scale via GPO - 15a8ba77-1c13-4274-88fe-6bd14133861e\n- Startup/Logon Script added to Group Policy Object - 16fac1a1-21ee-4ca6-b720-458e3855d046\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- The investigation and containment must be performed in every computer controlled by the GPO, where necessary.\n- Remove the script from the GPO.\n- Check if other GPOs have suspicious scripts attached.", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Active Directory", - "Resources: Investigation Guide", - "Use Case: Active Directory Monitoring" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0025_windows_audit_directory_service_changes.md", - "https://labs.f-secure.com/tools/sharpgpoabuse" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1484", - "name": "Domain Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1484/", - "subtechnique": [ - { - "id": "T1484.001", - "name": "Group Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1484/001/" - } - ] - } - ] - } - ], - "id": "abc38ef5-e74c-49de-8060-082d8f0da7a0", - "rule_id": "b9554892-5e0e-424b-83a0-5aef95aa43bf", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.AttributeLDAPDisplayName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.AttributeValue", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'Audit Directory Service Changes' audit policy must be configured (Success Failure).\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Changes (Success,Failure)\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.code: \"5136\" and\n winlog.event_data.AttributeLDAPDisplayName:\"gPCMachineExtensionNames\" and\n winlog.event_data.AttributeValue:(*827D319E-6EAC-11D2-A4EA-00C04F79F83A* and *803E14A0-B4FB-11D0-A0D0-00A0C90F574B*)\n", - "language": "kuery" - }, - { - "name": "Unusual Windows Network Activity", - "description": "Identifies Windows processes that do not usually use the network but have unexpected network activity, which can indicate command-and-control, lateral movement, persistence, or data exfiltration activity. A process with unusual network activity can denote process exploitation or injection, where the process is used to run persistence mechanisms that allow a malicious actor remote access or control of the host, data exfiltration, and execution of unauthorized network applications.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Unusual Network Activity\nDetection alerts from this rule indicate the presence of network activity from a Windows process for which network activity is very unusual. Here are some possible avenues of investigation:\n- Consider the IP addresses, protocol and ports. Are these used by normal but infrequent network workflows? Are they expected or unexpected?\n- If the destination IP address is remote or external, does it associate with an expected domain, organization or geography? Note: avoid interacting directly with suspected malicious IP addresses.\n- Consider the user as identified by the username field. Is this network activity part of an expected workflow for the user who ran the program?\n- Examine the history of execution. If this process only manifested recently, it might be part of a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business process.\n- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks it is performing.\n- Consider the same for the parent process. If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.\n- If you have file hash values in the event data, and you suspect malware, you can optionally run a search for the file hash to see if the file is identified as malware by anti-malware tools.", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program or one that rarely uses the network could trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "d7afa7a0-289d-45c6-af86-f3313cd13141", - "rule_id": "ba342eb2-583c-439f-b04d-1fdd7c1417cc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_windows_anomalous_network_activity" - ] - }, - { - "name": "Attempt to Install Root Certificate", - "description": "Adversaries may install a root certificate on a compromised system to avoid warnings when connecting to their command and control servers. Root certificates are used in public key cryptography to identify a root certificate authority (CA). When a root certificate is installed, the system or application will trust certificates in the root's chain of trust that have been signed by the root certificate.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Certain applications may install root certificates for the purpose of inspecting SSL traffic." - ], - "references": [ - "https://ss64.com/osx/security-cert.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1553", - "name": "Subvert Trust Controls", - "reference": "https://attack.mitre.org/techniques/T1553/", - "subtechnique": [ - { - "id": "T1553.004", - "name": "Install Root Certificate", - "reference": "https://attack.mitre.org/techniques/T1553/004/" - } - ] - } - ] - } - ], - "id": "ada1001a-77bd-4499-a66e-c4ad5644dd77", - "rule_id": "bc1eeacf-2972-434f-b782-3a532b100d67", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:security and process.args:\"add-trusted-cert\" and\n not process.parent.executable:(\"/Library/Bitdefender/AVP/product/bin/BDCoreIssues\" or \"/Applications/Bitdefender/SecurityNetworkInstallerApp.app/Contents/MacOS/SecurityNetworkInstallerApp\"\n)\n", - "language": "kuery" - }, - { - "name": "Suspicious Print Spooler Point and Print DLL", - "description": "Detects attempts to exploit a privilege escalation vulnerability (CVE-2020-1030) related to the print spooler service. Exploitation involves chaining multiple primitives to load an arbitrary DLL into the print spooler process running as SYSTEM.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.accenture.com/us-en/blogs/cyber-defense/discovering-exploiting-shutting-down-dangerous-windows-print-spooler-vulnerability", - "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Privilege%20Escalation/privesc_sysmon_cve_20201030_spooler.evtx", - "https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2020-1030" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "ca05ec86-fc4c-4281-841a-d44599e0e6ec", - "rule_id": "bd7eefee-f671-494e-98df-f01daf9e5f17", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=30s\n[registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Print\\\\Printers\\\\*\\\\SpoolDirectory\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Print\\\\Printers\\\\*\\\\SpoolDirectory\"\n ) and\n registry.data.strings : \"C:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\4\"]\n[registry where host.os.type == \"windows\" and\n registry.path : (\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Print\\\\Printers\\\\*\\\\CopyFiles\\\\Payload\\\\Module\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Print\\\\Printers\\\\*\\\\CopyFiles\\\\Payload\\\\Module\"\n ) and\n registry.data.strings : \"C:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\4\\\\*\"]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Potential Pspy Process Monitoring Detected", - "description": "This rule leverages auditd to monitor for processes scanning different processes within the /proc directory using the openat syscall. This is a strong indication for the usage of the pspy utility. Attackers may leverage the pspy process monitoring utility to monitor system processes without requiring root permissions, in order to find potential privilege escalation vectors.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/DominicBreuker/pspy" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1057", - "name": "Process Discovery", - "reference": "https://attack.mitre.org/techniques/T1057/" - }, - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "db20a821-6d2f-40b4-a51d-1447851999f1", - "rule_id": "bdb04043-f0e3-4efa-bdee-7d9d13fa9edc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0", - "integration": "auditd" - } - ], - "required_fields": [ - { - "name": "auditd.data.a0", - "type": "unknown", - "ecs": false - }, - { - "name": "auditd.data.a2", - "type": "unknown", - "ecs": false - }, - { - "name": "auditd.data.syscall", - "type": "unknown", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Auditd Manager integration.\n\n### Auditd Manager Integration Setup\nThe Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.\nAuditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.\n\n#### The following steps should be executed in order to add the Elastic Agent System integration \"auditd_manager\" on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Auditd Manager and select the integration to see more details about it.\n- Click Add Auditd Manager.\n- Configure the integration name and optionally add a description.\n- Review optional and advanced settings accordingly.\n- Add the newly installed `auditd manager` to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.\n- Click Save and Continue.\n- For more details on the integeration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).\n\n#### Rule Specific Setup Note\nAuditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.\nHowever, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n- For this detection rule the following additional audit rules are required to be added to the integration:\n -- \"-w /proc/ -p r -k audit_proc\"\n\n", - "type": "eql", - "query": "sequence by process.pid, host.id with maxspan=5s\n[ file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n auditd.data.syscall == \"openat\" and file.path == \"/proc\" and auditd.data.a0 : (\"ffffffffffffff9c\", \"ffffff9c\") and \n auditd.data.a2 : (\"80000\", \"88000\") ] with runs=10\n", - "language": "eql", - "index": [ - "logs-auditd_manager.auditd-*" - ] - }, - { - "name": "Searching for Saved Credentials via VaultCmd", - "description": "Windows Credential Manager allows you to create, view, or delete saved credentials for signing into websites, connected applications, and networks. An adversary may abuse this to list or dump credentials stored in the Credential Manager for saved usernames and passwords. This may also be performed in preparation of lateral movement.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16", - "https://web.archive.org/web/20201004080456/https://rastamouse.me/blog/rdp-jump-boxes/", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - }, - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/", - "subtechnique": [ - { - "id": "T1555.004", - "name": "Windows Credential Manager", - "reference": "https://attack.mitre.org/techniques/T1555/004/" - } - ] - } - ] - } - ], - "id": "1f2a77f5-05b5-444b-9f00-4f33af565ac5", - "rule_id": "be8afaed-4bcd-4e0a-b5f9-5562003dde81", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.pe.original_file_name:\"vaultcmd.exe\" or process.name:\"vaultcmd.exe\") and\n process.args:\"/list*\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Privacy Control Bypass via Localhost Secure Copy", - "description": "Identifies use of the Secure Copy Protocol (SCP) to copy files locally by abusing the auto addition of the Secure Shell Daemon (sshd) to the authorized application list for Full Disk Access. This may indicate attempts to bypass macOS privacy controls to access sensitive files.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.trendmicro.com/en_us/research/20/h/xcsset-mac-malware--infects-xcode-projects--uses-0-days.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/" - } - ] - } - ], - "id": "00beb98c-2da1-4c50-9969-857fe9dd87e2", - "rule_id": "c02c8b9f-5e1d-463c-a1b0-04edcdfe1a3d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.name:\"scp\" and\n process.args:\"StrictHostKeyChecking=no\" and\n process.command_line:(\"scp *localhost:/*\", \"scp *127.0.0.1:/*\") and\n not process.args:\"vagrant@*127.0.0.1*\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Microsoft IIS Connection Strings Decryption", - "description": "Identifies use of aspnet_regiis to decrypt Microsoft IIS connection strings. An attacker with Microsoft IIS web server access via a webshell or alike can decrypt and dump any hardcoded connection strings, such as the MSSQL service account password using aspnet_regiis command.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.netspi.com/decrypting-iis-passwords-to-break-out-of-the-dmz-part-1/", - "https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/greenbug-espionage-telco-south-asia" - ], - "max_signals": 33, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - } - ] - } - ], - "id": "536fd9ff-1dca-452d-8d2a-62a9cb8e1333", - "rule_id": "c25e9c87-95e1-4368-bfab-9fd34cf867ec", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"aspnet_regiis.exe\" or process.pe.original_file_name == \"aspnet_regiis.exe\") and\n process.args : \"connectionStrings\" and process.args : \"-pdf\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Unusual Linux Network Connection Discovery", - "description": "Looks for commands related to system network connection discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used by a threat actor to engage in system network connection discovery in order to increase their understanding of connected services and systems. This information may be used to shape follow-up behaviors such as lateral movement or additional discovery.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Discovery" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon user command activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1049", - "name": "System Network Connections Discovery", - "reference": "https://attack.mitre.org/techniques/T1049/" - } - ] - } - ], - "id": "a29e26d8-4438-46d1-a2cf-4de558a96b02", - "rule_id": "c28c4d8c-f014-40ef-88b6-79a1d67cd499", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 25, - "machine_learning_job_id": [ - "v3_linux_network_connection_discovery" - ] - }, - { - "name": "Persistence via Folder Action Script", - "description": "Detects modification of a Folder Action script. A Folder Action script is executed when the folder to which it is attached has items added or removed, or when its window is opened, closed, moved, or resized. Adversaries may abuse this feature to establish persistence by utilizing a malicious script.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://posts.specterops.io/folder-actions-for-persistence-on-macos-8923f222343d" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1037", - "name": "Boot or Logon Initialization Scripts", - "reference": "https://attack.mitre.org/techniques/T1037/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "ae2dd420-77c2-4033-b66a-beb48042b085", - "rule_id": "c292fa52-4115-408a-b897-e14f684b3cb7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.pid", - "type": "long", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=5s\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\", \"info\") and process.name == \"com.apple.foundation.UserScriptService\"] by process.pid\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name in (\"osascript\", \"python\", \"tcl\", \"node\", \"perl\", \"ruby\", \"php\", \"bash\", \"csh\", \"zsh\", \"sh\") and\n not process.args : \"/Users/*/Library/Application Support/iTerm2/Scripts/AutoLaunch/*.scpt\"\n ] by process.parent.pid\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Mshta Making Network Connections", - "description": "Identifies Mshta.exe making outbound network connections. This may indicate adversarial activity, as Mshta is often leveraged by adversaries to execute malicious scripts and evade detection.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-20m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.005", - "name": "Mshta", - "reference": "https://attack.mitre.org/techniques/T1218/005/" - } - ] - } - ] - } - ], - "id": "0e2807a1-b315-469a-83b1-32d19ee1398c", - "rule_id": "c2d90150-0133-451c-a783-533e736c12d7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id with maxspan=10m\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"mshta.exe\" and\n not process.parent.name : \"Microsoft.ConfigurationManagement.exe\" and\n not (process.parent.executable : \"C:\\\\Amazon\\\\Amazon Assistant\\\\amazonAssistantService.exe\" or\n process.parent.executable : \"C:\\\\TeamViewer\\\\TeamViewer.exe\") and\n not process.args : \"ADSelfService_Enroll.hta\"]\n [network where host.os.type == \"windows\" and process.name : \"mshta.exe\"]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Persistence via BITS Job Notify Cmdline", - "description": "An adversary can use the Background Intelligent Transfer Service (BITS) SetNotifyCmdLine method to execute a program that runs after a job finishes transferring data or after a job enters a specified state in order to persist on a system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://pentestlab.blog/2019/10/30/persistence-bits-jobs/", - "https://docs.microsoft.com/en-us/windows/win32/api/bits1_5/nf-bits1_5-ibackgroundcopyjob2-setnotifycmdline", - "https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-setnotifycmdline", - "https://www.elastic.co/blog/hunting-for-persistence-using-elastic-security-part-2" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1197", - "name": "BITS Jobs", - "reference": "https://attack.mitre.org/techniques/T1197/" - } - ] - } - ], - "id": "609316fc-8548-493d-ba0d-95c55b9870e7", - "rule_id": "c3b915e0-22f3-4bf7-991d-b643513c722f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"svchost.exe\" and process.parent.args : \"BITS\" and\n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\wermgr.exe\",\n \"?:\\\\WINDOWS\\\\system32\\\\directxdatabaseupdater.exe\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential JAVA/JNDI Exploitation Attempt", - "description": "Identifies an outbound network connection by JAVA to LDAP, RMI or DNS standard ports followed by a suspicious JAVA child processes. This may indicate an attempt to exploit a JAVA/NDI (Java Naming and Directory Interface) injection vulnerability.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Execution", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.lunasec.io/docs/blog/log4j-zero-day/", - "https://github.com/christophetd/log4shell-vulnerable-app", - "https://www.blackhat.com/docs/us-16/materials/us-16-Munoz-A-Journey-From-JNDI-LDAP-Manipulation-To-RCE.pdf", - "https://www.elastic.co/security-labs/detecting-log4j2-with-elastic-security", - "https://www.elastic.co/security-labs/analysis-of-log4shell-cve-2021-45046" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.007", - "name": "JavaScript", - "reference": "https://attack.mitre.org/techniques/T1059/007/" - } - ] - }, - { - "id": "T1203", - "name": "Exploitation for Client Execution", - "reference": "https://attack.mitre.org/techniques/T1203/" - } - ] - } - ], - "id": "15c4eae3-23c7-4e03-96da-1eff9f523022", - "rule_id": "c3f5e1d8-910e-43b4-8d44-d748e498ca86", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.pid", - "type": "long", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=1m\n [network where event.action == \"connection_attempted\" and\n process.name : \"java\" and\n /*\n outbound connection attempt to\n LDAP, RMI or DNS standard ports\n by JAVA process\n */\n destination.port in (1389, 389, 1099, 53, 5353)] by process.pid\n [process where event.type == \"start\" and\n\n /* Suspicious JAVA child process */\n process.parent.name : \"java\" and\n process.name : (\"sh\",\n \"bash\",\n \"dash\",\n \"ksh\",\n \"tcsh\",\n \"zsh\",\n \"curl\",\n \"perl*\",\n \"python*\",\n \"ruby*\",\n \"php*\",\n \"wget\")] by process.parent.pid\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Mounting Hidden or WebDav Remote Shares", - "description": "Identifies the use of net.exe to mount a WebDav or hidden remote share. This may indicate lateral movement or preparation for data exfiltration.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.002", - "name": "SMB/Windows Admin Shares", - "reference": "https://attack.mitre.org/techniques/T1021/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.003", - "name": "Local Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1087", - "name": "Account Discovery", - "reference": "https://attack.mitre.org/techniques/T1087/", - "subtechnique": [ - { - "id": "T1087.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1087/001/" - }, - { - "id": "T1087.002", - "name": "Domain Account", - "reference": "https://attack.mitre.org/techniques/T1087/002/" - } - ] - } - ] - } - ], - "id": "6412dc0e-dbe1-479f-a6a3-6035d4d45c78", - "rule_id": "c4210e1c-64f2-4f48-b67e-b5a8ffe3aa14", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n ((process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or ((process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and\n not process.parent.name : \"net.exe\")) and\n process.args : \"use\" and\n /* including hidden and webdav based online shares such as onedrive */\n process.args : (\"\\\\\\\\*\\\\*$*\", \"\\\\\\\\*@SSL\\\\*\", \"http*\") and\n /* excluding shares deletion operation */\n not process.args : \"/d*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Print Spooler File Deletion", - "description": "Detects deletion of print driver files by an unusual process. This may indicate a clean up attempt post successful privilege escalation via Print Spooler service related vulnerabilities.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uninstall or manual deletion of a legitimate printing driver files. Verify the printer file metadata such as manufacturer and signature information." - ], - "references": [ - "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "a0765668-6f20-4b0c-8bde-707fcbe6e2bc", - "rule_id": "c4818812-d44f-47be-aaef-4cfb2f9cc799", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type : \"deletion\" and\n not process.name : (\"spoolsv.exe\", \"dllhost.exe\", \"explorer.exe\") and\n file.path : \"?:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\3\\\\*.dll\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Windows System Network Connections Discovery", - "description": "This rule identifies the execution of commands that can be used to enumerate network connections. Adversaries may attempt to get a listing of network connections to or from a compromised system to identify targets within an environment.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1049", - "name": "System Network Connections Discovery", - "reference": "https://attack.mitre.org/techniques/T1049/" - }, - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "58452964-539b-4bdd-b795-853d9ad12df0", - "rule_id": "c4e9ed3e-55a2-4309-a012-bc3c78dad10a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and\n(\n process.name : \"netstat.exe\" or\n (\n (\n (process.name : \"net.exe\" or process.pe.original_file_name == \"net.exe\") or\n (\n (process.name : \"net1.exe\" or process.pe.original_file_name == \"net1.exe\") and\n not process.parent.name : \"net.exe\"\n )\n ) and process.args : (\"use\", \"user\", \"session\", \"config\") and not process.args: (\"/persistent:*\", \"/delete\", \"\\\\\\\\*\")\n ) or\n (process.name : \"nbtstat.exe\" and process.args : \"-s*\")\n) and not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Credential Access via Renamed COM+ Services DLL", - "description": "Identifies suspicious renamed COMSVCS.DLL Image Load, which exports the MiniDump function that can be used to dump a process memory. This may indicate an attempt to dump LSASS memory while bypassing command-line based detection in preparation for credential access.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Defense Evasion", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://modexp.wordpress.com/2019/08/30/minidumpwritedump-via-com-services-dll/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.011", - "name": "Rundll32", - "reference": "https://attack.mitre.org/techniques/T1218/011/" - } - ] - } - ] - } - ], - "id": "75ea0a03-07a0-4cb9-a8f7-a94252bad19b", - "rule_id": "c5c9f591-d111-4cf8-baec-c26a39bc31ef", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.pe.imphash", - "type": "keyword", - "ecs": true - }, - { - "name": "file.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "You will need to enable logging of ImageLoads in your Sysmon configuration to include COMSVCS.DLL by Imphash or Original\nFile Name.", - "type": "eql", - "query": "sequence by process.entity_id with maxspan=1m\n [process where host.os.type == \"windows\" and event.category == \"process\" and\n process.name : \"rundll32.exe\"]\n [process where host.os.type == \"windows\" and event.category == \"process\" and event.dataset : \"windows.sysmon_operational\" and event.code == \"7\" and\n (file.pe.original_file_name : \"COMSVCS.DLL\" or file.pe.imphash : \"EADBCCBB324829ACB5F2BBE87E5549A8\") and\n /* renamed COMSVCS */\n not file.name : \"COMSVCS.DLL\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Installation of Custom Shim Databases", - "description": "Identifies the installation of custom Application Compatibility Shim databases. This Windows functionality has been abused by attackers to stealthily gain persistence and arbitrary code execution in legitimate Windows processes.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.011", - "name": "Application Shimming", - "reference": "https://attack.mitre.org/techniques/T1546/011/" - } - ] - } - ] - } - ], - "id": "310b03ba-aef8-4083-a8f4-0100c3ff5353", - "rule_id": "c5ce48a6-7f57-4ee8-9313-3d0024caee10", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id with maxspan = 5m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n not (process.name : \"sdbinst.exe\" and process.parent.name : \"msiexec.exe\")]\n [registry where host.os.type == \"windows\" and event.type in (\"creation\", \"change\") and\n registry.path : \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\AppCompatFlags\\\\Custom\\\\*.sdb\"]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Unusual Network Connection via DllHost", - "description": "Identifies unusual instances of dllhost.exe making outbound network connections. This may indicate adversarial Command and Control activity.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.microsoft.com/security/blog/2021/05/27/new-sophisticated-email-based-attack-from-nobelium/", - "https://www.volexity.com/blog/2021/05/27/suspected-apt29-operation-launches-election-fraud-themed-phishing-campaigns/", - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "5fb826f0-8409-4484-92b7-9e9dfea733d4", - "rule_id": "c7894234-7814-44c2-92a9-f7d851ea246a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=1m\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"dllhost.exe\" and process.args_count == 1]\n [network where host.os.type == \"windows\" and process.name : \"dllhost.exe\" and\n not cidrmatch(destination.ip, \"10.0.0.0/8\", \"127.0.0.0/8\", \"169.254.0.0/16\", \"172.16.0.0/12\", \"192.0.0.0/24\",\n \"192.0.0.0/29\", \"192.0.0.8/32\", \"192.0.0.9/32\", \"192.0.0.10/32\", \"192.0.0.170/32\", \"192.0.0.171/32\", \"192.0.2.0/24\",\n \"192.31.196.0/24\", \"192.52.193.0/24\", \"192.168.0.0/16\", \"192.88.99.0/24\", \"224.0.0.0/4\", \"100.64.0.0/10\",\n \"192.175.48.0/24\", \"198.18.0.0/15\", \"198.51.100.0/24\", \"203.0.113.0/24\", \"240.0.0.0/4\", \"::1\", \"FE80::/10\",\n \"FF00::/8\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Spike in Network Traffic To a Country", - "description": "A machine learning job detected an unusually large spike in network activity to one destination country in the network logs. This could be due to unusually large amounts of reconnaissance or enumeration traffic. Data exfiltration activity may also produce such a surge in traffic to a destination country that does not normally appear in network traffic or business workflows. Malware instances and persistence mechanisms may communicate with command-and-control (C2) infrastructure in their country of origin, which may be an unusual destination country for the source network.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Spike in Network Traffic To a Country\n\nMonitoring network traffic for anomalies is a good methodology for uncovering various potentially suspicious activities. For example, data exfiltration or infected machines may communicate with a command-and-control (C2) server in another country your company doesn't have business with.\n\nThis rule uses a machine learning job to detect a significant spike in the network traffic to a country, which can indicate reconnaissance or enumeration activities, an infected machine being used as a bot in a DDoS attack, or potentially data exfiltration.\n\n#### Possible investigation steps\n\n- Identify the specifics of the involved assets, such as role, criticality, and associated users.\n- Investigate other alerts associated with the involved assets during the past 48 hours.\n- Examine the data available and determine the exact users and processes involved in those connections.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Consider the time of day. If the user is a human (not a program or script), did the activity occurs during working hours?\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n\n### False positive analysis\n\n- Understand the context of the connections by contacting the asset owners. If this activity is related to a new business process or newly implemented (approved) technology, consider adding exceptions — preferably with a combination of user and source conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n - Remove and block malicious artifacts identified during triage.\n- Consider implementing temporary network border rules to block or alert connections to the target country, if relevant.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 104, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Business workflows that occur very occasionally, and involve an unusual surge in network traffic to one destination country, can trigger this alert. A new business workflow or a surge in business activity in a particular country may trigger this alert. Business travelers who roam to many countries for brief periods may trigger this alert if they engage in volumetric network activity." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "399e0bde-92b4-4f86-9c05-b4861a8c9471", - "rule_id": "c7db5533-ca2a-41f6-a8b0-ee98abe0f573", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "high_count_by_destination_country" - }, - { - "name": "Persistence via Docker Shortcut Modification", - "description": "An adversary can establish persistence by modifying an existing macOS dock property list in order to execute a malicious application instead of the intended one when invoked.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/specterops/presentations/raw/master/Leo%20Pitt/Hey_Im_Still_in_Here_Modern_macOS_Persistence_SO-CON2020.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/" - } - ] - } - ], - "id": "fff686b7-9916-4e9a-9ac6-cbc8630d5b72", - "rule_id": "c81cefcb-82b9-4408-a533-3c3df549e62d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:file and host.os.type:macos and event.action:modification and\n file.path:/Users/*/Library/Preferences/com.apple.dock.plist and\n not process.name:(xpcproxy or cfprefsd or plutil or jamf or PlistBuddy or InstallerRemotePluginService)\n", - "language": "kuery" - }, - { - "name": "Virtual Machine Fingerprinting via Grep", - "description": "An adversary may attempt to get detailed information about the operating system and hardware. This rule identifies common locations used to discover virtual machine hardware by a non-root user. This technique has been used by the Pupy RAT and other malware.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Certain tools or automated software may enumerate hardware information. These tools can be exempted via user name or process arguments to eliminate potential noise." - ], - "references": [ - "https://objective-see.com/blog/blog_0x4F.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "09e72b0d-2935-4f35-9e5c-4cd277ee041e", - "rule_id": "c85eb82c-d2c8-485c-a36f-534f914b7663", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where event.type == \"start\" and\n process.name in (\"grep\", \"egrep\") and user.id != \"0\" and\n process.args : (\"parallels*\", \"vmware*\", \"virtualbox*\") and process.args : \"Manufacturer*\" and\n not process.parent.executable in (\"/Applications/Docker.app/Contents/MacOS/Docker\", \"/usr/libexec/kcare/virt-what\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Calendar File Modification", - "description": "Identifies suspicious modifications of the calendar file by an unusual process. Adversaries may create a custom calendar notification procedure to execute a malicious program at a recurring interval to establish persistence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trusted applications for managing calendars and reminders." - ], - "references": [ - "https://labs.f-secure.com/blog/operationalising-calendar-alerts-persistence-on-macos", - "https://github.com/FSecureLABS/CalendarPersist", - "https://github.com/D00MFist/PersistentJXA/blob/master/CalendarPersist.js" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/" - } - ] - } - ], - "id": "a67dc9e2-ec9d-4eb7-be95-d427e5e36783", - "rule_id": "cb71aa62-55c8-42f0-b0dd-afb0bb0b1f51", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "logs-endpoint.events.*", - "auditbeat-*" - ], - "query": "event.category:file and host.os.type:macos and event.action:modification and\n file.path:/Users/*/Library/Calendars/*.calendar/Events/*.ics and\n process.executable:\n (* and not\n (\n /System/Library/* or\n /System/Applications/Calendar.app/Contents/MacOS/* or\n /System/Applications/Mail.app/Contents/MacOS/Mail or\n /usr/libexec/xpcproxy or\n /sbin/launchd or\n /Applications/*\n )\n )\n", - "language": "kuery" - }, - { - "name": "Attempt to Enable the Root Account", - "description": "Identifies attempts to enable the root account using the dsenableroot command. This command may be abused by adversaries for persistence, as the root account is disabled by default.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://ss64.com/osx/dsenableroot.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.003", - "name": "Local Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/003/" - } - ] - } - ] - } - ], - "id": "a142c7de-fb34-413c-8b44-f481b2048b36", - "rule_id": "cc2fd2d0-ba3a-4939-b87f-2901764ed036", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:dsenableroot and not process.args:\"-d\"\n", - "language": "kuery" - }, - { - "name": "Google Workspace User Organizational Unit Changed", - "description": "Users in Google Workspace are typically assigned a specific organizational unit that grants them permissions to certain services and roles that are inherited from this organizational unit. Adversaries may compromise a valid account and change which organizational account the user belongs to which then could allow them to inherit permissions to applications and resources inaccessible prior to.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace User Organizational Unit Changed\n\nAn organizational unit is a group that an administrator can create in the Google Admin console to apply settings to a specific set of users for Google Workspace. By default, all users are placed in the top-level (parent) organizational unit. Child organizational units inherit the settings from the parent but can be changed to fit the needs of the child organizational unit.\n\nPermissions and privileges for users are often inherited from the organizational unit they are placed in. Therefore, if a user is changed to a separate organizational unit, they will inherit all privileges and permissions. User accounts may have unexpected privileges when switching organizational units that would allow a threat actor to gain a stronger foothold within the organization. The principle of least privileged (PoLP) should be followed when users are switched to different groups in Google Workspace.\n\nThis rule identifies when a user has been moved to a different organizational unit.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n - The `user.target.email` field contains the user that had their assigned organizational unit switched.\n- Identify the user's previously assigned unit and new organizational unit by checking the `google_workspace.admin.org_unit.name` and `google_workspace.admin.new_value` fields.\n- Identify Google Workspace applications whose settings were explicitly set for this organizational unit.\n - Search for `event.action` is `CREATE_APPLICATION_SETTING` where `google_workspace.admin.org_unit.name` is the new organizational unit.\n- After identifying the involved user, verify administrative privileges are scoped properly to allow changing user organizational units.\n- Identify if the user account was recently created by searching for `event.action: CREATE_USER`.\n - Add `user.email` with the target user account that recently had their organizational unit changed.\n- Filter on `user.name` or `user.target.email` of the user who took this action and review the last 48 hours of activity for anything that may indicate a compromise.\n\n### False positive analysis\n\n- After identifying the user account that changed another user's organizational unit, verify the action was intentional.\n- Verify whether the target user who received this update is expected to inherit privileges from the new organizational unit.\n- Review potential maintenance notes or organizational changes. They might explain why a user's organization was changed.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 106, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Configuration Audit", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Google Workspace administrators may adjust change which organizational unit a user belongs to as a result of internal role adjustments." - ], - "references": [ - "https://support.google.com/a/answer/6328701?hl=en#" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/", - "subtechnique": [ - { - "id": "T1098.003", - "name": "Additional Cloud Roles", - "reference": "https://attack.mitre.org/techniques/T1098/003/" - } - ] - } - ] - } - ], - "id": "556477ae-d350-4d42-8039-30f52e80c238", - "rule_id": "cc6a8a20-2df2-11ed-8378-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.event.type", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:\"google_workspace.admin\" and event.type:change and event.category:iam\n and google_workspace.event.type:\"USER_SETTINGS\" and event.action:\"MOVE_USER_TO_ORG_UNIT\"\n", - "language": "kuery" - }, - { - "name": "Potential Process Herpaderping Attempt", - "description": "Identifies process execution followed by a file overwrite of an executable by the same parent process. This may indicate an evasion attempt to execute malicious code in a stealthy way.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/jxy-s/herpaderping" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - } - ], - "id": "7d56ba3e-64b8-4578-a077-770aee3b3d20", - "rule_id": "ccc55af4-9882-4c67-87b4-449a7ae8079c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=5s\n [process where host.os.type == \"windows\" and event.type == \"start\" and not process.parent.executable :\n (\n \"?:\\\\Windows\\\\SoftwareDistribution\\\\*.exe\",\n \"?:\\\\Program Files\\\\Elastic\\\\Agent\\\\data\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\Trend Micro\\\\*.exe\"\n )\n ] by host.id, process.executable, process.parent.entity_id\n [file where host.os.type == \"windows\" and event.type == \"change\" and event.action == \"overwrite\" and file.extension == \"exe\"] by host.id, file.path, process.entity_id\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Anomalous Linux Compiler Activity", - "description": "Looks for compiler activity by a user context which does not normally run compilers. This can be the result of ad-hoc software changes or unauthorized software deployment. This can also be due to local privilege elevation via locally run exploits or malware activity.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Resource Development" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon compiler activity can be due to an engineer running a local build on a production or staging instance in the course of troubleshooting or fixing a software issue." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0042", - "name": "Resource Development", - "reference": "https://attack.mitre.org/tactics/TA0042/" - }, - "technique": [ - { - "id": "T1588", - "name": "Obtain Capabilities", - "reference": "https://attack.mitre.org/techniques/T1588/", - "subtechnique": [ - { - "id": "T1588.001", - "name": "Malware", - "reference": "https://attack.mitre.org/techniques/T1588/001/" - } - ] - } - ] - } - ], - "id": "c5c18c27-a5ad-4889-9dd8-53d335bbb82f", - "rule_id": "cd66a419-9b3f-4f57-8ff8-ac4cd2d5f530", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 50, - "machine_learning_job_id": [ - "v3_linux_rare_user_compiler" - ] - }, - { - "name": "Domain Added to Google Workspace Trusted Domains", - "description": "Detects when a domain is added to the list of trusted Google Workspace domains. An adversary may add a trusted domain in order to collect and exfiltrate data from their target’s organization with less restrictive security controls.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Domain Added to Google Workspace Trusted Domains\n\nOrganizations use trusted domains in Google Workspace to give external users access to resources.\n\nA threat actor with administrative privileges may be able to add a malicious domain to the trusted domain list. Based on the configuration, potentially sensitive resources may be exposed or accessible by an unintended third-party.\n\nThis rule detects when a third-party domain is added to the list of trusted domains in Google Workspace.\n\n#### Possible investigation steps\n\n- Identify the associated user accounts by reviewing `user.name` or `user.email` fields in the alert.\n- After identifying the user, verify if the user should have administrative privileges to add external domains.\n- Check the `google_workspace.admin.domain.name` field to find the newly added domain.\n- Use reputational services, such as VirusTotal, for the trusted domain's third-party intelligence reputation.\n- Filter your data. Create a filter where `event.dataset` is `google_workspace.drive` and `google_workspace.drive.file.owner.email` is being compared to `user.email`.\n - If mismatches are identified, this could indicate access from an external Google Workspace domain.\n\n### False positive analysis\n\n- Verify that the user account should have administrative privileges that allow them to edit trusted domains in Google Workspace.\n- Talk to the user to evaluate why they added the third-party domain and if the domain has confidentiality risks.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trusted domains may be added by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://support.google.com/a/answer/6160020?hl=en" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "686ee79c-9fae-41df-a1e0-8fe1c30c714d", - "rule_id": "cf549724-c577-4fd6-8f9b-d1b8ec519ec0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:ADD_TRUSTED_DOMAINS\n", - "language": "kuery" - }, - { - "name": "Expired or Revoked Driver Loaded", - "description": "Identifies an attempt to load a revoked or expired driver. Adversaries may bring outdated drivers with vulnerabilities to gain code execution in kernel mode or abuse revoked certificates to sign their drivers.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653559(v=vs.85)?redirectedfrom=MSDN" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - } - ] - } - ] - } - ], - "id": "6d164611-282f-4186-bb46-7ac3c1d88e4a", - "rule_id": "d12bac54-ab2a-4159-933f-d7bcefa7b61d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "driver where host.os.type == \"windows\" and process.pid == 4 and\n dll.code_signature.status : (\"errorExpired\", \"errorRevoked\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Microsoft Office Sandbox Evasion", - "description": "Identifies the creation of a suspicious zip file prepended with special characters. Sandboxed Microsoft Office applications on macOS are allowed to write files that start with special characters, which can be combined with an AutoStart location to achieve sandbox evasion.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://i.blackhat.com/USA-20/Wednesday/us-20-Wardle-Office-Drama-On-macOS.pdf", - "https://www.mdsec.co.uk/2018/08/escaping-the-sandbox-microsoft-office-on-macos/", - "https://desi-jarvis.medium.com/office365-macos-sandbox-escape-fcce4fa4123c" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1497", - "name": "Virtualization/Sandbox Evasion", - "reference": "https://attack.mitre.org/techniques/T1497/" - } - ] - } - ], - "id": "0e1ee932-71c6-4860-9367-8d6b33970422", - "rule_id": "d22a85c6-d2ad-4cc4-bf7b-54787473669a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:file and host.os.type:(macos and macos) and not event.type:deletion and file.name:~$*.zip\n", - "language": "kuery" - }, - { - "name": "Remote Windows Service Installed", - "description": "Identifies a network logon followed by Windows service creation with same LogonId. This could be indicative of lateral movement, but will be noisy if commonly done by administrators.\"", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 6, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - } - ], - "id": "c3fca815-699b-4f7f-b53c-711c43404195", - "rule_id": "d33ea3bf-9a11-463e-bd46-f648f2a0f4b1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.ServiceFileName", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectLogonId", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.logon.id", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.logon.type", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "sequence by winlog.logon.id, winlog.computer_name with maxspan=1m\n[authentication where event.action == \"logged-in\" and winlog.logon.type : \"Network\" and\nevent.outcome==\"success\" and source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\"]\n[iam where event.action == \"service-installed\" and\n not winlog.event_data.SubjectLogonId : \"0x3e7\" and\n not winlog.event_data.ServiceFileName :\n (\"?:\\\\Windows\\\\ADCR_Agent\\\\adcrsvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\VSSVC.exe\",\n \"?:\\\\Windows\\\\servicing\\\\TrustedInstaller.exe\",\n \"?:\\\\Windows\\\\System32\\\\svchost.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Windows\\\\PSEXESVC.EXE\",\n \"?:\\\\Windows\\\\System32\\\\sppsvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\wbem\\\\WmiApSrv.exe\",\n \"?:\\\\WINDOWS\\\\RemoteAuditService.exe\",\n \"?:\\\\Windows\\\\VeeamVssSupport\\\\VeeamGuestHelper.exe\",\n \"?:\\\\Windows\\\\VeeamLogShipper\\\\VeeamLogShipper.exe\",\n \"?:\\\\Windows\\\\CAInvokerService.exe\",\n \"?:\\\\Windows\\\\System32\\\\upfc.exe\",\n \"?:\\\\Windows\\\\AdminArsenal\\\\PDQ*.exe\",\n \"?:\\\\Windows\\\\System32\\\\vds.exe\",\n \"?:\\\\Windows\\\\Veeam\\\\Backup\\\\VeeamDeploymentSvc.exe\",\n \"?:\\\\Windows\\\\ProPatches\\\\Scheduler\\\\STSchedEx.exe\",\n \"?:\\\\Windows\\\\System32\\\\certsrv.exe\",\n \"?:\\\\Windows\\\\eset-remote-install-service.exe\",\n \"?:\\\\Pella Corporation\\\\Pella Order Management\\\\GPAutoSvc.exe\",\n \"?:\\\\Pella Corporation\\\\OSCToGPAutoService\\\\OSCToGPAutoSvc.exe\",\n \"?:\\\\Pella Corporation\\\\Pella Order Management\\\\GPAutoSvc.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\NwxExeSvc\\\\NwxExeSvc.exe\",\n \"?:\\\\Windows\\\\System32\\\\taskhostex.exe\")]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "Shell Execution via Apple Scripting", - "description": "Identifies the execution of the shell process (sh) via scripting (JXA or AppleScript). Adversaries may use the doShellScript functionality in JXA or do shell script in AppleScript to execute system commands.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://developer.apple.com/library/archive/technotes/tn2065/_index.html", - "https://objectivebythesea.com/v2/talks/OBTS_v2_Thomas.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "b566c26a-6996-4c47-8134-bb254fe53c7f", - "rule_id": "d461fac0-43e8-49e2-85ea-3a58fe120b4f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.pid", - "type": "long", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id with maxspan=5s\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\", \"info\") and process.name == \"osascript\"] by process.pid\n [process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name == \"sh\" and process.args == \"-c\"] by process.parent.pid\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual Linux System Information Discovery Activity", - "description": "Looks for commands related to system information discovery from an unusual user context. This can be due to uncommon troubleshooting activity or due to a compromised account. A compromised account may be used to engage in system information discovery in order to gather detailed information about system configuration and software versions. This may be a precursor to selection of a persistence mechanism or a method of privilege elevation.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Discovery" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Uncommon user command activity can be due to an engineer logging onto a server instance in order to perform manual troubleshooting or reconfiguration." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "6a56500b-a433-432d-827e-c390c2a2a57d", - "rule_id": "d4af3a06-1e0a-48ec-b96a-faf2309fae46", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": [ - "v3_linux_system_information_discovery" - ] - }, - { - "name": "Unusual Source IP for a User to Logon from", - "description": "A machine learning job detected a user logging in from an IP address that is unusual for the user. This can be due to credentialed access via a compromised account when the user and the threat actor are in different locations. An unusual source IP address for a username could also be due to lateral movement when a compromised account is used to pivot between hosts.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Identity and Access Audit", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Business travelers who roam to new locations may trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "84ca4b20-7c9a-4449-91c9-a9dc18eaea62", - "rule_id": "d4b73fa0-9d43-465e-b8bf-50230da6718b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "auth_rare_source_ip_for_a_user" - }, - { - "name": "Potential Privilege Escalation via UID INT_MAX Bug Detected", - "description": "This rule monitors for the execution of the systemd-run command by a user with a UID that is larger than the maximum allowed UID size (INT_MAX). Some older Linux versions were affected by a bug which allows user accounts with a UID greater than INT_MAX to escalate privileges by spawning a shell through systemd-run.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://twitter.com/paragonsec/status/1071152249529884674", - "https://github.com/mirchr/security-research/blob/master/vulnerabilities/CVE-2018-19788.sh", - "https://gitlab.freedesktop.org/polkit/polkit/-/issues/74" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "77de8939-c0cb-4557-99ed-509800e7f2c8", - "rule_id": "d55436a8-719c-445f-92c4-c113ff2f9ba5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"systemd-run\" and process.args == \"-t\" and process.args_count >= 3 and user.id >= \"1000000000\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Privilege Escalation via Windir Environment Variable", - "description": "Identifies a privilege escalation attempt via a rogue Windows directory (Windir) environment variable. This is a known primitive that is often combined with other vulnerabilities to elevate privileges.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.tiraniddo.dev/2017/05/exploiting-environment-variables-in.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.007", - "name": "Path Interception by PATH Environment Variable", - "reference": "https://attack.mitre.org/techniques/T1574/007/" - } - ] - } - ] - } - ], - "id": "ec4b5fe7-6adf-4402-99ce-e353039630bf", - "rule_id": "d563aaba-2e72-462b-8658-3e5ea22db3a6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and registry.path : (\n \"HKEY_USERS\\\\*\\\\Environment\\\\windir\",\n \"HKEY_USERS\\\\*\\\\Environment\\\\systemroot\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Environment\\\\windir\",\n \"\\\\REGISTRY\\\\USER\\\\*\\\\Environment\\\\systemroot\"\n ) and\n not registry.data.strings : (\"C:\\\\windows\", \"%SystemRoot%\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Service Command Lateral Movement", - "description": "Identifies use of sc.exe to create, modify, or start services on remote hosts. This could be indicative of adversary lateral movement but will be noisy if commonly done by admins.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1569", - "name": "System Services", - "reference": "https://attack.mitre.org/techniques/T1569/", - "subtechnique": [ - { - "id": "T1569.002", - "name": "Service Execution", - "reference": "https://attack.mitre.org/techniques/T1569/002/" - } - ] - } - ] - } - ], - "id": "bad9c496-7c45-4065-911c-f1bd8da9a5cd", - "rule_id": "d61cbcf8-1bc1-4cff-85ba-e7b21c5beedc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id with maxspan = 1m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"sc.exe\" or process.pe.original_file_name : \"sc.exe\") and\n process.args : \"\\\\\\\\*\" and process.args : (\"binPath=*\", \"binpath=*\") and\n process.args : (\"create\", \"config\", \"failure\", \"start\")]\n [network where host.os.type == \"windows\" and process.name : \"sc.exe\" and destination.ip != \"127.0.0.1\"]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Modification of WDigest Security Provider", - "description": "Identifies attempts to modify the WDigest security provider in the registry to force the user's password to be stored in clear text in memory. This behavior can be indicative of an adversary attempting to weaken the security configuration of an endpoint. Once the UseLogonCredential value is modified, the adversary may attempt to dump clear text passwords from memory.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Modification of WDigest Security Provider\n\nIn Windows XP, Microsoft added support for a protocol known as WDigest. The WDigest protocol allows clients to send cleartext credentials to Hypertext Transfer Protocol (HTTP) and Simple Authentication Security Layer (SASL) applications based on RFC 2617 and 2831. Windows versions up to 8 and 2012 store logon credentials in memory in plaintext by default, which is no longer the case with newer Windows versions.\n\nStill, attackers can force WDigest to store the passwords insecurely on the memory by modifying the `HKLM\\SYSTEM\\*ControlSet*\\Control\\SecurityProviders\\WDigest\\UseLogonCredential` registry key. This activity is commonly related to the execution of credential dumping tools.\n\n#### Possible investigation steps\n\n- It is unlikely that the monitored registry key was modified legitimately in newer versions of Windows. Analysts should treat any activity triggered from this rule with high priority as it typically represents an active adversary.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Determine if credential dumping tools were run on the host, and retrieve and analyze suspicious executables:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n- Use process name, command line, and file hash to search for occurrences on other hosts.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.\n\n### False positive analysis\n\n- This modification should not happen legitimately. Any potential benign true positive (B-TP) should be mapped and monitored by the security team, as these modifications expose the entire domain to credential compromises and consequently unauthorized access.\n\n### Related rules\n\n- Mimikatz Powershell Module Activity - ac96ceb8-4399-4191-af1d-4feeac1f1f46\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reimage the host operating system and restore compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.csoonline.com/article/3438824/how-to-detect-and-halt-credential-theft-via-windows-wdigest.html", - "https://www.praetorian.com/blog/mitigating-mimikatz-wdigest-cleartext-credential-theft?edition=2019", - "https://frsecure.com/compromised-credentials-response-playbook", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "416b5a88-46bf-4f1c-a73f-48bfea0be547", - "rule_id": "d703a5af-d5b0-43bd-8ddb-7a5d500b7da5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type : (\"creation\", \"change\") and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\SecurityProviders\\\\WDigest\\\\UseLogonCredential\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\SecurityProviders\\\\WDigest\\\\UseLogonCredential\"\n ) and registry.data.strings : (\"1\", \"0x00000001\") and\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\svchost.exe\" and user.id : \"S-1-5-18\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "SystemKey Access via Command Line", - "description": "Keychains are the built-in way for macOS to keep track of users' passwords and credentials for many services and features, including Wi-Fi and website passwords, secure notes, certificates, and Kerberos. Adversaries may collect the keychain storage data from a system to acquire credentials.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/AlessandroZ/LaZagne/blob/master/Mac/lazagne/softwares/system/chainbreaker.py" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1555", - "name": "Credentials from Password Stores", - "reference": "https://attack.mitre.org/techniques/T1555/", - "subtechnique": [ - { - "id": "T1555.001", - "name": "Keychain", - "reference": "https://attack.mitre.org/techniques/T1555/001/" - } - ] - } - ] - } - ], - "id": "ae67fe29-5ef6-49fb-b8cb-6e2b5605b090", - "rule_id": "d75991f2-b989-419d-b797-ac1e54ec2d61", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.args:(\"/private/var/db/SystemKey\" or \"/var/db/SystemKey\")\n", - "language": "kuery" - }, - { - "name": "Azure Blob Permissions Modification", - "description": "Identifies when the Azure role-based access control (Azure RBAC) permissions are modified for an Azure Blob. An adversary may modify the permissions on a blob to weaken their target's security controls or an administrator may inadvertently modify the permissions, which could lead to data exposure or loss.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 103, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Blob permissions may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1222", - "name": "File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/" - } - ] - } - ], - "id": "f6cab505-2cd2-4695-93ab-95c07f74f5e1", - "rule_id": "d79c4b2a-6134-4edd-86e6-564a92a933f9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:(\n \"MICROSOFT.STORAGE/STORAGEACCOUNTS/BLOBSERVICES/CONTAINERS/BLOBS/MANAGEOWNERSHIP/ACTION\" or\n \"MICROSOFT.STORAGE/STORAGEACCOUNTS/BLOBSERVICES/CONTAINERS/BLOBS/MODIFYPERMISSIONS/ACTION\") and\n event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Spike in Logon Events", - "description": "A machine learning job found an unusually large spike in successful authentication events. This can be due to password spraying, user enumeration or brute force activity.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Identity and Access Audit", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Build servers and CI systems can sometimes trigger this alert. Security test cycles that include brute force or password spraying activities may trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "52d24b2c-97df-494c-b885-e63d780154a2", - "rule_id": "d7d5c059-c19a-4a96-8ae3-41496ef3bcf9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "auth_high_count_logon_events" - }, - { - "name": "Execution via Windows Subsystem for Linux", - "description": "Detects attempts to execute a program on the host from the Windows Subsystem for Linux. Adversaries may enable and use WSL for Linux to avoid detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://learn.microsoft.com/en-us/windows/wsl/wsl-config" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1202", - "name": "Indirect Command Execution", - "reference": "https://attack.mitre.org/techniques/T1202/" - } - ] - } - ], - "id": "8e76a42b-6328-45c4-a1c1-7bd121f30b8b", - "rule_id": "db7dbad5-08d2-4d25-b9b1-d3a1e4a15efd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type : \"start\" and\n process.parent.executable : \n (\"?:\\\\Windows\\\\System32\\\\wsl.exe\", \n \"?:\\\\Program Files*\\\\WindowsApps\\\\MicrosoftCorporationII.WindowsSubsystemForLinux_*\\\\wsl.exe\", \n \"?:\\\\Windows\\\\System32\\\\wslhost.exe\", \n \"?:\\\\Program Files*\\\\WindowsApps\\\\MicrosoftCorporationII.WindowsSubsystemForLinux_*\\\\wslhost.exe\") and \n not process.executable : \n (\"?:\\\\Windows\\\\System32\\\\conhost.exe\", \n \"?:\\\\Windows\\\\System32\\\\lxss\\\\wslhost.exe\", \n \"?:\\\\Windows\\\\Sys*\\\\wslconfig.exe\", \n \"?:\\\\Program Files*\\\\WindowsApps\\\\MicrosoftCorporationII.WindowsSubsystemForLinux_*\\\\wsl*.exe\", \n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\", \n \"?:\\\\Program Files\\\\*\", \n \"?:\\\\Program Files (x86)\\\\*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Content Extracted or Decompressed via Funzip", - "description": "Identifies when suspicious content is extracted from a file and subsequently decompressed using the funzip utility. Malware may execute the tail utility using the \"-c\" option to read a sequence of bytes from the end of a file. The output from tail can be piped to funzip in order to decompress malicious code before it is executed. This behavior is consistent with malware families such as Bundlore.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://attack.mitre.org/software/S0482/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1027", - "name": "Obfuscated Files or Information", - "reference": "https://attack.mitre.org/techniques/T1027/" - }, - { - "id": "T1140", - "name": "Deobfuscate/Decode Files or Information", - "reference": "https://attack.mitre.org/techniques/T1140/" - } - ] - } - ], - "id": "b106b7f8-1f96-4010-bf50-1cc5def707fb", - "rule_id": "dc0b7782-0df0-47ff-8337-db0d678bdb66", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and\n((process.args == \"tail\" and process.args == \"-c\" and process.args == \"funzip\")) and\nnot process.args : \"/var/log/messages\" and \nnot process.parent.executable : (\"/usr/bin/dracut\", \"/sbin/dracut\", \"/usr/bin/xargs\") and\nnot (process.parent.name in (\"sh\", \"sudo\") and process.parent.command_line : \"*nessus_su*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Unusual Child Process from a System Virtual Process", - "description": "Identifies a suspicious child process of the Windows virtual system process, which could indicate code injection.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - } - ], - "id": "76616eff-d3aa-4858-a0e8-0d5dba50b6df", - "rule_id": "de9bd7e0-49e9-4e92-a64d-53ade2e66af1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.pid", - "type": "long", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.pid == 4 and\n not process.executable : (\"Registry\", \"MemCompression\", \"?:\\\\Windows\\\\System32\\\\smss.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Query Registry using Built-in Tools", - "description": "This rule identifies the execution of commands that can be used to query the Windows Registry. Adversaries may query the registry to gain situational awareness about the host, like installed security software, programs and settings.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 102, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1012", - "name": "Query Registry", - "reference": "https://attack.mitre.org/techniques/T1012/" - } - ] - } - ], - "id": "0c5f4813-b4f8-4a42-850a-702aba3d582d", - "rule_id": "ded09d02-0137-4ccc-8005-c45e617e8d4c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line.caseless", - "type": "unknown", - "ecs": false - }, - { - "name": "process.name.caseless", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type:windows and event.category:process and event.type:start and (\n (process.name.caseless:\"reg.exe\" and process.args:\"query\") or \n (process.name.caseless:(\"powershell.exe\" or \"powershell_ise.exe\" or \"pwsh.exe\") and \n process.command_line.caseless:((*Get-ChildItem* or *Get-Item* or *Get-ItemProperty*) and \n (*HKCU* or *HKEY_CURRENT_USER* or *HKEY_LOCAL_MACHINE* or *HKLM* or *Registry\\:\\:*))))\n", - "new_terms_fields": [ - "host.id", - "user.id" - ], - "history_window_start": "now-14d", - "index": [ - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "Unusual Windows User Calling the Metadata Service", - "description": "Looks for anomalous access to the cloud platform metadata service by an unusual user. The metadata service may be targeted in order to harvest credentials or user data scripts containing secrets.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A newly installed program, or one that runs under a new or rarely used user context, could trigger this detection rule. Manual interrogation of the metadata service during debugging or troubleshooting could trigger this rule." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.005", - "name": "Cloud Instance Metadata API", - "reference": "https://attack.mitre.org/techniques/T1552/005/" - } - ] - } - ] - } - ], - "id": "a07105d4-134d-45f2-ab83-b907b10d9ec4", - "rule_id": "df197323-72a8-46a9-a08e-3f5b04a4a97a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": [ - "v3_windows_rare_metadata_user" - ] - }, - { - "name": "KRBTGT Delegation Backdoor", - "description": "Identifies the modification of the msDS-AllowedToDelegateTo attribute to KRBTGT. Attackers can use this technique to maintain persistence to the domain by having the ability to request tickets for the KRBTGT service.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Use Case: Active Directory Monitoring", - "Data Source: Active Directory" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://skyblue.team/posts/delegate-krbtgt", - "https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0026_windows_audit_user_account_management.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/" - } - ] - } - ], - "id": "ee2ff0d6-793a-42ef-912b-fc02631d04c8", - "rule_id": "e052c845-48d0-4f46-8a13-7d0aba05df82", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.AllowedToDelegateTo", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'Audit User Account Management' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nAccount Management >\nAudit User Account Management (Success,Failure)\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.action:modified-user-account and event.code:4738 and\n winlog.event_data.AllowedToDelegateTo:*krbtgt*\n", - "language": "kuery" - }, - { - "name": "Spike in Successful Logon Events from a Source IP", - "description": "A machine learning job found an unusually large spike in successful authentication events from a particular source IP address. This can be due to password spraying, user enumeration or brute force activity.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Spike in Successful Logon Events from a Source IP\n\nThis rule uses a machine learning job to detect a substantial spike in successful authentication events. This could indicate post-exploitation activities that aim to test which hosts, services, and other resources the attacker can access with the compromised credentials.\n\n#### Possible investigation steps\n\n- Identify the specifics of the involved assets, such as role, criticality, and associated users.\n- Check if the authentication comes from different sources.\n- Use the historical data available to determine if the same behavior happened in the past.\n- Investigate other alerts associated with the involved users during the past 48 hours.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n\n### False positive analysis\n\n- Understand the context of the authentications by contacting the asset owners. If this activity is related to a new business process or newly implemented (approved) technology, consider adding exceptions — preferably with a combination of user and source conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 104, - "tags": [ - "Use Case: Identity and Access Audit", - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Credential Access", - "Tactic: Defense Evasion", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Build servers and CI systems can sometimes trigger this alert. Security test cycles that include brute force or password spraying activities may trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.002", - "name": "Domain Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/002/" - }, - { - "id": "T1078.003", - "name": "Local Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/003/" - } - ] - } - ] - } - ], - "id": "ac075148-4d41-4733-b4ca-fc29ae520145", - "rule_id": "e26aed74-c816-40d3-a810-48d6fbd8b2fd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "auth_high_count_logon_events_for_a_source_ip" - }, - { - "name": "Windows Subsystem for Linux Enabled via Dism Utility", - "description": "Detects attempts to enable the Windows Subsystem for Linux using Microsoft Dism utility. Adversaries may enable and use WSL for Linux to avoid detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.f-secure.com/hunting-for-windows-subsystem-for-linux/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1202", - "name": "Indirect Command Execution", - "reference": "https://attack.mitre.org/techniques/T1202/" - } - ] - } - ], - "id": "fb4424ec-7845-4699-a4a8-89fb97e96d59", - "rule_id": "e2e0537d-7d8f-4910-a11d-559bcf61295a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type : \"start\" and\n (process.name : \"Dism.exe\" or process.pe.original_file_name == \"DISM.EXE\") and \n process.command_line : \"*Microsoft-Windows-Subsystem-Linux*\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Connection to Commonly Abused Free SSL Certificate Providers", - "description": "Identifies unusual processes connecting to domains using known free SSL certificates. Adversaries may employ a known encryption algorithm to conceal command and control traffic.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1573", - "name": "Encrypted Channel", - "reference": "https://attack.mitre.org/techniques/T1573/" - } - ] - } - ], - "id": "7fcc9a27-bebf-451d-8429-b63c37b481fe", - "rule_id": "e3cf38fa-d5b8-46cc-87f9-4a7513e4281d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "dns.question.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "network where host.os.type == \"windows\" and network.protocol == \"dns\" and\n /* Add new free SSL certificate provider domains here */\n dns.question.name : (\"*letsencrypt.org\", \"*.sslforfree.com\", \"*.zerossl.com\", \"*.freessl.org\") and\n\n /* Native Windows process paths that are unlikely to have network connections to domains secured using free SSL certificates */\n process.executable : (\"C:\\\\Windows\\\\System32\\\\*.exe\",\n \"C:\\\\Windows\\\\System\\\\*.exe\",\n\t \"C:\\\\Windows\\\\SysWOW64\\\\*.exe\",\n\t\t \"C:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\*.exe\",\n\t\t \"C:\\\\Windows\\\\explorer.exe\",\n\t\t \"C:\\\\Windows\\\\notepad.exe\") and\n\n /* Insert noisy false positives here */\n not process.name : (\"svchost.exe\", \"MicrosoftEdge*.exe\", \"msedge.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Service Creation via Local Kerberos Authentication", - "description": "Identifies a suspicious local successful logon event where the Logon Package is Kerberos, the remote address is set to localhost, followed by a sevice creation from the same LogonId. This may indicate an attempt to leverage a Kerberos relay attack variant that can be used to elevate privilege locally from a domain joined user to local System privileges.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Tactic: Credential Access", - "Use Case: Active Directory Monitoring", - "Data Source: Active Directory" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/Dec0ne/KrbRelayUp", - "https://googleprojectzero.blogspot.com/2021/10/using-kerberos-for-authentication-relay.html", - "https://github.com/cube0x0/KrbRelay", - "https://gist.github.com/tyranid/c24cfd1bd141d14d4925043ee7e03c82" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/" - } - ] - } - ], - "id": "aa01f8c7-6957-439a-bdd7-8f9b05779776", - "rule_id": "e4e31051-ee01-4307-a6ee-b21b186958f4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "source.port", - "type": "long", - "ecs": true - }, - { - "name": "winlog.computer_name", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.AuthenticationPackageName", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectLogonId", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.TargetLogonId", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.logon.type", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "sequence by winlog.computer_name with maxspan=5m\n [authentication where\n\n /* event 4624 need to be logged */\n event.action == \"logged-in\" and event.outcome == \"success\" and\n\n /* authenticate locally using relayed kerberos Ticket */\n winlog.event_data.AuthenticationPackageName :\"Kerberos\" and winlog.logon.type == \"Network\" and\n cidrmatch(source.ip, \"127.0.0.0/8\", \"::1\") and source.port > 0] by winlog.event_data.TargetLogonId\n\n [any where\n /* event 4697 need to be logged */\n event.action : \"service-installed\"] by winlog.event_data.SubjectLogonId\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "MFA Disabled for Google Workspace Organization", - "description": "Detects when multi-factor authentication (MFA) is disabled for a Google Workspace organization. An adversary may attempt to modify a password policy in order to weaken an organization’s security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating MFA Disabled for Google Workspace Organization\n\nMulti-factor authentication (MFA) is a process in which users are prompted for an additional form of identification, such as a code on their cell phone or a fingerprint scan, during the sign-in process.\n\nIf you only use a password to authenticate a user, it leaves an insecure vector for attack. If the users's password is weak or has been exposed elsewhere, an attacker could use it to gain access. Requiring a second form of authentication increases security because attackers cannot easily obtain or duplicate the additional authentication factor.\n\nFor more information about using MFA in Google Workspace, access the [official documentation](https://support.google.com/a/answer/175197).\n\nThis rule identifies when MFA enforcement is turned off in Google Workspace. This modification weakens account security and can lead to accounts and other assets being compromised.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- While this activity can be done by administrators, all users must use MFA. The security team should address any potential benign true positive (B-TP), as this configuration can risk the user and domain.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate the multi-factor authentication enforcement.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 205, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Identity and Access Audit", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "MFA settings may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1556", - "name": "Modify Authentication Process", - "reference": "https://attack.mitre.org/techniques/T1556/" - } - ] - } - ], - "id": "d7a3359e-7c56-4b97-8750-11c1135151d2", - "rule_id": "e555105c-ba6d-481f-82bb-9b633e7b4827", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.admin.new_value", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:google_workspace.admin and event.provider:admin and event.category:iam and event.action:(ENFORCE_STRONG_AUTHENTICATION or ALLOW_STRONG_AUTHENTICATION) and google_workspace.admin.new_value:false\n", - "language": "kuery" - }, - { - "name": "Authorization Plugin Modification", - "description": "Authorization plugins are used to extend the authorization services API and implement mechanisms that are not natively supported by the OS, such as multi-factor authentication with third party software. Adversaries may abuse this feature to persist and/or collect clear text credentials as they traverse the registered plugins during user logon.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://developer.apple.com/documentation/security/authorization_plug-ins", - "https://www.xorrior.com/persistent-credential-theft/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.002", - "name": "Authentication Package", - "reference": "https://attack.mitre.org/techniques/T1547/002/" - } - ] - } - ] - } - ], - "id": "62dcf497-4623-445a-b7c0-0faddabc1c7b", - "rule_id": "e6c98d38-633d-4b3e-9387-42112cd5ac10", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:file and host.os.type:macos and not event.type:deletion and\n file.path:(/Library/Security/SecurityAgentPlugins/* and\n not /Library/Security/SecurityAgentPlugins/TeamViewerAuthPlugin.bundle/*) and\n not process.name:shove and process.code_signature.trusted:true\n", - "language": "kuery" - }, - { - "name": "Screensaver Plist File Modified by Unexpected Process", - "description": "Identifies when a screensaver plist file is modified by an unexpected process. An adversary can maintain persistence on a macOS endpoint by creating a malicious screensaver (.saver) file and configuring the screensaver plist file to execute code each time the screensaver is activated.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n- Analyze the plist file modification event to identify whether the change was expected or not\n- Investigate the process that modified the plist file for malicious code or other suspicious behavior\n- Identify if any suspicious or known malicious screensaver (.saver) files were recently written to or modified on the host", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://posts.specterops.io/saving-your-access-d562bf5bf90b", - "https://github.com/D00MFist/PersistentJXA" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/" - } - ] - } - ], - "id": "4d28a6d3-fe85-4b09-b28d-4e3e2a46295e", - "rule_id": "e6e8912f-283f-4d0d-8442-e0dcaf49944b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.exists", - "type": "boolean", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"macos\" and event.type != \"deletion\" and\n file.name: \"com.apple.screensaver.*.plist\" and\n file.path : (\n \"/Users/*/Library/Preferences/ByHost/*\",\n \"/Library/Managed Preferences/*\",\n \"/System/Library/Preferences/*\"\n ) and\n (\n process.code_signature.trusted == false or\n process.code_signature.exists == false or\n\n /* common script interpreters and abused native macOS bins */\n process.name : (\n \"curl\",\n \"mktemp\",\n \"tail\",\n \"funzip\",\n \"python*\",\n \"osascript\",\n \"perl\"\n )\n ) and\n\n /* Filter OS processes modifying screensaver plist files */\n not process.executable : (\n \"/usr/sbin/cfprefsd\",\n \"/usr/libexec/xpcproxy\",\n \"/System/Library/CoreServices/ManagedClient.app/Contents/Resources/MCXCompositor\",\n \"/System/Library/CoreServices/ManagedClient.app/Contents/MacOS/ManagedClient\"\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Default Cobalt Strike Team Server Certificate", - "description": "This rule detects the use of the default Cobalt Strike Team Server TLS certificate. Cobalt Strike is software for Adversary Simulations and Red Team Operations which are security assessments that replicate the tactics and techniques of an advanced adversary in a network. Modifications to the Packetbeat configuration can be made to include MD5 and SHA256 hashing algorithms (the default is SHA1). See the References section for additional information on module configuration.", - "risk_score": 99, - "severity": "critical", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Threat intel\n\nWhile Cobalt Strike is intended to be used for penetration tests and IR training, it is frequently used by actual threat actors (TA) such as APT19, APT29, APT32, APT41, FIN6, DarkHydrus, CopyKittens, Cobalt Group, Leviathan, and many other unnamed criminal TAs. This rule uses high-confidence atomic indicators, so alerts should be investigated rapidly.", - "version": 104, - "tags": [ - "Tactic: Command and Control", - "Threat: Cobalt Strike", - "Use Case: Threat Detection", - "Domain: Endpoint" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://attack.mitre.org/software/S0154/", - "https://www.cobaltstrike.com/help-setup-collaboration", - "https://www.elastic.co/guide/en/beats/packetbeat/current/configuration-tls.html", - "https://www.elastic.co/guide/en/beats/filebeat/7.9/filebeat-module-suricata.html", - "https://www.elastic.co/guide/en/beats/filebeat/7.9/filebeat-module-zeek.html", - "https://www.elastic.co/security-labs/collecting-cobalt-strike-beacons-with-the-elastic-stack" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/", - "subtechnique": [ - { - "id": "T1071.001", - "name": "Web Protocols", - "reference": "https://attack.mitre.org/techniques/T1071/001/" - } - ] - } - ] - } - ], - "id": "9583bdad-28c8-4ec6-b5d4-5f9ddcb97d44", - "rule_id": "e7075e8d-a966-458e-a183-85cd331af255", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "tls.server.hash.md5", - "type": "keyword", - "ecs": true - }, - { - "name": "tls.server.hash.sha1", - "type": "keyword", - "ecs": true - }, - { - "name": "tls.server.hash.sha256", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: network_traffic.tls or event.category: (network or network_traffic))\n and (tls.server.hash.md5:950098276A495286EB2A2556FBAB6D83\n or tls.server.hash.sha1:6ECE5ECE4192683D2D84E25B0BA7E04F9CB7EB7C\n or tls.server.hash.sha256:87F2085C32B6A2CC709B365F55873E207A9CAA10BFFECF2FD16D3CF9D94D390C)\n", - "language": "kuery" - }, - { - "name": "Execution of Persistent Suspicious Program", - "description": "Identifies execution of suspicious persistent programs (scripts, rundll32, etc.) by looking at process lineage and command line usage.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - } - ] - } - ] - } - ], - "id": "7a522371-de92-4417-82f9-40697619285f", - "rule_id": "e7125cea-9fe1-42a5-9a05-b0792cf86f5a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "/* userinit followed by explorer followed by early child process of explorer (unlikely to be launched interactively) within 1m */\nsequence by host.id, user.name with maxspan=1m\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"userinit.exe\" and process.parent.name : \"winlogon.exe\"]\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"explorer.exe\"]\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"explorer.exe\" and\n /* add suspicious programs here */\n process.pe.original_file_name in (\"cscript.exe\",\n \"wscript.exe\",\n \"PowerShell.EXE\",\n \"MSHTA.EXE\",\n \"RUNDLL32.EXE\",\n \"REGSVR32.EXE\",\n \"RegAsm.exe\",\n \"MSBuild.exe\",\n \"InstallUtil.exe\") and\n /* add potential suspicious paths here */\n process.args : (\"C:\\\\Users\\\\*\", \"C:\\\\ProgramData\\\\*\", \"C:\\\\Windows\\\\Temp\\\\*\", \"C:\\\\Windows\\\\Tasks\\\\*\", \"C:\\\\PerfLogs\\\\*\", \"C:\\\\Intel\\\\*\")\n ]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious WMI Event Subscription Created", - "description": "Detects the creation of a WMI Event Subscription. Attackers can abuse this mechanism for persistence or to elevate to SYSTEM privileges.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.blackhat.com/docs/us-15/materials/us-15-Graeber-Abusing-Windows-Management-Instrumentation-WMI-To-Build-A-Persistent%20Asynchronous-And-Fileless-Backdoor-wp.pdf", - "https://medium.com/threatpunter/detecting-removing-wmi-persistence-60ccbb7dff96" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.003", - "name": "Windows Management Instrumentation Event Subscription", - "reference": "https://attack.mitre.org/techniques/T1546/003/" - } - ] - } - ] - } - ], - "id": "6f9d4e57-9934-485b-b731-4a3a7cc21371", - "rule_id": "e72f87d0-a70e-4f8d-8443-a6407bc34643", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.Consumer", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.Operation", - "type": "keyword", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "any where event.dataset == \"windows.sysmon_operational\" and event.code == \"21\" and\n winlog.event_data.Operation : \"Created\" and winlog.event_data.Consumer : (\"*subscription:CommandLineEventConsumer*\", \"*subscription:ActiveScriptEventConsumer*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Host Files System Changes via Windows Subsystem for Linux", - "description": "Detects files creation and modification on the host system from the the Windows Subsystem for Linux. Adversaries may enable and use WSL for Linux to avoid detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/microsoft/WSL" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1202", - "name": "Indirect Command Execution", - "reference": "https://attack.mitre.org/techniques/T1202/" - } - ] - } - ], - "id": "ff59edbe-709d-4f80-a385-be17bc80531d", - "rule_id": "e88d1fe9-b2f4-48d4-bace-a026dc745d4b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id with maxspan=5m\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"dllhost.exe\" and \n /* Plan9FileSystem CLSID - WSL Host File System Worker */\n process.command_line : \"*{DFB65C4C-B34F-435D-AFE9-A86218684AA8}*\"]\n [file where host.os.type == \"windows\" and process.name : \"dllhost.exe\" and not file.path : \"?:\\\\Users\\\\*\\\\Downloads\\\\*\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious System Commands Executed by Previously Unknown Executable", - "description": "This rule monitors for the execution of several commonly used system commands executed by a previously unknown executable located in commonly abused directories. An alert from this rule can indicate the presence of potentially malicious activity, such as the execution of unauthorized or suspicious processes attempting to run malicious code. Detecting and investigating such behavior can help identify and mitigate potential security threats, protecting the system and its data from potential compromise.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "aab50a3a-0f06-4356-8bec-fc9f749c4423", - "rule_id": "e9001ee6-2d00-4d2f-849e-b8b1fb05234c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n", - "type": "new_terms", - "query": "host.os.type:linux and event.category:process and event.action:(exec or exec_event or fork or fork_event) and \nprocess.executable:(\n /bin/* or /usr/bin/* or /usr/share/* or /tmp/* or /var/tmp/* or /dev/shm/* or\n /etc/init.d/* or /etc/rc*.d/* or /etc/crontab or /etc/cron.*/* or /etc/update-motd.d/* or \n /usr/lib/update-notifier/* or /home/*/.* or /boot/* or /srv/* or /run/*) \n and process.args:(whoami or id or hostname or uptime or top or ifconfig or netstat or route or ps or pwd or ls) and \n not process.name:(sudo or which or whoami or id or hostname or uptime or top or netstat or ps or pwd or ls or apt or \n dpkg or yum or rpm or dnf or dockerd or docker or snapd or snap) and\n not process.parent.executable:(/bin/* or /usr/bin/* or /run/k3s/* or /etc/network/* or /opt/Elastic/*)\n", - "new_terms_fields": [ - "host.id", - "user.id", - "process.executable" - ], - "history_window_start": "now-14d", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "Potential LSA Authentication Package Abuse", - "description": "Adversaries can use the autostart mechanism provided by the Local Security Authority (LSA) authentication packages for privilege escalation or persistence by placing a reference to a binary in the Windows registry. The binary will then be executed by SYSTEM when the authentication packages are loaded.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.002", - "name": "Authentication Package", - "reference": "https://attack.mitre.org/techniques/T1547/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.002", - "name": "Authentication Package", - "reference": "https://attack.mitre.org/techniques/T1547/002/" - } - ] - } - ] - } - ], - "id": "7b9dc509-459c-4a9d-83da-2eab80ab6101", - "rule_id": "e9abe69b-1deb-4e19-ac4a-5d5ac00f72eb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\Authentication Packages\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Lsa\\\\Authentication Packages\"\n ) and\n /* exclude SYSTEM SID - look for changes by non-SYSTEM user */\n not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Spike in Firewall Denies", - "description": "A machine learning job detected an unusually large spike in network traffic that was denied by network access control lists (ACLs) or firewall rules. Such a burst of denied traffic is usually caused by either 1) a mis-configured application or firewall or 2) suspicious or malicious activity. Unsuccessful attempts at network transit, in order to connect to command-and-control (C2), or engage in data exfiltration, may produce a burst of failed connections. This could also be due to unusually large amounts of reconnaissance or enumeration traffic. Denial-of-service attacks or traffic floods may also produce such a surge in traffic.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: ML", - "Rule Type: Machine Learning" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A misconfgured network application or firewall may trigger this alert. Security scans or test cycles may trigger this alert." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html" - ], - "max_signals": 100, - "threat": [], - "id": "12946dde-31a2-4920-afd6-45bf525f42e5", - "rule_id": "eaa77d63-9679-4ce3-be25-3ba8b795e5fa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [], - "setup": "", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "high_count_network_denies" - }, - { - "name": "Mimikatz Memssp Log File Detected", - "description": "Identifies the password log file from the default Mimikatz memssp module.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Mimikatz Memssp Log File Detected\n\n[Mimikatz](https://github.com/gentilkiwi/mimikatz) is an open-source tool used to collect, decrypt, and/or use cached credentials. This tool is commonly abused by adversaries during the post-compromise stage where adversaries have gained an initial foothold on an endpoint and are looking to elevate privileges and seek out additional authentication objects such as tokens/hashes/credentials that can then be used to laterally move and pivot across a network.\n\nThis rule looks for the creation of a file named `mimilsa.log`, which is generated when using the Mimikatz misc::memssp module, which injects a malicious Windows SSP to collect locally authenticated credentials, which includes the computer account password, running service credentials, and any accounts that logon.\n\n#### Possible investigation steps\n\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (e.g., 4624) to the target host.\n- Retrieve and inspect the log file contents.\n- Search for DLL files created in the same location as the log file, and retrieve unsigned DLLs.\n - Use the PowerShell Get-FileHash cmdlet to get the SHA-256 hash value of these files.\n - Search for the existence of these files in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n - Identify the process that created the DLL using file creation events.\n\n### False positive analysis\n\n- This file name `mimilsa.log` should not legitimately be created.\n\n### Related rules\n\n- Mimikatz Powershell Module Activity - ac96ceb8-4399-4191-af1d-4feeac1f1f46\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- If the host is a Domain Controller (DC):\n - Activate your incident response plan for total Active Directory compromise.\n - Review the privileges assigned to users that can access the DCs to ensure that the least privilege principle is being followed and reduce the attack surface.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Reboot the host to remove the injected SSP from memory.\n- Reimage the host operating system or restore compromised files to clean versions.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - } - ] - } - ], - "id": "285a7068-6b0d-40e3-a1f1-49425ae4ad54", - "rule_id": "ebb200e8-adf0-43f8-a0bb-4ee5b5d852c6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and file.name : \"mimilsa.log\" and process.name : \"lsass.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "IIS HTTP Logging Disabled", - "description": "Identifies when Internet Information Services (IIS) HTTP Logging is disabled on a server. An attacker with IIS server access via a webshell or other mechanism can disable HTTP Logging as an effective anti-forensics measure.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating IIS HTTP Logging Disabled\n\nIIS (Internet Information Services) is a Microsoft web server software used to host websites and web applications on Windows. It provides features for serving dynamic and static content, and can be managed through a graphical interface or command-line tools.\n\nIIS logging is a data source that can be used for security monitoring, forensics, and incident response. It contains mainly information related to requests done to the web server, and can be used to spot malicious activities like webshells. Adversaries can tamper, clear, and delete this data to evade detection, cover their tracks, and slow down incident response.\n\nThis rule monitors commands that disable IIS logging.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Verify if any other anti-forensics behaviors were observed.\n- Verify whether the logs stored in the `C:\\inetpub\\logs\\logfiles\\w3svc1` directory were deleted after this action.\n- Check if this operation is done under change management and approved according to the organization's policy.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Re-enable affected logging components, services, and security monitoring.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Resources: Investigation Guide", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 33, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.002", - "name": "Disable Windows Event Logging", - "reference": "https://attack.mitre.org/techniques/T1562/002/" - } - ] - } - ] - } - ], - "id": "a2b47599-6ccf-4de0-8340-2b45a7cd7444", - "rule_id": "ebf1adea-ccf2-4943-8b96-7ab11ca173a5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"appcmd.exe\" or process.pe.original_file_name == \"appcmd.exe\") and\n process.args : \"/dontLog*:*True\" and\n not process.parent.name : \"iissetup.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Process Execution from an Unusual Directory", - "description": "Identifies process execution from suspicious default Windows directories. This is sometimes done by adversaries to hide malware in trusted paths.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - } - ], - "id": "f9e7eaea-eb28-4e24-91c7-8f6fb50dc873", - "rule_id": "ebfe1448-7fac-4d59-acea-181bd89b1f7f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n /* add suspicious execution paths here */\nprocess.executable : (\"C:\\\\PerfLogs\\\\*.exe\",\"C:\\\\Users\\\\Public\\\\*.exe\",\"C:\\\\Windows\\\\Tasks\\\\*.exe\",\"C:\\\\Intel\\\\*.exe\",\"C:\\\\AMD\\\\Temp\\\\*.exe\",\"C:\\\\Windows\\\\AppReadiness\\\\*.exe\",\n\"C:\\\\Windows\\\\ServiceState\\\\*.exe\",\"C:\\\\Windows\\\\security\\\\*.exe\",\"C:\\\\Windows\\\\IdentityCRL\\\\*.exe\",\"C:\\\\Windows\\\\Branding\\\\*.exe\",\"C:\\\\Windows\\\\csc\\\\*.exe\",\n \"C:\\\\Windows\\\\DigitalLocker\\\\*.exe\",\"C:\\\\Windows\\\\en-US\\\\*.exe\",\"C:\\\\Windows\\\\wlansvc\\\\*.exe\",\"C:\\\\Windows\\\\Prefetch\\\\*.exe\",\"C:\\\\Windows\\\\Fonts\\\\*.exe\",\n \"C:\\\\Windows\\\\diagnostics\\\\*.exe\",\"C:\\\\Windows\\\\TAPI\\\\*.exe\",\"C:\\\\Windows\\\\INF\\\\*.exe\",\"C:\\\\Windows\\\\System32\\\\Speech\\\\*.exe\",\"C:\\\\windows\\\\tracing\\\\*.exe\",\n \"c:\\\\windows\\\\IME\\\\*.exe\",\"c:\\\\Windows\\\\Performance\\\\*.exe\",\"c:\\\\windows\\\\intel\\\\*.exe\",\"c:\\\\windows\\\\ms\\\\*.exe\",\"C:\\\\Windows\\\\dot3svc\\\\*.exe\",\n \"C:\\\\Windows\\\\panther\\\\*.exe\",\"C:\\\\Windows\\\\RemotePackages\\\\*.exe\",\"C:\\\\Windows\\\\OCR\\\\*.exe\",\"C:\\\\Windows\\\\appcompat\\\\*.exe\",\"C:\\\\Windows\\\\apppatch\\\\*.exe\",\"C:\\\\Windows\\\\addins\\\\*.exe\",\n \"C:\\\\Windows\\\\Setup\\\\*.exe\",\"C:\\\\Windows\\\\Help\\\\*.exe\",\"C:\\\\Windows\\\\SKB\\\\*.exe\",\"C:\\\\Windows\\\\Vss\\\\*.exe\",\"C:\\\\Windows\\\\Web\\\\*.exe\",\"C:\\\\Windows\\\\servicing\\\\*.exe\",\"C:\\\\Windows\\\\CbsTemp\\\\*.exe\",\n \"C:\\\\Windows\\\\Logs\\\\*.exe\",\"C:\\\\Windows\\\\WaaS\\\\*.exe\",\"C:\\\\Windows\\\\ShellExperiences\\\\*.exe\",\"C:\\\\Windows\\\\ShellComponents\\\\*.exe\",\"C:\\\\Windows\\\\PLA\\\\*.exe\",\n \"C:\\\\Windows\\\\Migration\\\\*.exe\",\"C:\\\\Windows\\\\debug\\\\*.exe\",\"C:\\\\Windows\\\\Cursors\\\\*.exe\",\"C:\\\\Windows\\\\Containers\\\\*.exe\",\"C:\\\\Windows\\\\Boot\\\\*.exe\",\"C:\\\\Windows\\\\bcastdvr\\\\*.exe\",\n \"C:\\\\Windows\\\\assembly\\\\*.exe\",\"C:\\\\Windows\\\\TextInput\\\\*.exe\",\"C:\\\\Windows\\\\security\\\\*.exe\",\"C:\\\\Windows\\\\schemas\\\\*.exe\",\"C:\\\\Windows\\\\SchCache\\\\*.exe\",\"C:\\\\Windows\\\\Resources\\\\*.exe\",\n \"C:\\\\Windows\\\\rescache\\\\*.exe\",\"C:\\\\Windows\\\\Provisioning\\\\*.exe\",\"C:\\\\Windows\\\\PrintDialog\\\\*.exe\",\"C:\\\\Windows\\\\PolicyDefinitions\\\\*.exe\",\"C:\\\\Windows\\\\media\\\\*.exe\",\n \"C:\\\\Windows\\\\Globalization\\\\*.exe\",\"C:\\\\Windows\\\\L2Schemas\\\\*.exe\",\"C:\\\\Windows\\\\LiveKernelReports\\\\*.exe\",\"C:\\\\Windows\\\\ModemLogs\\\\*.exe\",\"C:\\\\Windows\\\\ImmersiveControlPanel\\\\*.exe\") and\n not process.name : (\"SpeechUXWiz.exe\",\"SystemSettings.exe\",\"TrustedInstaller.exe\",\"PrintDialog.exe\",\"MpSigStub.exe\",\"LMS.exe\",\"mpam-*.exe\") and\n not process.executable :\n (\"?:\\\\Intel\\\\Wireless\\\\WUSetupLauncher.exe\",\n \"?:\\\\Intel\\\\Wireless\\\\Setup.exe\",\n \"?:\\\\Intel\\\\Move Mouse.exe\",\n \"?:\\\\windows\\\\Panther\\\\DiagTrackRunner.exe\",\n \"?:\\\\Windows\\\\servicing\\\\GC64\\\\tzupd.exe\",\n \"?:\\\\Users\\\\Public\\\\res\\\\RemoteLite.exe\",\n \"?:\\\\Users\\\\Public\\\\IBM\\\\ClientSolutions\\\\*.exe\",\n \"?:\\\\Users\\\\Public\\\\Documents\\\\syspin.exe\",\n \"?:\\\\Users\\\\Public\\\\res\\\\FileWatcher.exe\")\n /* uncomment once in winlogbeat */\n /* and not (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true) */\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Unusual Print Spooler Child Process", - "description": "Detects unusual Print Spooler service (spoolsv.exe) child processes. This may indicate an attempt to exploit privilege escalation vulnerabilities related to the Printing Service on Windows.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Install or update of a legitimate printing driver. Verify the printer driver file metadata such as manufacturer and signature information." - ], - "references": [ - "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "54e17122-d9a1-4cb8-b934-f6588b75ab4a", - "rule_id": "ee5300a7-7e31-4a72-a258-250abb8b3aa1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.token.integrity_level_name", - "type": "unknown", - "ecs": false - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.IntegrityLevel", - "type": "keyword", - "ecs": false - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : \"spoolsv.exe\" and\n (?process.Ext.token.integrity_level_name : \"System\" or\n ?winlog.event_data.IntegrityLevel : \"System\") and\n\n /* exclusions for FP control below */\n not process.name : (\"splwow64.exe\", \"PDFCreator.exe\", \"acrodist.exe\", \"spoolsv.exe\", \"msiexec.exe\", \"route.exe\", \"WerFault.exe\") and\n not process.command_line : \"*\\\\WINDOWS\\\\system32\\\\spool\\\\DRIVERS*\" and\n not (process.name : \"net.exe\" and process.command_line : (\"*stop*\", \"*start*\")) and\n not (process.name : (\"cmd.exe\", \"powershell.exe\") and process.command_line : (\"*.spl*\", \"*\\\\program files*\", \"*route add*\")) and\n not (process.name : \"netsh.exe\" and process.command_line : (\"*add portopening*\", \"*rule name*\")) and\n not (process.name : \"regsvr32.exe\" and process.command_line : \"*PrintConfig.dll*\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*" - ] - }, - { - "name": "Potential Privacy Control Bypass via TCCDB Modification", - "description": "Identifies the use of sqlite3 to directly modify the Transparency, Consent, and Control (TCC) SQLite database. This may indicate an attempt to bypass macOS privacy controls, including access to sensitive resources like the system camera, microphone, address book, and calendar.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://applehelpwriter.com/2016/08/29/discovering-how-dropbox-hacks-your-mac/", - "https://github.com/bp88/JSS-Scripts/blob/master/TCC.db%20Modifier.sh", - "https://medium.com/@mattshockl/cve-2020-9934-bypassing-the-os-x-transparency-consent-and-control-tcc-framework-for-4e14806f1de8" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "8760ccd7-58ab-456b-8c73-c93aa9a23875", - "rule_id": "eea82229-b002-470e-a9e1-00be38b14d32", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name : \"sqlite*\" and\n process.args : \"/*/Application Support/com.apple.TCC/TCC.db\" and\n not process.parent.executable : \"/Library/Bitdefender/AVP/product/bin/*\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Whoami Process Activity", - "description": "Identifies suspicious use of whoami.exe which displays user, group, and privileges information for the user who is currently logged on to the local system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Whoami Process Activity\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.\n\nThis rule looks for the execution of the `whoami` utility. Attackers commonly use this utility to measure their current privileges, discover the current user, determine if a privilege escalation was successful, etc.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.\n\n### Related rules\n\n- Account Discovery Command via SYSTEM Account - 2856446a-34e6-435b-9fb5-f8f040bfa7ed\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 107, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Some normal use of this program, at varying levels of frequency, may originate from scripts, automation tools and frameworks. Usage by non-engineers and ordinary users is unusual." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1033", - "name": "System Owner/User Discovery", - "reference": "https://attack.mitre.org/techniques/T1033/" - } - ] - } - ], - "id": "34fb6a7f-db75-4174-930f-ec5cefe20d47", - "rule_id": "ef862985-3f13-4262-a686-5f357bbb9bc2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"whoami.exe\" and\n(\n\n (/* scoped for whoami execution under system privileges */\n (user.domain : (\"NT AUTHORITY\", \"NT-AUTORITÄT\", \"AUTORITE NT\", \"IIS APPPOOL\") or user.id : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\")) and\n\n not (process.parent.name : \"cmd.exe\" and\n process.parent.args : (\"chcp 437>nul 2>&1 & C:\\\\WINDOWS\\\\System32\\\\whoami.exe /groups\",\n \"chcp 437>nul 2>&1 & %systemroot%\\\\system32\\\\whoami /user\",\n \"C:\\\\WINDOWS\\\\System32\\\\whoami.exe /groups\",\n \"*WINDOWS\\\\system32\\\\config\\\\systemprofile*\")) and\n not (process.parent.executable : \"C:\\\\Windows\\\\system32\\\\inetsrv\\\\appcmd.exe\" and process.parent.args : \"LIST\") and\n not process.parent.executable : (\"C:\\\\Program Files\\\\Microsoft Monitoring Agent\\\\Agent\\\\MonitoringHost.exe\",\n \"C:\\\\Program Files\\\\Cohesity\\\\cohesity_windows_agent_service.exe\")) or\n\n process.parent.name : (\"wsmprovhost.exe\", \"w3wp.exe\", \"wmiprvse.exe\", \"rundll32.exe\", \"regsvr32.exe\")\n\n)\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "logs-system.*", - "endgame-*" - ] - }, - { - "name": "Unusual Child Processes of RunDLL32", - "description": "Identifies child processes of unusual instances of RunDLL32 where the command line parameters were suspicious. Misuse of RunDLL32 could indicate malicious activity.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "30m", - "from": "now-60m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.011", - "name": "Rundll32", - "reference": "https://attack.mitre.org/techniques/T1218/011/" - } - ] - } - ] - } - ], - "id": "6efc7e57-9f53-4fe0-87f8-8a7ba01cf764", - "rule_id": "f036953a-4615-4707-a1ca-dc53bf69dcd5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=1h\n [process where host.os.type == \"windows\" and event.type == \"start\" and\n (process.name : \"rundll32.exe\" or process.pe.original_file_name == \"RUNDLL32.EXE\") and\n process.args_count == 1\n ] by process.entity_id\n [process where host.os.type == \"windows\" and event.type == \"start\" and process.parent.name : \"rundll32.exe\"\n ] by process.parent.entity_id\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Suspicious HTML File Creation", - "description": "Identifies the execution of a browser process to open an HTML file with high entropy and size. Adversaries may smuggle data and files past content filters by hiding malicious payloads inside of seemingly benign HTML files.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - }, - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1027", - "name": "Obfuscated Files or Information", - "reference": "https://attack.mitre.org/techniques/T1027/", - "subtechnique": [ - { - "id": "T1027.006", - "name": "HTML Smuggling", - "reference": "https://attack.mitre.org/techniques/T1027/006/" - } - ] - } - ] - } - ], - "id": "b08adbb3-6fe7-4a88-b0cb-2b27fd0b66c3", - "rule_id": "f0493cb4-9b15-43a9-9359-68c23a7f2cf3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.entropy", - "type": "unknown", - "ecs": false - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "file.size", - "type": "long", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "sequence by user.id with maxspan=5m\n [file where host.os.type == \"windows\" and event.action in (\"creation\", \"rename\") and\n file.extension : (\"htm\", \"html\") and\n file.path : (\"?:\\\\Users\\\\*\\\\Downloads\\\\*\",\n \"?:\\\\Users\\\\*\\\\Content.Outlook\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\Temp?_*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\7z*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\Rar$*\") and\n ((file.Ext.entropy >= 5 and file.size >= 150000) or file.size >= 1000000)]\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n (\n (process.name in (\"chrome.exe\", \"msedge.exe\", \"brave.exe\", \"whale.exe\", \"browser.exe\", \"dragon.exe\", \"vivaldi.exe\", \"opera.exe\")\n and process.args == \"--single-argument\") or\n (process.name == \"iexplore.exe\" and process.args_count == 2) or\n (process.name in (\"firefox.exe\", \"waterfox.exe\") and process.args == \"-url\")\n )\n and process.args : (\"?:\\\\Users\\\\*\\\\Downloads\\\\*.htm*\",\n \"?:\\\\Users\\\\*\\\\Content.Outlook\\\\*.htm*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\Temp?_*.htm*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\7z*.htm*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\Rar$*.htm*\")]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Attempt to Remove File Quarantine Attribute", - "description": "Identifies a potential Gatekeeper bypass. In macOS, when applications or programs are downloaded from the internet, there is a quarantine flag set on the file. This attribute is read by Apple's Gatekeeper defense program at execution time. An adversary may disable this attribute to evade defenses.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.trendmicro.com/en_us/research/20/k/new-macos-backdoor-connected-to-oceanlotus-surfaces.html", - "https://ss64.com/osx/xattr.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "cb499ef5-5531-4ba5-b4fd-7c8e9921f615", - "rule_id": "f0b48bbc-549e-4bcf-8ee0-a7a72586c6a7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and\n process.name : \"xattr\" and\n (\n (process.args : \"com.apple.quarantine\" and process.args : (\"-d\", \"-w\")) or\n (process.args : \"-c\") or\n (process.command_line : (\"/bin/bash -c xattr -c *\", \"/bin/zsh -c xattr -c *\", \"/bin/sh -c xattr -c *\"))\n ) and not process.args_count > 12\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Execution with Explicit Credentials via Scripting", - "description": "Identifies execution of the security_authtrampoline process via a scripting interpreter. This occurs when programs use AuthorizationExecute-WithPrivileges from the Security.framework to run another program with root privileges. It should not be run by itself, as this is a sign of execution with explicit logon credentials.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://objectivebythesea.com/v2/talks/OBTS_v2_Thomas.pdf", - "https://www.manpagez.com/man/8/security_authtrampoline/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - }, - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.004", - "name": "Elevated Execution with Prompt", - "reference": "https://attack.mitre.org/techniques/T1548/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "baff8a0a-bd8d-4687-977c-30b1f1908bc2", - "rule_id": "f0eb70e9-71e9-40cd-813f-bf8e8c812cb1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:\"security_authtrampoline\" and\n process.parent.name:(osascript or com.apple.automator.runner or sh or bash or dash or zsh or python* or Python or perl* or php* or ruby or pwsh)\n", - "language": "kuery" - }, - { - "name": "Creation of Hidden Login Item via Apple Script", - "description": "Identifies the execution of osascript to create a hidden login item. This may indicate an attempt to persist a malicious program while concealing its presence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.002", - "name": "AppleScript", - "reference": "https://attack.mitre.org/techniques/T1059/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1647", - "name": "Plist File Modification", - "reference": "https://attack.mitre.org/techniques/T1647/" - } - ] - } - ], - "id": "a95f1f25-79b1-4799-97fb-7cb84d1192ac", - "rule_id": "f24bcae1-8980-4b30-b5dd-f851b055c9e7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"macos\" and event.type in (\"start\", \"process_started\") and process.name : \"osascript\" and\n process.command_line : \"osascript*login item*hidden:true*\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "SIP Provider Modification", - "description": "Identifies modifications to the registered Subject Interface Package (SIP) providers. SIP providers are used by the Windows cryptographic system to validate file signatures on the system. This may be an attempt to bypass signature validation checks or inject code into critical processes.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/mattifestation/PoCSubjectInterfacePackage" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1553", - "name": "Subvert Trust Controls", - "reference": "https://attack.mitre.org/techniques/T1553/", - "subtechnique": [ - { - "id": "T1553.003", - "name": "SIP and Trust Provider Hijacking", - "reference": "https://attack.mitre.org/techniques/T1553/003/" - } - ] - } - ] - } - ], - "id": "0a30e16e-e7ea-4859-b517-730551156bf1", - "rule_id": "f2c7b914-eda3-40c2-96ac-d23ef91776ca", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type:\"change\" and\n registry.path: (\n \"*\\\\SOFTWARE\\\\Microsoft\\\\Cryptography\\\\OID\\\\EncodingType 0\\\\CryptSIPDllPutSignedDataMsg\\\\{*}\\\\Dll\",\n \"*\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Cryptography\\\\OID\\\\EncodingType 0\\\\CryptSIPDllPutSignedDataMsg\\\\{*}\\\\Dll\",\n \"*\\\\SOFTWARE\\\\Microsoft\\\\Cryptography\\\\Providers\\\\Trust\\\\FinalPolicy\\\\{*}\\\\$Dll\",\n \"*\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Cryptography\\\\Providers\\\\Trust\\\\FinalPolicy\\\\{*}\\\\$Dll\"\n ) and\n registry.data.strings:\"*.dll\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Google Workspace Object Copied from External Drive and Access Granted to Custom Application", - "description": "Detects when a user copies a Google spreadsheet, form, document or script from an external drive. Sequence logic has been added to also detect when a user grants a custom Google application permission via OAuth shortly after. An adversary may send a phishing email to the victim with a Drive object link where \"copy\" is included in the URI, thus copying the object to the victim's drive. If a container-bound script exists within the object, execution will require permission access via OAuth in which the user has to accept.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace Resource Copied from External Drive and Access Granted to Custom Application\n\nGoogle Workspace users can share access to Drive objects such as documents, sheets, and forms via email delivery or a shared link. Shared link URIs have parameters like `view` or `edit` to indicate the recipient's permissions. The `copy` parameter allows the recipient to copy the object to their own Drive, which grants the object with the same privileges as the recipient. Specific objects in Google Drive allow container-bound scripts that run on Google's Apps Script platform. Container-bound scripts can contain malicious code that executes with the recipient's privileges if in their Drive.\n\nThis rule aims to detect when a user copies an external Drive object to their Drive storage and then grants permissions to a custom application via OAuth prompt.\n\n#### Possible investigation steps\n- Identify user account(s) associated by reviewing `user.name` or `source.user.email` in the alert.\n- Identify the name of the file copied by reviewing `file.name` as well as the `file.id` for triaging.\n- Identify the file type by reviewing `google_workspace.drive.file.type`.\n- With the information gathered so far, query across data for the file metadata to determine if this activity is isolated or widespread.\n- Within the OAuth token event, identify the application name by reviewing `google_workspace.token.app_name`.\n - Review the application ID as well from `google_workspace.token.client.id`.\n - This metadata can be used to report the malicious application to Google for permanent blacklisting.\n- Identify the permissions granted to the application by the user by reviewing `google_workspace.token.scope.data.scope_name`.\n - This information will help pivot and triage into what services may have been affected.\n- If a container-bound script was attached to the copied object, it will also exist in the user's drive.\n - This object should be removed from all users affected and investigated for a better understanding of the malicious code.\n\n### False positive analysis\n- Communicate with the affected user to identify if these actions were intentional\n- If a container-bound script exists, review code to identify if it is benign or malicious\n\n### Response and remediation\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n - Resetting passwords will revoke OAuth tokens which could have been stolen.\n- Reactivate multi-factor authentication for the user.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security defaults [provided by Google](https://cloud.google.com/security-command-center/docs/how-to-investigate-threats).\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n## Setup\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 3, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Tactic: Initial Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Google Workspace users typically share Drive resources with a shareable link where parameters are edited to indicate when it is viewable or editable by the intended recipient. It is uncommon for a user in an organization to manually copy a Drive object from an external drive to their corporate drive. This may happen where users find a useful spreadsheet in a public drive, for example, and replicate it to their Drive. It is uncommon for the copied object to execute a container-bound script either unless the user was intentionally aware, suggesting the object uses container-bound scripts to accomplish a legitimate task." - ], - "references": [ - "https://www.elastic.co/security-labs/google-workspace-attack-surface-part-one", - "https://developers.google.com/apps-script/guides/bound", - "https://support.google.com/a/users/answer/13004165#share_make_a_copy_links" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - } - ], - "id": "f3909ba7-71f9-4eb6-b505-c067b5850758", - "rule_id": "f33e68a4-bd19-11ed-b02f-f661ea17fbcc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.drive.copy_type", - "type": "unknown", - "ecs": false - }, - { - "name": "google_workspace.drive.file.type", - "type": "unknown", - "ecs": false - }, - { - "name": "google_workspace.drive.owner_is_team_drive", - "type": "unknown", - "ecs": false - }, - { - "name": "google_workspace.token.client.id", - "type": "unknown", - "ecs": false - }, - { - "name": "source.user.email", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "eql", - "query": "sequence by source.user.email with maxspan=3m\n[file where event.dataset == \"google_workspace.drive\" and event.action == \"copy\" and\n\n /* Should only match if the object lives in a Drive that is external to the user's GWS organization */\n google_workspace.drive.owner_is_team_drive == \"false\" and google_workspace.drive.copy_type == \"external\" and\n\n /* Google Script, Forms, Sheets and Document can have container-bound scripts */\n google_workspace.drive.file.type: (\"script\", \"form\", \"spreadsheet\", \"document\")]\n\n[any where event.dataset == \"google_workspace.token\" and event.action == \"authorize\" and\n\n /* Ensures application ID references custom app in Google Workspace and not GCP */\n google_workspace.token.client.id : \"*apps.googleusercontent.com\"]\n", - "language": "eql", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ] - }, - { - "name": "Sudo Heap-Based Buffer Overflow Attempt", - "description": "Identifies the attempted use of a heap-based buffer overflow vulnerability for the Sudo binary in Unix-like systems (CVE-2021-3156). Successful exploitation allows an unprivileged user to escalate to the root user.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "This rule could generate false positives if the process arguments leveraged by the exploit are shared by custom scripts using the Sudo or Sudoedit binaries. Only Sudo versions 1.8.2 through 1.8.31p2 and 1.9.0 through 1.9.5p1 are affected; if those versions are not present on the endpoint, this could be a false positive." - ], - "references": [ - "https://cve.mitre.org/cgi-bin/cvename.cgi?name=2021-3156", - "https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit", - "https://www.bleepingcomputer.com/news/security/latest-macos-big-sur-also-has-sudo-root-privilege-escalation-flaw", - "https://www.sudo.ws/alerts/unescape_overflow.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "bedf595e-f271-49ca-a286-73ab0f7d3ef1", - "rule_id": "f37f3054-d40b-49ac-aa9b-a786c74c58b8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "event.category:process and event.type:start and\n process.name:(sudo or sudoedit) and\n process.args:(*\\\\ and (\"-i\" or \"-s\"))\n", - "threshold": { - "field": [ - "host.hostname" - ], - "value": 100 - }, - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "Threat Intel URL Indicator Match", - "description": "This rule is triggered when a URL indicator from the Threat Intel Filebeat module or integrations has a match against an event that contains URL data, like DNS events, network logs, etc.", - "risk_score": 99, - "severity": "critical", - "timeline_id": "495ad7a7-316e-4544-8a0f-9c098daee76e", - "timeline_title": "Generic Threat Match Timeline", - "license": "Elastic License v2", - "note": "## Triage and Analysis\n\n### Investigating Threat Intel URL Indicator Match\n\nThreat Intel indicator match rules allow matching from a local observation, such as an endpoint event that records a file hash with an entry of a file hash stored within the Threat Intel integrations index. \n\nMatches are based on threat intelligence data that's been ingested during the last 30 days. Some integrations don't place expiration dates on their threat indicators, so we strongly recommend validating ingested threat indicators and reviewing match results. When reviewing match results, check associated activity to determine whether the event requires additional investigation.\n\nThis rule is triggered when a URL indicator from the Threat Intel Filebeat module or a threat intelligence integration matches against an event that contains URL data, like DNS events, network logs, etc.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the URL, which can be found in the `threat.indicator.matched.atomic` field:\n - Identify the type of malicious activity related to the URL (phishing, malware, etc.).\n - Check the reputation of the IP address in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc. \n - Execute a WHOIS lookup to retrieve information about the domain registration and contacts to report abuse.\n - If dealing with a phishing incident:\n - Contact the user to gain more information around the delivery method, information sent, etc.\n - Analyze whether the URL is trying to impersonate a legitimate address. Look for typosquatting, extra or unusual subdomains, or other anomalies that could lure the user.\n - Investigate the phishing page to identify which information may have been sent to the attacker by the user.\n- Identify the process responsible for the connection, and investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Retrieve the involved process executable and examine the host for derived artifacts that indicate suspicious activities:\n - Analyze the process executable using a private sandboxed analysis system.\n - Observe and collect information about the following activities in both the sandbox and the alert subject host:\n - Attempts to contact external domains and addresses.\n - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.\n - Examine the DNS cache for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.\n - Examine the host services for suspicious or anomalous entries.\n - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Using the data collected through the analysis, scope users targeted and other machines infected in the environment.\n\n### False Positive Analysis\n\n- False positives might occur after large and publicly written campaigns if curious employees interact with attacker infrastructure.\n- Some feeds may include internal or known benign addresses by mistake (e.g., 8.8.8.8, google.com, 127.0.0.1, etc.). Make sure you understand how blocking a specific domain or address might impact the organization or normal system functioning.\n\n### Response and Remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Consider reporting the address for abuse using the provided contact information.\n- Remove and block malicious artifacts identified during triage.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\nThis rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an [Elastic Agent integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#agent-ti-integration), the [Threat Intel module](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#ti-mod-integration), or a [custom integration](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html#custom-ti-integration).\n\nMore information can be found [here](https://www.elastic.co/guide/en/security/current/es-threat-intel-integrations.html).", - "version": 3, - "tags": [ - "OS: Windows", - "Data Source: Elastic Endgame", - "Rule Type: Indicator Match" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "1h", - "from": "now-65m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-threatintel.html", - "https://www.elastic.co/guide/en/security/master/es-threat-intel-integrations.html", - "https://www.elastic.co/security/tip" - ], - "max_signals": 100, - "threat": [], - "id": "cf3244fb-36a4-4644-8827-4b9b1af89f4e", - "rule_id": "f3e22c8b-ea47-45d1-b502-b57b6de950b3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "url.full", - "type": "wildcard", - "ecs": true - } - ], - "setup": "This rule needs threat intelligence indicators to work. Threat intelligence indicators can be collected using an Elastic Agent integration, the Threat Intel module, or a custom integration.\n\nMore information can be found here.", - "type": "threat_match", - "query": "url.full:*\n", - "threat_query": "@timestamp >= \"now-30d/d\" and event.module:(threatintel or ti_*) and threat.indicator.url.full:* and not labels.is_ioc_transform_source:\"true\"", - "threat_mapping": [ - { - "entries": [ - { - "field": "url.full", - "type": "mapping", - "value": "threat.indicator.url.full" - } - ] - }, - { - "entries": [ - { - "field": "url.original", - "type": "mapping", - "value": "threat.indicator.url.original" - } - ] - } - ], - "threat_index": [ - "filebeat-*", - "logs-ti_*" - ], - "index": [ - "auditbeat-*", - "endgame-*", - "filebeat-*", - "logs-*", - "packetbeat-*", - "winlogbeat-*" - ], - "threat_filters": [ - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.category", - "negate": false, - "params": { - "query": "threat" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.category": "threat" - } - } - }, - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.kind", - "negate": false, - "params": { - "query": "enrichment" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.kind": "enrichment" - } - } - }, - { - "$state": { - "store": "appState" - }, - "meta": { - "disabled": false, - "key": "event.type", - "negate": false, - "params": { - "query": "indicator" - }, - "type": "phrase" - }, - "query": { - "match_phrase": { - "event.type": "indicator" - } - } - } - ], - "threat_indicator_path": "threat.indicator", - "threat_language": "kuery", - "language": "kuery" - }, - { - "name": "Suspicious Data Encryption via OpenSSL Utility", - "description": "Identifies when the openssl command-line utility is used to encrypt multiple files on a host within a short time window. Adversaries may encrypt data on a single or multiple systems in order to disrupt the availability of their target's data and may attempt to hold the organization's data to ransom for the purposes of extortion.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Impact", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.welivesecurity.com/2017/06/30/telebots-back-supply-chain-attacks-against-ukraine/", - "https://www.trendmicro.com/en_us/research/21/f/bash-ransomware-darkradiation-targets-red-hat--and-debian-based-linux-distributions.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1486", - "name": "Data Encrypted for Impact", - "reference": "https://attack.mitre.org/techniques/T1486/" - } - ] - } - ], - "id": "a6192027-bf10-4657-8c06-3007a7257a61", - "rule_id": "f530ca17-153b-4a7a-8cd3-98dd4b4ddf73", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, user.name, process.parent.entity_id with maxspan=5s\n [ process where host.os.type == \"linux\" and event.action == \"exec\" and \n process.name == \"openssl\" and process.parent.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\", \"perl*\", \"php*\", \"python*\", \"xargs\") and\n process.args == \"-in\" and process.args == \"-out\" and\n process.args in (\"-k\", \"-K\", \"-kfile\", \"-pass\", \"-iv\", \"-md\") and\n /* excluding base64 encoding options and including encryption password or key params */\n not process.args in (\"-d\", \"-a\", \"-A\", \"-base64\", \"-none\", \"-nosalt\") ] with runs=10\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Masquerading Space After Filename", - "description": "This rules identifies a process created from an executable with a space appended to the end of the filename. This may indicate an attempt to masquerade a malicious file as benign to gain user execution. When a space is added to the end of certain files, the OS will execute the file according to it's true filetype instead of it's extension. Adversaries can hide a program's true filetype by changing the extension of the file. They can then add a space to the end of the name so that the OS automatically executes the file when it's double-clicked.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.picussecurity.com/resource/blog/picus-10-critical-mitre-attck-techniques-t1036-masquerading" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.006", - "name": "Space after Filename", - "reference": "https://attack.mitre.org/techniques/T1036/006/" - } - ] - } - ] - } - ], - "id": "2a02c12b-b641-4f14-a388-8acc1434f9d0", - "rule_id": "f5fb4598-4f10-11ed-bdc3-0242ac120002", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type:(\"linux\",\"macos\") and\n event.type == \"start\" and\n (process.executable regex~ \"\"\"/[a-z0-9\\s_\\-\\\\./]+\\s\"\"\") and not\n process.name in (\"ls\", \"find\", \"grep\", \"xkbcomp\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "SoftwareUpdate Preferences Modification", - "description": "Identifies changes to the SoftwareUpdate preferences using the built-in defaults command. Adversaries may abuse this in an attempt to disable security updates.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Authorized SoftwareUpdate Settings Changes" - ], - "references": [ - "https://blog.checkpoint.com/2017/07/13/osxdok-refuses-go-away-money/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "b4ce13b4-8552-42e2-9282-d2e987667068", - "rule_id": "f683dcdf-a018-4801-b066-193d4ae6c8e5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.name:defaults and\n process.args:(write and \"-bool\" and (com.apple.SoftwareUpdate or /Library/Preferences/com.apple.SoftwareUpdate.plist) and not (TRUE or true))\n", - "language": "kuery" - }, - { - "name": "Suspicious Child Process of Adobe Acrobat Reader Update Service", - "description": "Detects attempts to exploit privilege escalation vulnerabilities related to the Adobe Acrobat Reader PrivilegedHelperTool responsible for installing updates. For more information, refer to CVE-2020-9615, CVE-2020-9614 and CVE-2020-9613 and verify that the impacted system is patched.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Trusted system or Adobe Acrobat Related processes." - ], - "references": [ - "https://rekken.github.io/2020/05/14/Security-Flaws-in-Adobe-Acrobat-Reader-Allow-Malicious-Program-to-Gain-Root-on-macOS-Silently/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "79d85a4f-bfdf-40e7-b70f-c2d3abe49e52", - "rule_id": "f85ce03f-d8a8-4c83-acdc-5c8cd0592be7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ], - "query": "event.category:process and host.os.type:macos and event.type:(start or process_started) and\n process.parent.name:com.adobe.ARMDC.SMJobBlessHelper and\n user.name:root and\n not process.executable: (/Library/PrivilegedHelperTools/com.adobe.ARMDC.SMJobBlessHelper or\n /usr/bin/codesign or\n /private/var/folders/zz/*/T/download/ARMDCHammer or\n /usr/sbin/pkgutil or\n /usr/bin/shasum or\n /usr/bin/perl* or\n /usr/sbin/spctl or\n /usr/sbin/installer or\n /usr/bin/csrutil)\n", - "language": "kuery" - }, - { - "name": "Ingress Transfer via Windows BITS", - "description": "Identifies downloads of executable and archive files via the Windows Background Intelligent Transfer Service (BITS). Adversaries could leverage Windows BITS transfer jobs to download remote payloads.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Command and Control", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://attack.mitre.org/techniques/T1197/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1197", - "name": "BITS Jobs", - "reference": "https://attack.mitre.org/techniques/T1197/" - } - ] - } - ], - "id": "662e4623-5e3a-48c1-8dcc-702d10f59083", - "rule_id": "f95972d3-c23b-463b-89a8-796b3f369b49", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.header_bytes", - "type": "unknown", - "ecs": false - }, - { - "name": "file.Ext.original.name", - "type": "unknown", - "ecs": false - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.action == \"rename\" and\n\nprocess.name : \"svchost.exe\" and file.Ext.original.name : \"BIT*.tmp\" and \n (file.extension :(\"exe\", \"zip\", \"rar\", \"bat\", \"dll\", \"ps1\", \"vbs\", \"wsh\", \"js\", \"vbe\", \"pif\", \"scr\", \"cmd\", \"cpl\") or file.Ext.header_bytes : \"4d5a*\") and \n \n /* noisy paths, for hunting purposes you can use the same query without the following exclusions */\n not file.path : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\", \"?:\\\\Windows\\\\*\", \"?:\\\\ProgramData\\\\*\\\\*\") and \n \n /* lot of third party SW use BITS to download executables with a long file name */\n not length(file.name) > 30\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Remote File Copy to a Hidden Share", - "description": "Identifies a remote file copy attempt to a hidden network share. This may indicate lateral movement or data staging activity.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.002", - "name": "SMB/Windows Admin Shares", - "reference": "https://attack.mitre.org/techniques/T1021/002/" - } - ] - } - ] - } - ], - "id": "15dab0f1-055d-4a1b-8c0b-434375d5c251", - "rule_id": "fa01341d-6662-426b-9d0c-6d81e33c8a9d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : (\"cmd.exe\", \"powershell.exe\", \"robocopy.exe\", \"xcopy.exe\") and\n process.args : (\"copy*\", \"move*\", \"cp\", \"mv\") and process.args : \"*$*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Potential Application Shimming via Sdbinst", - "description": "The Application Shim was created to allow for backward compatibility of software as the operating system codebase changes over time. This Windows functionality has been abused by attackers to stealthily gain persistence and arbitrary code execution in legitimate Windows processes.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.011", - "name": "Application Shimming", - "reference": "https://attack.mitre.org/techniques/T1546/011/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.011", - "name": "Application Shimming", - "reference": "https://attack.mitre.org/techniques/T1546/011/" - } - ] - } - ] - } - ], - "id": "ef50349c-7dcb-46c9-a6c1-1fce954ea8a7", - "rule_id": "fd4a992d-6130-4802-9ff8-829b89ae801f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"sdbinst.exe\" and\n not (process.args : \"-m\" and process.args : \"-bg\") and\n not process.args : \"-mm\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-endpoint.events.*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Roshal Archive (RAR) or PowerShell File Downloaded from the Internet", - "description": "Detects a Roshal Archive (RAR) file or PowerShell script downloaded from the internet by an internal host. Gaining initial access to a system and then downloading encoded or encrypted tools to move laterally is a common practice for adversaries as a way to protect their more valuable tools and tactics, techniques, and procedures (TTPs). This may be atypical behavior for a managed network and can be indicative of malware, exfiltration, or command and control.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Threat intel\n\nThis activity has been observed in FIN7 campaigns.", - "version": 103, - "tags": [ - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Domain: Endpoint" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Downloading RAR or PowerShell files from the Internet may be expected for certain systems. This rule should be tailored to either exclude systems as sources or destinations in which this behavior is expected." - ], - "references": [ - "https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html", - "https://www.justice.gov/opa/press-release/file/1084361/download", - "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - } - ], - "id": "289c52ce-f68b-4085-9e13-3281e508b76c", - "rule_id": "ff013cb4-274d-434a-96bb-fe15ddd3ae92", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "network.protocol", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "url.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "url.path", - "type": "wildcard", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "packetbeat-*", - "auditbeat-*", - "filebeat-*", - "logs-network_traffic.*" - ], - "query": "(event.dataset: (network_traffic.http or network_traffic.tls) or\n (event.category: (network or network_traffic) and network.protocol: http)) and\n (url.extension:(ps1 or rar) or url.path:(*.ps1 or *.rar)) and\n not destination.ip:(\n 10.0.0.0/8 or\n 127.0.0.0/8 or\n 169.254.0.0/16 or\n 172.16.0.0/12 or\n 192.0.0.0/24 or\n 192.0.0.0/29 or\n 192.0.0.8/32 or\n 192.0.0.9/32 or\n 192.0.0.10/32 or\n 192.0.0.170/32 or\n 192.0.0.171/32 or\n 192.0.2.0/24 or\n 192.31.196.0/24 or\n 192.52.193.0/24 or\n 192.168.0.0/16 or\n 192.88.99.0/24 or\n 224.0.0.0/4 or\n 100.64.0.0/10 or\n 192.175.48.0/24 or\n 198.18.0.0/15 or\n 198.51.100.0/24 or\n 203.0.113.0/24 or\n 240.0.0.0/4 or\n \"::1\" or\n \"FE80::/10\" or\n \"FF00::/8\"\n ) and\n source.ip:(\n 10.0.0.0/8 or\n 172.16.0.0/12 or\n 192.168.0.0/16\n )\n", - "language": "kuery" - }, - { - "name": "Potential Sudo Token Manipulation via Process Injection", - "description": "This rule detects potential sudo token manipulation attacks through process injection by monitoring the use of a debugger (gdb) process followed by a successful uid change event during the execution of the sudo process. A sudo token manipulation attack is performed by injecting into a process that has a valid sudo token, which can then be used by attackers to activate their own sudo token. This attack requires ptrace to be enabled in conjunction with the existence of a living process that has a valid sudo token with the same uid as the current user.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/nongiach/sudo_inject" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/", - "subtechnique": [ - { - "id": "T1055.008", - "name": "Ptrace System Calls", - "reference": "https://attack.mitre.org/techniques/T1055/008/" - } - ] - }, - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.003", - "name": "Sudo and Sudo Caching", - "reference": "https://attack.mitre.org/techniques/T1548/003/" - } - ] - } - ] - } - ], - "id": "87849c02-a392-4bed-b7da-70db7969ac01", - "rule_id": "ff9bc8b9-f03b-4283-be58-ee0a16f5a11b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.group.id", - "type": "unknown", - "ecs": false - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.session_leader.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, process.session_leader.entity_id with maxspan=15s\n[ process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name == \"gdb\" and process.user.id != \"0\" and process.group.id != \"0\" ]\n[ process where host.os.type == \"linux\" and event.action == \"uid_change\" and event.type == \"change\" and \n process.name == \"sudo\" and process.user.id == \"0\" and process.group.id == \"0\" ]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Google Workspace Suspended User Account Renewed", - "description": "Detects when a previously suspended user's account is renewed in Google Workspace. An adversary may renew a suspended user account to maintain access to the Google Workspace organization with a valid account.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 2, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Identity and Access Audit", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Google Workspace administrators may renew a suspended user account if the user is expected to continue employment at the organization after temporary leave. Suspended user accounts are typically used by administrators to remove access to the user while actions is taken to transfer important documents and roles to other users, prior to deleting the user account and removing the license." - ], - "references": [ - "https://support.google.com/a/answer/1110339" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.004", - "name": "Cloud Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/004/" - } - ] - } - ] - } - ], - "id": "4f504431-513e-4035-9f32-8252f1351250", - "rule_id": "00678712-b2df-11ed-afe9-f661ea17fbcc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:google_workspace.admin and event.category:iam and event.action:UNSUSPEND_USER\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 User Restricted from Sending Email", - "description": "Identifies when a user has been restricted from sending email due to exceeding sending limits of the service policies per the Security Compliance Center.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "A user sending emails using personal distribution folders may trigger the event." - ], - "references": [ - "https://docs.microsoft.com/en-us/cloud-app-security/anomaly-detection-policy", - "https://docs.microsoft.com/en-us/cloud-app-security/policy-template-reference" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "3e044576-efd1-4410-a782-eb81cedc846d", - "rule_id": "0136b315-b566-482f-866c-1d8e2477ba16", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.category:web and event.action:\"User restricted from sending email\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 Exchange Safe Attachment Rule Disabled", - "description": "Identifies when a safe attachment rule is disabled in Microsoft 365. Safe attachment rules can extend malware protections to include routing all messages and attachments without a known malware signature to a special hypervisor environment. An adversary or insider threat may disable a safe attachment rule to exfiltrate data or evade defenses.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A safe attachment rule may be disabled by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-safeattachmentrule?view=exchange-ps" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "1050a19a-a52d-40a4-a2ca-e02f210800d9", - "rule_id": "03024bd9-d23f-4ec1-8674-3cf1a21e130b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Disable-SafeAttachmentRule\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "SSH Process Launched From Inside A Container", - "description": "This rule detects an SSH or SSHD process executed from inside a container. This includes both the client ssh binary and server ssh daemon process. SSH usage inside a container should be avoided and monitored closely when necessary. With valid credentials an attacker may move laterally to other containers or to the underlying host through container breakout. They may also use valid SSH credentials as a persistence mechanism.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "SSH usage may be legitimate depending on the environment. Access patterns and follow-on activity should be analyzed to distinguish between authorized and potentially malicious behavior." - ], - "references": [ - "https://microsoft.github.io/Threat-Matrix-for-Kubernetes/techniques/SSH%20server%20running%20inside%20container/", - "https://www.blackhillsinfosec.com/sshazam-hide-your-c2-inside-of-ssh/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.004", - "name": "SSH", - "reference": "https://attack.mitre.org/techniques/T1021/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1133", - "name": "External Remote Services", - "reference": "https://attack.mitre.org/techniques/T1133/" - } - ] - } - ], - "id": "7cd74986-14e8-4c4f-a989-ef0b72ca2cfe", - "rule_id": "03a514d9-500e-443e-b6a9-72718c548f6c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where container.id: \"*\" and event.type== \"start\" and\nevent.action in (\"fork\", \"exec\") and event.action != \"end\" and \nprocess.name: (\"sshd\", \"ssh\", \"autossh\")\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "Azure AD Global Administrator Role Assigned", - "description": "In Azure Active Directory (Azure AD), permissions to manage resources are assigned using roles. The Global Administrator is a role that enables users to have access to all administrative features in Azure AD and services that use Azure AD identities like the Microsoft 365 Defender portal, the Microsoft 365 compliance center, Exchange, SharePoint Online, and Skype for Business Online. Attackers can add users as Global Administrators to maintain access and manage all subscriptions and their settings and resources.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/azure/active-directory/roles/permissions-reference#global-administrator" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/", - "subtechnique": [ - { - "id": "T1098.003", - "name": "Additional Cloud Roles", - "reference": "https://attack.mitre.org/techniques/T1098/003/" - } - ] - } - ] - } - ], - "id": "34770c87-9612-4104-bdc5-c0960ba4f46f", - "rule_id": "04c5a96f-19c5-44fd-9571-a0b033f9086f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "azure.auditlogs.properties.category", - "type": "keyword", - "ecs": false - }, - { - "name": "azure.auditlogs.properties.target_resources.0.modified_properties.1.new_value", - "type": "unknown", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.auditlogs and azure.auditlogs.properties.category:RoleManagement and\nazure.auditlogs.operation_name:\"Add member to role\" and\nazure.auditlogs.properties.target_resources.0.modified_properties.1.new_value:\"\\\"Global Administrator\\\"\"\n", - "language": "kuery" - }, - { - "name": "First Time Seen Removable Device", - "description": "Identifies newly seen removable devices by device friendly name using registry modification events. While this activity is not inherently malicious, analysts can use those events to aid monitoring for data exfiltration over those devices.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Exfiltration", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://winreg-kb.readthedocs.io/en/latest/sources/system-keys/USB-storage.html", - "https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-device-specific-registry-settings" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1091", - "name": "Replication Through Removable Media", - "reference": "https://attack.mitre.org/techniques/T1091/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1052", - "name": "Exfiltration Over Physical Medium", - "reference": "https://attack.mitre.org/techniques/T1052/", - "subtechnique": [ - { - "id": "T1052.001", - "name": "Exfiltration over USB", - "reference": "https://attack.mitre.org/techniques/T1052/001/" - } - ] - } - ] - } - ], - "id": "7053ccb9-13ff-4e37-84d7-abc0cbf6d357", - "rule_id": "0859355c-0f08-4b43-8ff5-7d2a4789fc08", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.value", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "new_terms", - "query": "event.category:\"registry\" and host.os.type:\"windows\" and registry.value:\"FriendlyName\" and registry.path:*USBSTOR*\n", - "new_terms_fields": [ - "registry.path" - ], - "history_window_start": "now-7d", - "index": [ - "logs-endpoint.events.*", - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ], - "language": "kuery" - }, - { - "name": "File Creation, Execution and Self-Deletion in Suspicious Directory", - "description": "This rule monitors for the creation of a file, followed by its execution and self-deletion in a short timespan within a directory often used for malicious purposes by threat actors. This behavior is often used by malware to execute malicious code and delete itself to hide its tracks.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "78b37780-abf6-4975-8d6b-4198136931be", - "rule_id": "09bc6c90-7501-494d-b015-5d988dc3f233", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, user.id with maxspan=1m\n [file where host.os.type == \"linux\" and event.action == \"creation\" and \n process.name in (\"curl\", \"wget\", \"fetch\", \"ftp\", \"sftp\", \"scp\", \"rsync\", \"ld\") and \n file.path : (\"/dev/shm/*\", \"/run/shm/*\", \"/tmp/*\", \"/var/tmp/*\",\n \"/run/*\", \"/var/run/*\", \"/var/www/*\", \"/proc/*/fd/*\")] by file.name\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")] by process.name\n [file where host.os.type == \"linux\" and event.action == \"deletion\" and not process.name in (\"rm\", \"ld\") and \n file.path : (\"/dev/shm/*\", \"/run/shm/*\", \"/tmp/*\", \"/var/tmp/*\",\n \"/run/*\", \"/var/run/*\", \"/var/www/*\", \"/proc/*/fd/*\")] by file.name\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Azure Frontdoor Web Application Firewall (WAF) Policy Deleted", - "description": "Identifies the deletion of a Frontdoor Web Application Firewall (WAF) Policy in Azure. An adversary may delete a Frontdoor Web Application Firewall (WAF) Policy in an attempt to evade defenses and/or to eliminate barriers to their objective.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Network Security Monitoring", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Azure Front Web Application Firewall (WAF) Policy deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Azure Front Web Application Firewall (WAF) Policy deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#networking" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "74cb8cc1-fd38-494e-9ce6-0104dd64bfa5", - "rule_id": "09d028a5-dcde-409f-8ae0-557cef1b7082", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.NETWORK/FRONTDOORWEBAPPLICATIONFIREWALLPOLICIES/DELETE\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Malware - Detected - Elastic Endgame", - "description": "Elastic Endgame detected Malware. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 99, - "severity": "critical", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [], - "id": "55fa9751-7d04-4a40-a308-06c46b46a2aa", - "rule_id": "0a97b20f-4144-49ea-be32-b540ecc445de", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:file_classification_event or endgame.event_subtype_full:file_classification_event)\n", - "language": "kuery" - }, - { - "name": "O365 Exchange Suspicious Mailbox Right Delegation", - "description": "Identifies the assignment of rights to access content from another mailbox. An adversary may use the compromised account to send messages to other accounts in the network of the target organization while creating inbox rules, so messages can evade spam/phishing detection mechanisms.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Assignment of rights to a service account." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/", - "subtechnique": [ - { - "id": "T1098.002", - "name": "Additional Email Delegate Permissions", - "reference": "https://attack.mitre.org/techniques/T1098/002/" - } - ] - } - ] - } - ], - "id": "fd84c97c-fbc5-4100-be15-ca18ea16aa47", - "rule_id": "0ce6487d-8069-4888-9ddd-61b52490cebc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "o365.audit.Parameters.AccessRights", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.action:Add-MailboxPermission and\no365.audit.Parameters.AccessRights:(FullAccess or SendAs or SendOnBehalf) and event.outcome:success and\nnot user.id : \"NT AUTHORITY\\SYSTEM (Microsoft.Exchange.Servicehost)\"\n", - "language": "kuery" - }, - { - "name": "Multiple Alerts Involving a User", - "description": "This rule uses alert data to determine when multiple different alerts involving the same user are triggered. Analysts can use this to prioritize triage and response, as these users are more likely to be compromised.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: Higher-Order Rule" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "1h", - "from": "now-24h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "False positives can occur with Generic built-in accounts, such as Administrator, admin, etc. if they are widespread used in your environment. As a best practice, they shouldn't be used in day-to-day tasks, as it prevents the ability to quickly identify and contact the account owner to find out if an alert is a planned activity, regular business activity, or an upcoming incident." - ], - "references": [], - "max_signals": 100, - "threat": [], - "id": "b83c26c4-4f96-4338-9188-1e7ed800a7f9", - "rule_id": "0d160033-fab7-4e72-85a3-3a9d80c8bff7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "signal.rule.name", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "signal.rule.name:* and user.name:* and not user.id:(\"S-1-5-18\" or \"S-1-5-19\" or \"S-1-5-20\")\n", - "threshold": { - "field": [ - "user.name" - ], - "value": 1, - "cardinality": [ - { - "field": "signal.rule.rule_id", - "value": 5 - } - ] - }, - "index": [ - ".alerts-security.*" - ], - "language": "kuery" - }, - { - "name": "SharePoint Malware File Upload", - "description": "Identifies the occurence of files uploaded to SharePoint being detected as Malware by the file scanning engine. Attackers can use File Sharing and Organization Repositories to spread laterally within the company and amplify their access. Users can inadvertently share these files without knowing their maliciousness, giving adversaries opportunities to gain initial access to other endpoints in the environment.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Benign files can trigger signatures in the built-in virus protection" - ], - "references": [ - "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/virus-detection-in-spo?view=o365-worldwide" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1080", - "name": "Taint Shared Content", - "reference": "https://attack.mitre.org/techniques/T1080/" - } - ] - } - ], - "id": "e97aad9e-0445-4b81-ae6f-f766fa37ca8d", - "rule_id": "0e52157a-8e96-4a95-a6e3-5faae5081a74", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:SharePoint and event.code:SharePointFileOperation and event.action:FileMalwareDetected\n", - "language": "kuery" - }, - { - "name": "GCP Service Account Key Creation", - "description": "Identifies when a new key is created for a service account in Google Cloud Platform (GCP). A service account is a special type of account used by an application or a virtual machine (VM) instance, not a person. Applications use service accounts to make authorized API calls, authorized as either the service account itself, or as G Suite or Cloud Identity users through domain-wide delegation. If private keys are not tracked and managed properly, they can present a security risk. An adversary may create a new key for a service account in order to attempt to abuse the permissions assigned to that account and evade detection.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Identity and Access Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Service account keys may be created by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/iam/docs/service-accounts", - "https://cloud.google.com/iam/docs/creating-managing-service-account-keys" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "f05f8f85-7f61-4b05-b656-ad2fcc0b6244", - "rule_id": "0e5acaae-6a64-4bbc-adb8-27649c03f7e1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.CreateServiceAccountKey and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Kubernetes Suspicious Self-Subject Review", - "description": "This rule detects when a service account or node attempts to enumerate their own permissions via the selfsubjectaccessreview or selfsubjectrulesreview APIs. This is highly unusual behavior for non-human identities like service accounts and nodes. An adversary may have gained access to credentials/tokens and this could be an attempt to determine what privileges they have to facilitate further movement or execution within the cluster.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 202, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Discovery" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "An administrator may submit this request as an \"impersonatedUser\" to determine what privileges a particular service account has been granted. However, an adversary may utilize the same technique as a means to determine the privileges of another token other than that of the compromised account." - ], - "references": [ - "https://www.paloaltonetworks.com/apps/pan/public/downloadResource?pagePath=/content/pan/en_US/resources/whitepapers/kubernetes-privilege-escalation-excessive-permissions-in-popular-platforms", - "https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access", - "https://techcommunity.microsoft.com/t5/microsoft-defender-for-cloud/detecting-identity-attacks-in-kubernetes/ba-p/3232340" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1613", - "name": "Container and Resource Discovery", - "reference": "https://attack.mitre.org/techniques/T1613/" - } - ] - } - ], - "id": "736661f2-a4f9-4836-9e3b-1585c2a2a381", - "rule_id": "12a2f15d-597e-4334-88ff-38a02cb1330b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.impersonatedUser.username", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.resource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.user.username", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.verb", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.verb:\"create\"\n and kubernetes.audit.objectRef.resource:(\"selfsubjectaccessreviews\" or \"selfsubjectrulesreviews\")\n and (kubernetes.audit.user.username:(system\\:serviceaccount\\:* or system\\:node\\:*)\n or kubernetes.audit.impersonatedUser.username:(system\\:serviceaccount\\:* or system\\:node\\:*))\n", - "language": "kuery" - }, - { - "name": "Kubernetes Pod Created With HostNetwork", - "description": "This rules detects an attempt to create or modify a pod attached to the host network. HostNetwork allows a pod to use the node network namespace. Doing so gives the pod access to any service running on localhost of the host. An attacker could use this access to snoop on network activity of other pods on the same node or bypass restrictive network policies applied to its given namespace.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 202, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Execution", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "An administrator or developer may want to use a pod that runs as root and shares the hosts IPC, Network, and PID namespaces for debugging purposes. If something is going wrong in the cluster and there is no easy way to SSH onto the host nodes directly, a privileged pod of this nature can be useful for viewing things like iptable rules and network namespaces from the host's perspective. Add exceptions for trusted container images using the query field \"kubernetes.audit.requestObject.spec.container.image\"" - ], - "references": [ - "https://research.nccgroup.com/2021/11/10/detection-engineering-for-kubernetes-clusters/#part3-kubernetes-detections", - "https://kubernetes.io/docs/concepts/security/pod-security-policy/#host-namespaces", - "https://bishopfox.com/blog/kubernetes-pod-privilege-escalation" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1611", - "name": "Escape to Host", - "reference": "https://attack.mitre.org/techniques/T1611/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1610", - "name": "Deploy Container", - "reference": "https://attack.mitre.org/techniques/T1610/" - } - ] - } - ], - "id": "9ecca2f9-99fa-4eae-8b1e-f0aba7016a43", - "rule_id": "12cbf709-69e8-4055-94f9-24314385c27e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.resource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.containers.image", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.hostNetwork", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.verb", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:\"pods\"\n and kubernetes.audit.verb:(\"create\" or \"update\" or \"patch\")\n and kubernetes.audit.requestObject.spec.hostNetwork:true\n and not kubernetes.audit.requestObject.spec.containers.image: (\"docker.elastic.co/beats/elastic-agent:8.4.0\")\n", - "language": "kuery" - }, - { - "name": "Potential Exploitation of an Unquoted Service Path Vulnerability", - "description": "Adversaries may leverage unquoted service path vulnerabilities to escalate privileges. By placing an executable in a higher-level directory within the path of an unquoted service executable, Windows will natively launch this executable from its defined path variable instead of the benign one in a deeper directory, thus leading to code execution.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.009", - "name": "Path Interception by Unquoted Path", - "reference": "https://attack.mitre.org/techniques/T1574/009/" - } - ] - } - ] - } - ], - "id": "e70bbd6f-8f67-469b-8dd7-8d5d4540defb", - "rule_id": "12de29d4-bbb0-4eef-b687-857e8a163870", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and \n (\n process.executable : \"?:\\\\Program.exe\" or \n process.executable regex \"\"\"(C:\\\\Program Files \\(x86\\)\\\\|C:\\\\Program Files\\\\)\\w+.exe\"\"\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Azure External Guest User Invitation", - "description": "Identifies an invitation to an external user in Azure Active Directory (AD). Azure AD is extended to include collaboration, allowing you to invite people from outside your organization to be guest users in your cloud account. Unless there is a business need to provision guest access, it is best practice avoid creating guest users. Guest users could potentially be overlooked indefinitely leading to a potential vulnerability.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Guest user invitations may be sent out by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Guest user invitations from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/governance/policy/samples/cis-azure-1-1-0" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "e0e81a40-3f5b-4e4e-a970-e2314df0fd1f", - "rule_id": "141e9b3a-ff37-4756-989d-05d7cbf35b0e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "azure.auditlogs.properties.target_resources.*.display_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Invite external user\" and azure.auditlogs.properties.target_resources.*.display_name:guest and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Office Test Registry Persistence", - "description": "Identifies the modification of the Microsoft Office \"Office Test\" Registry key, a registry location that can be used to specify a DLL which will be executed every time an MS Office application is started. Attackers can abuse this to gain persistence on a compromised host.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://unit42.paloaltonetworks.com/unit42-technical-walkthrough-office-test-persistence-method-used-in-recent-sofacy-attacks/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1137", - "name": "Office Application Startup", - "reference": "https://attack.mitre.org/techniques/T1137/", - "subtechnique": [ - { - "id": "T1137.002", - "name": "Office Test", - "reference": "https://attack.mitre.org/techniques/T1137/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "d1816172-4ede-4898-bc3e-d04a1a0901b9", - "rule_id": "14dab405-5dd9-450c-8106-72951af2391f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.action != \"deletion\" and\n registry.path : \"*\\\\Software\\\\Microsoft\\\\Office Test\\\\Special\\\\Perf\\\\*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Kubernetes User Exec into Pod", - "description": "This rule detects a user attempt to establish a shell session into a pod using the 'exec' command. Using the 'exec' command in a pod allows a user to establish a temporary shell session and execute any process/commands in the pod. An adversary may call bash to gain a persistent interactive shell which will allow access to any data the pod has permissions to, including secrets.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 202, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "An administrator may need to exec into a pod for a legitimate reason like debugging purposes. Containers built from Linux and Windows OS images, tend to include debugging utilities. In this case, an admin may choose to run commands inside a specific container with kubectl exec ${POD_NAME} -c ${CONTAINER_NAME} -- ${CMD} ${ARG1} ${ARG2} ... ${ARGN}. For example, the following command can be used to look at logs from a running Cassandra pod: kubectl exec cassandra --cat /var/log/cassandra/system.log . Additionally, the -i and -t arguments might be used to run a shell connected to the terminal: kubectl exec -i -t cassandra -- sh" - ], - "references": [ - "https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/", - "https://kubernetes.io/docs/tasks/debug/debug-application/get-shell-running-container/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1609", - "name": "Container Administration Command", - "reference": "https://attack.mitre.org/techniques/T1609/" - } - ] - } - ], - "id": "e10bcf59-7ce3-452b-aa7b-71e6fb25002f", - "rule_id": "14de811c-d60f-11ec-9fd7-f661ea17fbce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.resource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.subresource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.verb", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.verb:\"create\"\n and kubernetes.audit.objectRef.resource:\"pods\"\n and kubernetes.audit.objectRef.subresource:\"exec\"\n", - "language": "kuery" - }, - { - "name": "Azure Automation Runbook Created or Modified", - "description": "Identifies when an Azure Automation runbook is created or modified. An adversary may create or modify an Azure Automation runbook to execute malicious code and maintain persistence in their target's environment.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Configuration Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://powerzure.readthedocs.io/en/latest/Functions/operational.html#create-backdoor", - "https://github.com/hausec/PowerZure", - "https://posts.specterops.io/attacking-azure-azure-ad-and-introducing-powerzure-ca70b330511a", - "https://azure.microsoft.com/en-in/blog/azure-automation-runbook-management/" - ], - "max_signals": 100, - "threat": [], - "id": "b5224846-701d-4ea9-b8f8-d1424e42ef02", - "rule_id": "16280f1e-57e6-4242-aa21-bb4d16f13b2f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and\n azure.activitylogs.operation_name:\n (\n \"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/RUNBOOKS/DRAFT/WRITE\" or\n \"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/RUNBOOKS/WRITE\" or\n \"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/RUNBOOKS/PUBLISH/ACTION\"\n ) and\n event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "File Creation Time Changed", - "description": "Identifies modification of a file creation time. Adversaries may modify file time attributes to blend malicious content with existing files. Timestomping is a technique that modifies the timestamps of a file often to mimic files that are in trusted directories.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 3, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.006", - "name": "Timestomp", - "reference": "https://attack.mitre.org/techniques/T1070/006/" - } - ] - } - ] - } - ], - "id": "945cde3c-4281-41df-964c-2fb113e7811b", - "rule_id": "166727ab-6768-4e26-b80c-948b228ffc06", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.code : \"2\" and\n\n /* Requires Sysmon EventID 2 - File creation time change */\n event.action : \"File creation time changed*\" and \n \n not process.executable : \n (\"?:\\\\Program Files\\\\*\", \n \"?:\\\\Program Files (x86)\\\\*\", \n \"?:\\\\Windows\\\\system32\\\\msiexec.exe\", \n \"?:\\\\Windows\\\\syswow64\\\\msiexec.exe\", \n \"?:\\\\Windows\\\\system32\\\\svchost.exe\", \n \"?:\\\\WINDOWS\\\\system32\\\\backgroundTaskHost.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\", \n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\slack\\\\app-*\\\\slack.exe\", \n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\GitHubDesktop\\\\app-*\\\\GitHubDesktop.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\Teams\\\\current\\\\Teams.exe\", \n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\OneDrive.exe\") and \n not file.extension : (\"tmp\", \"~tmp\", \"xml\") and not user.name : (\"SYSTEM\", \"Local Service\", \"Network Service\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "GCP Logging Sink Modification", - "description": "Identifies a modification to a Logging sink in Google Cloud Platform (GCP). Logging compares the log entry to the sinks in that resource. Each sink whose filter matches the log entry writes a copy of the log entry to the sink's export destination. An adversary may update a Logging sink to exfiltrate logs to a different export destination.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Log Auditing", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Logging sink modifications may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Sink modifications from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/logging/docs/export#how_sinks_work" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1537", - "name": "Transfer Data to Cloud Account", - "reference": "https://attack.mitre.org/techniques/T1537/" - } - ] - } - ], - "id": "414fae17-3280-482d-9027-4f698263a177", - "rule_id": "184dfe52-2999-42d9-b9d1-d1ca54495a61", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.logging.v*.ConfigServiceV*.UpdateSink and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential Privilege Escalation via Recently Compiled Executable", - "description": "This rule monitors a sequence involving a program compilation event followed by its execution and a subsequent alteration of UID permissions to root privileges. This behavior can potentially indicate the execution of a kernel or software privilege escalation exploit.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "18ee7625-d428-4ce9-91db-5db8d54cc567", - "rule_id": "193549e8-bb9e-466a-a7f9-7e783f5cb5a6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id with maxspan=1m\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name in (\"gcc\", \"g++\", \"cc\") and user.id != \"0\"] by process.args\n [file where host.os.type == \"linux\" and event.action == \"creation\" and event.type == \"creation\" and \n process.name == \"ld\" and user.id != \"0\"] by file.name\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n user.id != \"0\"] by process.name\n [process where host.os.type == \"linux\" and event.action in (\"uid_change\", \"guid_change\") and event.type == \"change\" and \n user.id == \"0\"] by process.name\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Network Tool Launched Inside A Container", - "description": "This rule detects commonly abused network utilities running inside a container. Network utilities like nc, nmap, dig, tcpdump, ngrep, telnet, mitmproxy, zmap can be used for malicious purposes such as network reconnaissance, monitoring, or exploitation, and should be monitored closely within a container.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Tactic: Command and Control", - "Tactic: Reconnaissance" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "There is a potential for false positives if the container is used for legitimate tasks that require the use of network utilities, such as network troubleshooting, testing or system monitoring. It is important to investigate any alerts generated by this rule to determine if they are indicative of malicious activity or part of legitimate container activity." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1046", - "name": "Network Service Discovery", - "reference": "https://attack.mitre.org/techniques/T1046/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0043", - "name": "Reconnaissance", - "reference": "https://attack.mitre.org/tactics/TA0043/" - }, - "technique": [ - { - "id": "T1595", - "name": "Active Scanning", - "reference": "https://attack.mitre.org/techniques/T1595/" - } - ] - } - ], - "id": "2485be4d-d5de-491b-8ab5-fe255769ce21", - "rule_id": "1a289854-5b78-49fe-9440-8a8096b1ab50", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where container.id: \"*\" and event.type== \"start\" and \n(\n(process.name: (\"nc\", \"ncat\", \"nmap\", \"dig\", \"nslookup\", \"tcpdump\", \"tshark\", \"ngrep\", \"telnet\", \"mitmproxy\", \"socat\", \"zmap\", \"masscan\", \"zgrab\")) or \n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/\n(process.args: (\"nc\", \"ncat\", \"nmap\", \"dig\", \"nslookup\", \"tcpdump\", \"tshark\", \"ngrep\", \"telnet\", \"mitmproxy\", \"socat\", \"zmap\", \"masscan\", \"zgrab\"))\n)\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "Azure Application Credential Modification", - "description": "Identifies when a new credential is added to an application in Azure. An application may use a certificate or secret string to prove its identity when requesting a token. Multiple certificates and secrets can be added for an application and an adversary may abuse this by creating an additional authentication method to evade defenses or persist in an environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Application credential additions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Application credential additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1550", - "name": "Use Alternate Authentication Material", - "reference": "https://attack.mitre.org/techniques/T1550/", - "subtechnique": [ - { - "id": "T1550.001", - "name": "Application Access Token", - "reference": "https://attack.mitre.org/techniques/T1550/001/" - } - ] - } - ] - } - ], - "id": "2c5ba2bd-4f1e-4ee2-a724-aba2c85ed7b5", - "rule_id": "1a36cace-11a7-43a8-9a10-b497c5a02cd3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Update application - Certificates and secrets management\" and event.outcome:(success or Success)\n", - "language": "kuery" - }, - { - "name": "Possible Consent Grant Attack via Azure-Registered Application", - "description": "Detects when a user grants permissions to an Azure-registered application or when an administrator grants tenant-wide permissions to an application. An adversary may create an Azure-registered application that requests access to data such as contact information, email, or documents.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Possible Consent Grant Attack via Azure-Registered Application\n\nIn an illicit consent grant attack, the attacker creates an Azure-registered application that requests access to data such as contact information, email, or documents. The attacker then tricks an end user into granting that application consent to access their data either through a phishing attack, or by injecting illicit code into a trusted website. After the illicit application has been granted consent, it has account-level access to data without the need for an organizational account. Normal remediation steps like resetting passwords for breached accounts or requiring multi-factor authentication (MFA) on accounts are not effective against this type of attack, since these are third-party applications and are external to the organization.\n\nOfficial Microsoft guidance for detecting and remediating this attack can be found [here](https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/detect-and-remediate-illicit-consent-grants).\n\n#### Possible investigation steps\n\n- From the Azure AD portal, Review the application that was granted permissions:\n - Click on the `Review permissions` button on the `Permissions` blade of the application.\n - An app should require only permissions related to the app's purpose. If that's not the case, the app might be risky.\n - Apps that require high privileges or admin consent are more likely to be risky.\n- Investigate the app and the publisher. The following characteristics can indicate suspicious apps:\n - A low number of downloads.\n - Low rating or score or bad comments.\n - Apps with a suspicious publisher or website.\n - Apps whose last update is not recent. This might indicate an app that is no longer supported.\n- Export and examine the [Oauth app auditing](https://docs.microsoft.com/en-us/defender-cloud-apps/manage-app-permissions#oauth-app-auditing) to identify users affected.\n\n### False positive analysis\n\n- This mechanism can be used legitimately. Malicious applications abuse the same workflow used by legitimate apps. Thus, analysts must review each app consent to ensure that only desired apps are granted access.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Disable the malicious application to stop user access and the application access to your data.\n- Revoke the application Oauth consent grant. The `Remove-AzureADOAuth2PermissionGrant` cmdlet can be used to complete this task.\n- Remove the service principal application role assignment. The `Remove-AzureADServiceAppRoleAssignment` cmdlet can be used to complete this task.\n- Revoke the refresh token for all users assigned to the application. Azure provides a [playbook](https://github.com/Azure/Azure-Sentinel/tree/master/Playbooks/Revoke-AADSignInSessions) for this task.\n- [Report](https://docs.microsoft.com/en-us/defender-cloud-apps/manage-app-permissions#send-feedback) the application as malicious to Microsoft.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Investigate the potential for data compromise from the user's email and file sharing services. Activate your Data Loss incident response playbook.\n- Disable the permission for a user to set consent permission on their behalf.\n - Enable the [Admin consent request](https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/configure-admin-consent-workflow) feature.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Data Source: Microsoft 365", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/detect-and-remediate-illicit-consent-grants?view=o365-worldwide", - "https://www.cloud-architekt.net/detection-and-mitigation-consent-grant-attacks-azuread/", - "https://docs.microsoft.com/en-us/defender-cloud-apps/investigate-risky-oauth#how-to-detect-risky-oauth-apps" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1528", - "name": "Steal Application Access Token", - "reference": "https://attack.mitre.org/techniques/T1528/" - } - ] - } - ], - "id": "befcd507-503d-4d3c-99a0-e20d5f370f21", - "rule_id": "1c6a8c7a-5cb6-4a82-ba27-d5a5b8a40a38", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - }, - { - "package": "azure", - "version": "^1.0.0" - }, - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "o365.audit.Operation", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*", - "logs-o365*" - ], - "query": "event.dataset:(azure.activitylogs or azure.auditlogs or o365.audit) and\n (\n azure.activitylogs.operation_name:\"Consent to application\" or\n azure.auditlogs.operation_name:\"Consent to application\" or\n o365.audit.Operation:\"Consent to application.\"\n ) and\n event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Azure Kubernetes Rolebindings Created", - "description": "Identifies the creation of role binding or cluster role bindings. You can assign these roles to Kubernetes subjects (users, groups, or service accounts) with role bindings and cluster role bindings. An adversary who has permissions to create bindings and cluster-bindings in the cluster can create a binding to the cluster-admin ClusterRole or to other high privileges roles.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-20m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftkubernetes", - "https://www.microsoft.com/security/blog/2020/04/02/attack-matrix-kubernetes/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [] - } - ], - "id": "114f5122-5f01-4d51-94b4-d7f1c81b955e", - "rule_id": "1c966416-60c1-436b-bfd0-e002fddbfd89", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\n\t(\"MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/ROLEBINDINGS/WRITE\" or\n\t \"MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/RBAC.AUTHORIZATION.K8S.IO/CLUSTERROLEBINDINGS/WRITE\") and\nevent.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Azure Storage Account Key Regenerated", - "description": "Identifies a rotation to storage account access keys in Azure. Regenerating access keys can affect any applications or Azure services that are dependent on the storage account key. Adversaries may regenerate a key as a means of acquiring credentials to access systems and resources.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "It's recommended that you rotate your access keys periodically to help keep your storage account secure. Normal key rotation can be exempted from the rule. An abnormal time frame and/or a key rotation from unfamiliar users, hosts, or locations should be investigated." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1528", - "name": "Steal Application Access Token", - "reference": "https://attack.mitre.org/techniques/T1528/" - } - ] - } - ], - "id": "f5602777-acf3-48be-b394-2548f8722c22", - "rule_id": "1e0b832e-957e-43ae-b319-db82d228c908", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.STORAGE/STORAGEACCOUNTS/REGENERATEKEY/ACTION\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Exploit - Detected - Elastic Endgame", - "description": "Elastic Endgame detected an Exploit. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "6c4c9c5c-56b5-4a79-bd00-68cc644e0e88", - "rule_id": "2003cdc8-8d83-4aa5-b132-1f9a8eb48514", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:exploit_event or endgame.event_subtype_full:exploit_event)\n", - "language": "kuery" - }, - { - "name": "First Time Seen Google Workspace OAuth Login from Third-Party Application", - "description": "Detects the first time a third-party application logs in and authenticated with OAuth. OAuth is used to grant permissions to specific resources and services in Google Workspace. Compromised credentials or service accounts could allow an adversary to authenticate to Google Workspace as a valid user and inherit their privileges.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Setup\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 2, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Tactic: Defense Evasion", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Developers may leverage third-party applications for legitimate purposes in Google Workspace such as for administrative tasks." - ], - "references": [ - "https://www.elastic.co/security-labs/google-workspace-attack-surface-part-one", - "https://developers.google.com/apps-script/guides/bound", - "https://developers.google.com/identity/protocols/oauth2" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1550", - "name": "Use Alternate Authentication Material", - "reference": "https://attack.mitre.org/techniques/T1550/", - "subtechnique": [ - { - "id": "T1550.001", - "name": "Application Access Token", - "reference": "https://attack.mitre.org/techniques/T1550/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.004", - "name": "Cloud Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/004/" - } - ] - } - ] - } - ], - "id": "3e31de2b-3449-4ff7-9ecc-ce0d18a237e4", - "rule_id": "21bafdf0-cf17-11ed-bd57-f661ea17fbcc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.token.client.id", - "type": "unknown", - "ecs": false - }, - { - "name": "google_workspace.token.scope.data.scope_name", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "new_terms", - "query": "event.dataset: \"google_workspace.token\" and event.action: \"authorize\" and\ngoogle_workspace.token.scope.data.scope_name: *Login and google_workspace.token.client.id: *apps.googleusercontent.com\n", - "new_terms_fields": [ - "google_workspace.token.client.id" - ], - "history_window_start": "now-15d", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "language": "kuery" - }, - { - "name": "GCP Storage Bucket Permissions Modification", - "description": "Identifies when the Identity and Access Management (IAM) permissions are modified for a Google Cloud Platform (GCP) storage bucket. An adversary may modify the permissions on a storage bucket to weaken their target's security controls or an administrator may inadvertently modify the permissions, which could lead to data exposure or loss.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Identity and Access Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Storage bucket permissions may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/storage/docs/access-control/iam-permissions" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1222", - "name": "File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/" - } - ] - } - ], - "id": "07e4a58e-7c38-4bc2-b2c0-86804c2e241a", - "rule_id": "2326d1b2-9acf-4dee-bd21-867ea7378b4d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:\"storage.setIamPermissions\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential Reverse Shell via Background Process", - "description": "Monitors for the execution of background processes with process arguments capable of opening a socket in the /dev/tcp channel. This may indicate the creation of a backdoor reverse connection, and should be investigated further.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - } - ], - "id": "08e24a1c-2783-4190-bf5a-817a96f4ff37", - "rule_id": "259be2d8-3b1a-4c2c-a0eb-0c8e77f35e39", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name in (\"setsid\", \"nohup\") and process.args : \"*/dev/tcp/*0>&1*\" and \nprocess.parent.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Azure Blob Container Access Level Modification", - "description": "Identifies changes to container access levels in Azure. Anonymous public read access to containers and blobs in Azure is a way to share data broadly, but can present a security risk if access to sensitive data is not managed judiciously.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Asset Visibility", - "Tactic: Discovery" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Access level modifications may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Access level modifications from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-prevent" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1526", - "name": "Cloud Service Discovery", - "reference": "https://attack.mitre.org/techniques/T1526/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - } - ], - "id": "26827afb-7330-47c6-afef-d6c3af65723c", - "rule_id": "2636aa6c-88b5-4337-9c31-8d0192a8ef45", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.STORAGE/STORAGEACCOUNTS/BLOBSERVICES/CONTAINERS/WRITE\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Azure Active Directory High Risk User Sign-in Heuristic", - "description": "Identifies high risk Azure Active Directory (AD) sign-ins by leveraging Microsoft Identity Protection machine learning and heuristics.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Azure Active Directory High Risk User Sign-in Heuristic\n\nMicrosoft Identity Protection is an Azure AD security tool that detects various types of identity risks and attacks.\n\nThis rule identifies events produced by the Microsoft Identity Protection with a risk state equal to `confirmedCompromised` or `atRisk`.\n\n#### Possible investigation steps\n\n- Identify the Risk Detection that triggered the event. A list with descriptions can be found [here](https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/concept-identity-protection-risks#risk-types-and-detection).\n- Identify the user account involved and validate whether the suspicious activity is normal for that user.\n - Consider the source IP address and geolocation for the involved user account. Do they look normal?\n - Consider the device used to sign in. Is it registered and compliant?\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\nIf this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and device conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 105, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-azure-monitor-sign-ins-log-schema", - "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/overview-identity-protection", - "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk", - "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk#investigation-framework" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "85250707-2efd-4f55-9298-39e0637b6b4e", - "rule_id": "26edba02-6979-4bce-920a-70b080a7be81", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.signinlogs.properties.risk_state", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.signinlogs and\n azure.signinlogs.properties.risk_state:(\"confirmedCompromised\" or \"atRisk\") and event.outcome:(success or Success)\n", - "language": "kuery" - }, - { - "name": "Attempts to Brute Force a Microsoft 365 User Account", - "description": "Identifies attempts to brute force a Microsoft 365 user account. An adversary may attempt a brute force attack to obtain unauthorized access to user accounts.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Identity and Access Audit", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Willem D'Haese", - "Austin Songer" - ], - "false_positives": [ - "Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false positives." - ], - "references": [ - "https://blueteamblog.com/7-ways-to-monitor-your-office-365-logs-using-siem" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "c5af4fc8-6c10-4e0b-8b85-6a92fdf4b68b", - "rule_id": "26f68dba-ce29-497b-8e13-b4fde1db5a2d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "o365.audit.LogonError", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "threshold", - "query": "event.dataset:o365.audit and event.provider:(AzureActiveDirectory or Exchange) and\n event.category:authentication and event.action:(UserLoginFailed or PasswordLogonInitialAuthUsingPassword) and\n not o365.audit.LogonError:(UserAccountNotFound or EntitlementGrantsNotFound or UserStrongAuthEnrollmentRequired or\n UserStrongAuthClientAuthNRequired or InvalidReplyTo)\n", - "threshold": { - "field": [ - "user.id" - ], - "value": 10 - }, - "index": [ - "filebeat-*", - "logs-o365*" - ], - "language": "kuery" - }, - { - "name": "Microsoft 365 Exchange Transport Rule Modification", - "description": "Identifies when a transport rule has been disabled or deleted in Microsoft 365. Mail flow rules (also known as transport rules) are used to identify and take action on messages that flow through your organization. An adversary or insider threat may modify a transport rule to exfiltrate data or evade defenses.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A transport rule may be modified by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-transportrule?view=exchange-ps", - "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-transportrule?view=exchange-ps", - "https://docs.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1537", - "name": "Transfer Data to Cloud Account", - "reference": "https://attack.mitre.org/techniques/T1537/" - } - ] - } - ], - "id": "3f3e07e0-a982-4083-a5c9-95493e0ef55e", - "rule_id": "272a6484-2663-46db-a532-ef734bf9a796", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:(\"Remove-TransportRule\" or \"Disable-TransportRule\") and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "GCP Firewall Rule Modification", - "description": "Identifies when a firewall rule is modified in Google Cloud Platform (GCP) for Virtual Private Cloud (VPC) or App Engine. These firewall rules can be modified to allow or deny connections to or from virtual machine (VM) instances or specific applications. An adversary may modify an existing firewall rule in order to weaken their target's security controls and allow more permissive ingress or egress traffic flows for their benefit.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Firewall rules may be modified by system administrators. Verify that the firewall configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/vpc/docs/firewalls", - "https://cloud.google.com/appengine/docs/standard/python/understanding-firewalls" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "509e356e-fdb7-490f-8489-256581d6212c", - "rule_id": "2783d84f-5091-4d7d-9319-9fceda8fa71b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:(*.compute.firewalls.patch or google.appengine.*.Firewall.Update*Rule)\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 Teams External Access Enabled", - "description": "Identifies when external access is enabled in Microsoft Teams. External access lets Teams and Skype for Business users communicate with other users that are outside their organization. An adversary may enable external access or add an allowed domain to exfiltrate data or maintain persistence in an environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Teams external access may be enabled by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/microsoftteams/manage-external-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "eda836a2-b803-4c5c-816b-8aa3fa1427db", - "rule_id": "27f7c15a-91f8-4c3d-8b9e-1f99cc030a51", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "o365.audit.Parameters.AllowFederatedUsers", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:(SkypeForBusiness or MicrosoftTeams) and\nevent.category:web and event.action:\"Set-CsTenantFederationConfiguration\" and\no365.audit.Parameters.AllowFederatedUsers:True and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Exploit - Prevented - Elastic Endgame", - "description": "Elastic Endgame prevented an Exploit. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "a7126fad-8e0a-415b-88ea-a831de38555a", - "rule_id": "2863ffeb-bf77-44dd-b7a5-93ef94b72036", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:exploit_event or endgame.event_subtype_full:exploit_event)\n", - "language": "kuery" - }, - { - "name": "Kubernetes Pod created with a Sensitive hostPath Volume", - "description": "This rule detects when a pod is created with a sensitive volume of type hostPath. A hostPath volume type mounts a sensitive file or folder from the node to the container. If the container gets compromised, the attacker can use this mount for gaining access to the node. There are many ways a container with unrestricted access to the host filesystem can escalate privileges, including reading data from other containers, and accessing tokens of more privileged pods.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 202, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Execution", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "An administrator may need to attach a hostPath volume for a legitimate reason. This alert should be investigated for legitimacy by determining if the kuberenetes.audit.requestObject.spec.volumes.hostPath.path triggered is one needed by its target container/pod. For example, when the fleet managed elastic agent is deployed as a daemonset it creates several hostPath volume mounts, some of which are sensitive host directories like /proc, /etc/kubernetes, and /var/log. Add exceptions for trusted container images using the query field \"kubernetes.audit.requestObject.spec.container.image\"" - ], - "references": [ - "https://blog.appsecco.com/kubernetes-namespace-breakout-using-insecure-host-path-volume-part-1-b382f2a6e216", - "https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1611", - "name": "Escape to Host", - "reference": "https://attack.mitre.org/techniques/T1611/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1610", - "name": "Deploy Container", - "reference": "https://attack.mitre.org/techniques/T1610/" - } - ] - } - ], - "id": "5156964c-f7a9-4666-be22-339ed7c27c17", - "rule_id": "2abda169-416b-4bb3-9a6b-f8d239fd78ba", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.resource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.containers.image", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.volumes.hostPath.path", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.verb", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:\"pods\"\n and kubernetes.audit.verb:(\"create\" or \"update\" or \"patch\")\n and kubernetes.audit.requestObject.spec.volumes.hostPath.path:\n (\"/\" or\n \"/proc\" or\n \"/root\" or\n \"/var\" or\n \"/var/run\" or\n \"/var/run/docker.sock\" or\n \"/var/run/crio/crio.sock\" or\n \"/var/run/cri-dockerd.sock\" or\n \"/var/lib/kubelet\" or\n \"/var/lib/kubelet/pki\" or\n \"/var/lib/docker/overlay2\" or\n \"/etc\" or\n \"/etc/kubernetes\" or\n \"/etc/kubernetes/manifests\" or\n \"/etc/kubernetes/pki\" or\n \"/home/admin\")\n and not kubernetes.audit.requestObject.spec.containers.image: (\"docker.elastic.co/beats/elastic-agent:8.4.0\")\n", - "language": "kuery" - }, - { - "name": "O365 Excessive Single Sign-On Logon Errors", - "description": "Identifies accounts with a high number of single sign-on (SSO) logon errors. Excessive logon errors may indicate an attempt to brute force a password or SSO token.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Identity and Access Audit", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-20m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false positives." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "700d843e-8d92-40ce-8ce8-4572275207d6", - "rule_id": "2de10e77-c144-4e69-afb7-344e7127abd0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "o365.audit.LogonError", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "threshold", - "query": "event.dataset:o365.audit and event.provider:AzureActiveDirectory and event.category:authentication and o365.audit.LogonError:\"SsoArtifactInvalidOrExpired\"\n", - "threshold": { - "field": [ - "user.id" - ], - "value": 5 - }, - "index": [ - "filebeat-*", - "logs-o365*" - ], - "language": "kuery" - }, - { - "name": "GCP Firewall Rule Creation", - "description": "Identifies when a firewall rule is created in Google Cloud Platform (GCP) for Virtual Private Cloud (VPC) or App Engine. These firewall rules can be configured to allow or deny connections to or from virtual machine (VM) instances or specific applications. An adversary may create a new firewall rule in order to weaken their target's security controls and allow more permissive ingress or egress traffic flows for their benefit.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Firewall rules may be created by system administrators. Verify that the firewall configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/vpc/docs/firewalls", - "https://cloud.google.com/appengine/docs/standard/python/understanding-firewalls" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "1afb0f10-87b9-43ea-a4bc-9eb12c2650f9", - "rule_id": "30562697-9859-4ae0-a8c5-dab45d664170", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:(*.compute.firewalls.insert or google.appengine.*.Firewall.Create*Rule)\n", - "language": "kuery" - }, - { - "name": "Agent Spoofing - Mismatched Agent ID", - "description": "Detects events that have a mismatch on the expected event agent ID. The status \"agent_id_mismatch\" occurs when the expected agent ID associated with the API key does not match the actual agent ID in an event. This could indicate attempts to spoof events in order to masquerade actual activity to evade detection.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Use Case: Threat Detection", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "This is meant to run only on datasources using Elastic Agent 7.14+ since versions prior to that will be missing the necessary field, resulting in false positives." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - } - ], - "id": "3716ecea-b8fd-4da1-98bc-5212fb591661", - "rule_id": "3115bd2c-0baa-4df0-80ea-45e474b5ef93", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.agent_id_status", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "logs-*", - "metrics-*", - "traces-*" - ], - "query": "event.agent_id_status:agent_id_mismatch\n", - "language": "kuery" - }, - { - "name": "GCP Pub/Sub Topic Deletion", - "description": "Identifies the deletion of a topic in Google Cloud Platform (GCP). In GCP, the publisher-subscriber relationship (Pub/Sub) is an asynchronous messaging service that decouples event-producing and event-processing services. A publisher application creates and sends messages to a topic. Deleting a topic can interrupt message flow in the Pub/Sub pipeline.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Log Auditing", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Topic deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Topic deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/pubsub/docs/overview" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "964e0891-3d5e-4b51-a79d-8e718ebaa9e4", - "rule_id": "3202e172-01b1-4738-a932-d024c514ba72", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.pubsub.v*.Publisher.DeleteTopic and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Azure Network Watcher Deletion", - "description": "Identifies the deletion of a Network Watcher in Azure. Network Watchers are used to monitor, diagnose, view metrics, and enable or disable logs for resources in an Azure virtual network. An adversary may delete a Network Watcher in an attempt to evade defenses.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Network Security Monitoring", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Network Watcher deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Network Watcher deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "1e22450f-5788-4e7c-87ef-2448a8aed032", - "rule_id": "323cb487-279d-4218-bcbd-a568efe930c6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.NETWORK/NETWORKWATCHERS/DELETE\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Azure Active Directory High Risk Sign-in", - "description": "Identifies high risk Azure Active Directory (AD) sign-ins by leveraging Microsoft's Identity Protection machine learning and heuristics. Identity Protection categorizes risk into three tiers: low, medium, and high. While Microsoft does not provide specific details about how risk is calculated, each level brings higher confidence that the user or sign-in is compromised.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Azure Active Directory High Risk Sign-in\n\nMicrosoft Identity Protection is an Azure AD security tool that detects various types of identity risks and attacks.\n\nThis rule identifies events produced by Microsoft Identity Protection with high risk levels or high aggregated risk level.\n\n#### Possible investigation steps\n\n- Identify the Risk Detection that triggered the event. A list with descriptions can be found [here](https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/concept-identity-protection-risks#risk-types-and-detection).\n- Identify the user account involved and validate whether the suspicious activity is normal for that user.\n - Consider the source IP address and geolocation for the involved user account. Do they look normal?\n - Consider the device used to sign in. Is it registered and compliant?\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\nIf this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and device conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 105, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Willem D'Haese" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/howto-conditional-access-policy-risk", - "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/overview-identity-protection", - "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "b850b748-6f91-4127-ab86-5c062f571694", - "rule_id": "37994bca-0611-4500-ab67-5588afe73b77", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.signinlogs.properties.risk_level_aggregated", - "type": "keyword", - "ecs": false - }, - { - "name": "azure.signinlogs.properties.risk_level_during_signin", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.\n\nNote that details for `azure.signinlogs.properties.risk_level_during_signin` and `azure.signinlogs.properties.risk_level_aggregated`\nare only available for Azure AD Premium P2 customers. All other customers will be returned `hidden`.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.signinlogs and\n (azure.signinlogs.properties.risk_level_during_signin:high or azure.signinlogs.properties.risk_level_aggregated:high) and\n event.outcome:(success or Success)\n", - "language": "kuery" - }, - { - "name": "User Added as Owner for Azure Service Principal", - "description": "Identifies when a user is added as an owner for an Azure service principal. The service principal object defines what the application can do in the specific tenant, who can access the application, and what resources the app can access. A service principal object is created when an application is given permission to access resources in a tenant. An adversary may add a user account as an owner for a service principal and use that account in order to define what an application can do in the Azure AD tenant.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Configuration Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "3ce7b766-e857-485a-b649-ee6a810d3b03", - "rule_id": "38e5acdd-5f20-4d99-8fe4-f0a1a592077f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Add owner to service principal\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "External User Added to Google Workspace Group", - "description": "Detects an external Google Workspace user account being added to an existing group. Adversaries may add external user accounts as a means to intercept shared files or emails with that specific group.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating External User Added to Google Workspace Group\n\nGoogle Workspace groups allow organizations to assign specific users to a group that can share resources. Application specific roles can be manually set for each group, but if not inherit permissions from the top-level organizational unit.\n\nThreat actors may use phishing techniques and container-bound scripts to add external Google accounts to an organization's groups with editorial privileges. As a result, the user account is unable to manually access the organization's resources, settings and files, but will receive anything shared to the group. As a result, confidential information could be leaked or perhaps documents shared with editorial privileges be weaponized for further intrusion.\n\nThis rule identifies when an external user account is added to an organization's groups where the domain name of the target does not match the Google Workspace domain.\n\n#### Possible investigation steps\n- Identify user account(s) associated by reviewing `user.name` or `user.email` in the alert\n - The `user.target.email` field contains the user added to the groups\n - The `group.name` field contains the group the target user was added to\n- Identify specific application settings given to the group which may indicate motive for the external user joining a particular group\n- With the user identified, verify administrative privileges are scoped properly to add external users to the group\n - Unauthorized actions may indicate the `user.email` account has been compromised or leveraged to add an external user\n- To identify other users in this group, search for `event.action: \"ADD_GROUP_MEMBER\"`\n - It is important to understand if external users with `@gmail.com` are expected to be added to this group based on historical references\n- Review Gmail logs where emails were sent to and from the `group.name` value\n - This may indicate potential internal spearphishing\n\n### False positive analysis\n- With the user account whom added the new user, verify this action was intentional\n- Verify that the target whom was added to the group is expected to have access to the organization's resources and data\n- If other members have been added to groups that are external, this may indicate historically that this action is expected\n\n### Response and remediation\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate multi-factor authentication for the user.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security defaults [provided by Google](https://cloud.google.com/security-command-center/docs/how-to-investigate-threats).\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 2, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Identity and Access Audit", - "Tactic: Initial Access", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Administrators may add external users to groups to share files and communication with them via the intended recipient be the group they are added to. It is unlikely an external user account would be added to an organization's group where administrators should create a new user account." - ], - "references": [ - "https://support.google.com/a/answer/33329" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.004", - "name": "Cloud Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/004/" - } - ] - } - ] - } - ], - "id": "f7861f39-fa23-4c61-b58a-8aced15ba357", - "rule_id": "38f384e0-aef8-11ed-9a38-f661ea17fbcc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "user.target.email", - "type": "keyword", - "ecs": true - }, - { - "name": "user.target.group.domain", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "eql", - "query": "iam where event.dataset == \"google_workspace.admin\" and event.action == \"ADD_GROUP_MEMBER\" and\n not endsWith(user.target.email, user.target.group.domain)\n", - "language": "eql", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ] - }, - { - "name": "Malware - Prevented - Elastic Endgame", - "description": "Elastic Endgame prevented Malware. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [], - "id": "3b2a308d-b964-4208-b948-c6a78ca2a388", - "rule_id": "3b382770-efbb-44f4-beed-f5e0a051b895", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:file_classification_event or endgame.event_subtype_full:file_classification_event)\n", - "language": "kuery" - }, - { - "name": "PowerShell Script with Log Clear Capabilities", - "description": "Identifies the use of Cmdlets and methods related to Windows event log deletion activities. This is often done by attackers in an attempt to evade detection or destroy forensic evidence on a system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: PowerShell Logs", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.eventlog.clear", - "https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.eventing.reader.eventlogsession.clearlog" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.001", - "name": "Clear Windows Event Logs", - "reference": "https://attack.mitre.org/techniques/T1070/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "5f6edd6e-e787-4cf5-a360-75f9925226da", - "rule_id": "3d3aa8f9-12af-441f-9344-9f31053e316d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"Clear-EventLog\" or\n \"Remove-EventLog\" or\n (\"Eventing.Reader.EventLogSession\" and \".ClearLog\") or\n (\"Diagnostics.EventLog\" and \".Clear\")\n ) and\n not file.path : (\n ?\\:\\\\\\\\*\\\\\\\\system32\\\\\\\\WindowsPowerShell\\\\\\\\v1.0\\\\\\\\Modules\\\\\\\\Microsoft.PowerShell.Management\\\\\\\\*.psd1\n )\n", - "language": "kuery" - }, - { - "name": "Potential Password Spraying of Microsoft 365 User Accounts", - "description": "Identifies a high number (25) of failed Microsoft 365 user authentication attempts from a single IP address within 30 minutes, which could be indicative of a password spraying attack. An adversary may attempt a password spraying attack to obtain unauthorized access to user accounts.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Identity and Access Audit", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false positives." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1110", - "name": "Brute Force", - "reference": "https://attack.mitre.org/techniques/T1110/" - } - ] - } - ], - "id": "7c0f1590-923f-42d8-9086-7cc30c1b24cc", - "rule_id": "3efee4f0-182a-40a8-a835-102c68a4175d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "threshold", - "query": "event.dataset:o365.audit and event.provider:(Exchange or AzureActiveDirectory) and event.category:authentication and\nevent.action:(\"UserLoginFailed\" or \"PasswordLogonInitialAuthUsingPassword\")\n", - "threshold": { - "field": [ - "source.ip" - ], - "value": 25 - }, - "index": [ - "filebeat-*", - "logs-o365*" - ], - "language": "kuery" - }, - { - "name": "CyberArk Privileged Access Security Error", - "description": "Identifies the occurrence of a CyberArk Privileged Access Security (PAS) error level audit event. The event.code correlates to the CyberArk Vault Audit Action Code.", - "risk_score": 73, - "severity": "high", - "rule_name_override": "event.action", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\nThis is a promotion rule for CyberArk error events, which are alertable events per the vendor.\nConsult vendor documentation on interpreting specific events.", - "version": 102, - "tags": [ - "Data Source: CyberArk PAS", - "Use Case: Log Auditing", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "To tune this rule, add exceptions to exclude any event.code which should not trigger this rule." - ], - "references": [ - "https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PASREF/Vault%20Audit%20Action%20Codes.htm?tocpath=Administration%7CReferences%7C_____3" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [] - } - ], - "id": "5c53e07f-0d83-4934-b22a-d0bdcfc30010", - "rule_id": "3f0e5410-a4bf-4e8c-bcfc-79d67a285c54", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cyberarkpas", - "version": "^2.2.0" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "The CyberArk Privileged Access Security (PAS) Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-cyberarkpas.audit*" - ], - "query": "event.dataset:cyberarkpas.audit and event.type:error\n", - "language": "kuery" - }, - { - "name": "Potential Protocol Tunneling via Chisel Client", - "description": "This rule monitors for common command line flags leveraged by the Chisel client utility followed by a connection attempt. Chisel is a command-line utility used for creating and managing TCP and UDP tunnels, enabling port forwarding and secure communication between machines. Attackers can abuse the Chisel utility to establish covert communication channels, bypass network restrictions, and carry out malicious activities by creating tunnels that allow unauthorized access to internal systems.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform", - "https://book.hacktricks.xyz/generic-methodologies-and-resources/tunneling-and-port-forwarding" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - } - ], - "id": "55ab19d3-2590-4762-b800-1ebbdb7e1e27", - "rule_id": "3f12325a-4cc6-410b-8d4c-9fbbeb744cfd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.args == \"client\" and process.args : (\"R*\", \"*:*\", \"*socks*\", \"*.*\") and process.args_count >= 4 and \n process.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")]\n [network where host.os.type == \"linux\" and event.action == \"connection_attempted\" and event.type == \"start\" and \n destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\" and \n not process.name : (\n \"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\", \"java\", \"telnet\",\n \"ftp\", \"socat\", \"curl\", \"wget\", \"dpkg\", \"docker\", \"dockerd\", \"yum\", \"apt\", \"rpm\", \"dnf\", \"ssh\", \"sshd\")]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Process Discovery via Built-In Applications", - "description": "Identifies the use of built-in tools attackers can use to discover running processes on an endpoint.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1057", - "name": "Process Discovery", - "reference": "https://attack.mitre.org/techniques/T1057/" - }, - { - "id": "T1518", - "name": "Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/", - "subtechnique": [ - { - "id": "T1518.001", - "name": "Security Software Discovery", - "reference": "https://attack.mitre.org/techniques/T1518/001/" - } - ] - } - ] - } - ], - "id": "75597a93-9cf3-4710-8016-ce15277200c3", - "rule_id": "3f4d7734-2151-4481-b394-09d7c6c91f75", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and event.action == \"exec\" and\n process.name :(\"ps\", \"pstree\", \"htop\", \"pgrep\") and\n not (event.action == \"exec\" and process.parent.name in (\"amazon-ssm-agent\", \"snap\"))\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Interactive Exec Command Launched Against A Running Container", - "description": "This rule detects interactive 'exec' events launched against a container using the 'exec' command. Using the 'exec' command in a pod allows a user to establish a temporary shell session and execute any process/command inside the container. This rule specifically targets higher-risk interactive commands that allow real-time interaction with a container's shell. A malicious actor could use this level of access to further compromise the container environment or attempt a container breakout.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "An administrator may need to exec into a pod for a legitimate reason like debugging purposes. Containers built from Linux and Windows OS images, tend to include debugging utilities. In this case, an admin may choose to run commands inside a specific container with kubectl exec ${POD_NAME} -c ${CONTAINER_NAME} -- ${CMD} ${ARG1} ${ARG2} ... ${ARGN}. For example, the following command can be used to look at logs from a running Cassandra pod: kubectl exec cassandra --cat /var/log/cassandra/system.log . Additionally, the -i and -t arguments might be used to run a shell connected to the terminal: kubectl exec -i -t cassandra -- sh" - ], - "references": [ - "https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/", - "https://kubernetes.io/docs/tasks/debug/debug-application/get-shell-running-container/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - }, - { - "id": "T1609", - "name": "Container Administration Command", - "reference": "https://attack.mitre.org/techniques/T1609/" - } - ] - } - ], - "id": "f0bd64ef-cf3f-421c-bff5-b7b6c609361a", - "rule_id": "420e5bb4-93bf-40a3-8f4a-4cc1af90eca1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entry_leader.entry_meta.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entry_leader.same_as_process", - "type": "boolean", - "ecs": true - }, - { - "name": "process.interactive", - "type": "boolean", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where container.id : \"*\" and event.type== \"start\" and \n\n/* use of kubectl exec to enter a container */\nprocess.entry_leader.entry_meta.type : \"container\" and \n\n/* process is the inital process run in a container */\nprocess.entry_leader.same_as_process== true and\n\n/* interactive process */\nprocess.interactive == true\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "Potential Masquerading as VLC DLL", - "description": "Identifies instances of VLC-related DLLs which are not signed by the original developer. Attackers may name their payload as legitimate applications to blend into the environment, or embedding its malicious code within legitimate applications to deceive machine learning algorithms by incorporating authentic and benign code.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "Data Source: Elastic Defend", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Persistence", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - }, - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1554", - "name": "Compromise Client Software Binary", - "reference": "https://attack.mitre.org/techniques/T1554/" - } - ] - } - ], - "id": "2122ba75-d834-45b3-9722-66365df22d66", - "rule_id": "4494c14f-5ff8-4ed2-8e99-bf816a1642fc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "library where host.os.type == \"windows\" and event.action == \"load\" and\n dll.name : (\"libvlc.dll\", \"libvlccore.dll\", \"axvlc.dll\") and\n not (\n dll.code_signature.subject_name : (\"VideoLAN\", \"716F2E5E-A03A-486B-BC67-9B18474B9D51\")\n and dll.code_signature.trusted == true\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Permission Theft - Prevented - Elastic Endgame", - "description": "Elastic Endgame prevented Permission Theft. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/" - } - ] - } - ], - "id": "ba886660-0cf2-4c5c-9867-f61fb4aeb983", - "rule_id": "453f659e-0429-40b1-bfdb-b6957286e04b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:token_protection_event or endgame.event_subtype_full:token_protection_event)\n", - "language": "kuery" - }, - { - "name": "Sensitive Files Compression Inside A Container", - "description": "Identifies the use of a compression utility to collect known files containing sensitive information, such as credentials and system configurations inside a container.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Collection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.001", - "name": "Credentials In Files", - "reference": "https://attack.mitre.org/techniques/T1552/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1560", - "name": "Archive Collected Data", - "reference": "https://attack.mitre.org/techniques/T1560/", - "subtechnique": [ - { - "id": "T1560.001", - "name": "Archive via Utility", - "reference": "https://attack.mitre.org/techniques/T1560/001/" - } - ] - } - ] - } - ], - "id": "ba5a68d5-8e83-4efa-9c46-52718bcb84b8", - "rule_id": "475b42f0-61fb-4ef0-8a85-597458bfb0a1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where container.id: \"*\" and event.type== \"start\" and \n\n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/ \n(process.name: (\"zip\", \"tar\", \"gzip\", \"hdiutil\", \"7z\") or process.args: (\"zip\", \"tar\", \"gzip\", \"hdiutil\", \"7z\"))\nand process.args: ( \n\"/root/.ssh/id_rsa\", \n\"/root/.ssh/id_rsa.pub\", \n\"/root/.ssh/id_ed25519\", \n\"/root/.ssh/id_ed25519.pub\", \n\"/root/.ssh/authorized_keys\", \n\"/root/.ssh/authorized_keys2\", \n\"/root/.ssh/known_hosts\", \n\"/root/.bash_history\", \n\"/etc/hosts\", \n\"/home/*/.ssh/id_rsa\", \n\"/home/*/.ssh/id_rsa.pub\", \n\"/home/*/.ssh/id_ed25519\",\n\"/home/*/.ssh/id_ed25519.pub\",\n\"/home/*/.ssh/authorized_keys\",\n\"/home/*/.ssh/authorized_keys2\",\n\"/home/*/.ssh/known_hosts\",\n\"/home/*/.bash_history\",\n\"/root/.aws/credentials\",\n\"/root/.aws/config\",\n\"/home/*/.aws/credentials\",\n\"/home/*/.aws/config\",\n\"/root/.docker/config.json\",\n\"/home/*/.docker/config.json\",\n\"/etc/group\",\n\"/etc/passwd\",\n\"/etc/shadow\",\n\"/etc/gshadow\")\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "Agent Spoofing - Multiple Hosts Using Same Agent", - "description": "Detects when multiple hosts are using the same agent ID. This could occur in the event of an agent being taken over and used to inject illegitimate documents into an instance as an attempt to spoof events in order to masquerade actual activity to evade detection.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Use Case: Threat Detection", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "This is meant to run only on datasources using Elastic Agent 7.14+ since versions prior to that will be missing the necessary field, resulting in false positives." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - } - ], - "id": "1212f68c-7ad4-4dfa-ab92-c58bc8d62c1b", - "rule_id": "493834ca-f861-414c-8602-150d5505b777", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.agent_id_status", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "event.agent_id_status:*\n", - "threshold": { - "field": [ - "agent.id" - ], - "value": 2, - "cardinality": [ - { - "field": "host.id", - "value": 2 - } - ] - }, - "index": [ - "logs-*", - "metrics-*", - "traces-*" - ], - "language": "kuery" - }, - { - "name": "Microsoft 365 Exchange DKIM Signing Configuration Disabled", - "description": "Identifies when a DomainKeys Identified Mail (DKIM) signing configuration is disabled in Microsoft 365. With DKIM in Microsoft 365, messages that are sent from Exchange Online will be cryptographically signed. This will allow the receiving email system to validate that the messages were generated by a server that the organization authorized and were not spoofed.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Disabling a DKIM configuration may be done by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/set-dkimsigningconfig?view=exchange-ps" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1556", - "name": "Modify Authentication Process", - "reference": "https://attack.mitre.org/techniques/T1556/" - } - ] - } - ], - "id": "35509883-1e44-4107-a24a-1316a8387982", - "rule_id": "514121ce-c7b6-474a-8237-68ff71672379", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "o365.audit.Parameters.Enabled", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Set-DkimSigningConfig\" and o365.audit.Parameters.Enabled:False and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "GCP Logging Sink Deletion", - "description": "Identifies a Logging sink deletion in Google Cloud Platform (GCP). Every time a log entry arrives, Logging compares the log entry to the sinks in that resource. Each sink whose filter matches the log entry writes a copy of the log entry to the sink's export destination. An adversary may delete a Logging sink to evade detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Log Auditing", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Logging sink deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Logging sink deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/logging/docs/export" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "8279dea2-889b-4cf6-b7d9-d1f88065ccc8", - "rule_id": "51859fa0-d86b-4214-bf48-ebb30ed91305", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.logging.v*.ConfigServiceV*.DeleteSink and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Azure Diagnostic Settings Deletion", - "description": "Identifies the deletion of diagnostic settings in Azure, which send platform logs and metrics to different destinations. An adversary may delete diagnostic settings in an attempt to evade defenses.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Deletion of diagnostic settings may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Diagnostic settings deletion from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/azure-monitor/platform/diagnostic-settings" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "8c6d6197-caf2-42c5-b265-c142340c7db7", - "rule_id": "5370d4cd-2bb3-4d71-abf5-1e1d0ff5a2de", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.INSIGHTS/DIAGNOSTICSETTINGS/DELETE\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Binary Content Copy via Cmd.exe", - "description": "Attackers may abuse cmd.exe commands to reassemble binary fragments into a malicious payload.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1140", - "name": "Deobfuscate/Decode Files or Information", - "reference": "https://attack.mitre.org/techniques/T1140/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.003", - "name": "Windows Command Shell", - "reference": "https://attack.mitre.org/techniques/T1059/003/" - } - ] - } - ] - } - ], - "id": "f8fe2888-33f8-42f9-8abe-08cf50ceacc3", - "rule_id": "53dedd83-1be7-430f-8026-363256395c8b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"cmd.exe\" and (\n (process.args : \"type\" and process.args : (\">\", \">>\")) or\n (process.args : \"copy\" and process.args : \"/b\"))\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Windows CryptoAPI Spoofing Vulnerability (CVE-2020-0601 - CurveBall)", - "description": "A spoofing vulnerability exists in the way Windows CryptoAPI (Crypt32.dll) validates Elliptic Curve Cryptography (ECC) certificates. An attacker could exploit the vulnerability by using a spoofed code-signing certificate to sign a malicious executable, making it appear the file was from a trusted, legitimate source.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 103, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Use Case: Vulnerability" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1553", - "name": "Subvert Trust Controls", - "reference": "https://attack.mitre.org/techniques/T1553/", - "subtechnique": [ - { - "id": "T1553.002", - "name": "Code Signing", - "reference": "https://attack.mitre.org/techniques/T1553/002/" - } - ] - } - ] - } - ], - "id": "faafb7c8-6a4a-4766-b8a4-4f9365172f2a", - "rule_id": "56557cde-d923-4b88-adee-c61b3f3b5dc3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "message", - "type": "match_only_text", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.provider:\"Microsoft-Windows-Audit-CVE\" and message:\"[CVE-2020-0601]\" and host.os.type:windows\n", - "language": "kuery" - }, - { - "name": "GCP Logging Bucket Deletion", - "description": "Identifies a Logging bucket deletion in Google Cloud Platform (GCP). Log buckets are containers that store and organize log data. A deleted bucket stays in a pending state for 7 days, and Logging continues to route logs to the bucket during that time. To stop routing logs to a deleted bucket, you can delete the log sinks that have the bucket as their destination, or modify the filter for the sinks to stop it from routing logs to the deleted bucket. An adversary may delete a log bucket to evade detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Log Auditing", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Logging bucket deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Logging bucket deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/logging/docs/buckets", - "https://cloud.google.com/logging/docs/storage" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "6ae110d9-19eb-4476-a611-f2b56bc38172", - "rule_id": "5663b693-0dea-4f2e-8275-f1ae5ff2de8e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.logging.v*.ConfigServiceV*.DeleteBucket and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Credential Dumping - Detected - Elastic Endgame", - "description": "Elastic Endgame detected Credential Dumping. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame", - "Use Case: Threat Detection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "3038525f-ce07-4626-93eb-5e0c31cb72ba", - "rule_id": "571afc56-5ed9-465d-a2a9-045f099f6e7e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:cred_theft_event or endgame.event_subtype_full:cred_theft_event)\n", - "language": "kuery" - }, - { - "name": "Azure Virtual Network Device Modified or Deleted", - "description": "Identifies when a virtual network device is modified or deleted. This can be a network virtual appliance, virtual hub, or virtual router.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Network Security Monitoring", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Virtual Network Device modification or deletion may be performed by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Virtual Network Device modification or deletion by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [] - } - ], - "id": "ad5b25f7-008e-4cd3-9887-57e179064f52", - "rule_id": "573f6e7a-7acf-4bcd-ad42-c4969124d3c0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:(\"MICROSOFT.NETWORK/NETWORKINTERFACES/TAPCONFIGURATIONS/WRITE\" or\n\"MICROSOFT.NETWORK/NETWORKINTERFACES/TAPCONFIGURATIONS/DELETE\" or \"MICROSOFT.NETWORK/NETWORKINTERFACES/WRITE\" or\n\"MICROSOFT.NETWORK/NETWORKINTERFACES/JOIN/ACTION\" or \"MICROSOFT.NETWORK/NETWORKINTERFACES/DELETE\" or\n\"MICROSOFT.NETWORK/NETWORKVIRTUALAPPLIANCES/DELETE\" or \"MICROSOFT.NETWORK/NETWORKVIRTUALAPPLIANCES/WRITE\" or\n\"MICROSOFT.NETWORK/VIRTUALHUBS/DELETE\" or \"MICROSOFT.NETWORK/VIRTUALHUBS/WRITE\" or\n\"MICROSOFT.NETWORK/VIRTUALROUTERS/WRITE\" or \"MICROSOFT.NETWORK/VIRTUALROUTERS/DELETE\") and\nevent.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "PowerShell MiniDump Script", - "description": "This rule detects PowerShell scripts capable of dumping process memory using WindowsErrorReporting or Dbghelp.dll MiniDumpWriteDump. Attackers can use this tooling to dump LSASS and get access to credentials.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell MiniDump Script\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks. This makes it available for use in various environments, and creates an attractive way for attackers to execute code.\n\nAttackers can abuse Process Memory Dump capabilities to extract credentials from LSASS or to obtain other privileged information stored in the process memory.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Check if the imported function was executed and which process it targeted.\n\n### False positive analysis\n\n- Regular users do not have a business justification for using scripting utilities to dump process memory, making false positives unlikely.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "PowerShell scripts that use this capability for troubleshooting." - ], - "references": [ - "https://github.com/PowerShellMafia/PowerSploit/blob/master/Exfiltration/Out-Minidump.ps1", - "https://github.com/FuzzySecurity/PowerShell-Suite/blob/master/Get-ProcessMiniDump.ps1", - "https://github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "804ebe7d-1d39-4c20-a088-ef030ec1b743", - "rule_id": "577ec21e-56fe-4065-91d8-45eb8224fe77", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and powershell.file.script_block_text:(MiniDumpWriteDump or MiniDumpWithFullMemory or pmuDetirWpmuDiniM) and not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "File Staged in Root Folder of Recycle Bin", - "description": "Identifies files written to the root of the Recycle Bin folder instead of subdirectories. Adversaries may place files in the root of the Recycle Bin in preparation for exfiltration or to evade defenses.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1074", - "name": "Data Staged", - "reference": "https://attack.mitre.org/techniques/T1074/", - "subtechnique": [ - { - "id": "T1074.001", - "name": "Local Data Staging", - "reference": "https://attack.mitre.org/techniques/T1074/001/" - } - ] - } - ] - } - ], - "id": "1c78018f-2792-499b-913d-7fda52479b57", - "rule_id": "57bccf1d-daf5-4e1a-9049-ff79b5254704", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n file.path : \"?:\\\\$RECYCLE.BIN\\\\*\" and\n not file.path : \"?:\\\\$RECYCLE.BIN\\\\*\\\\*\" and\n not file.name : \"desktop.ini\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Zoom Meeting with no Passcode", - "description": "This rule identifies Zoom meetings that are created without a passcode. Meetings without a passcode are susceptible to Zoombombing. Zoombombing is carried out by taking advantage of Zoom sessions that are not protected with a passcode. Zoombombing refers to the unwanted, disruptive intrusion, generally by Internet trolls and hackers, into a video conference call. In a typical Zoombombing incident, a teleconferencing session is hijacked by the insertion of material that is lewd, obscene, racist, or antisemitic in nature, typically resulting of the shutdown of the session.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 101, - "tags": [ - "Data Source: Zoom", - "Use Case: Configuration Audit", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.zoom.us/a-message-to-our-users/", - "https://www.fbi.gov/contact-us/field-offices/boston/news/press-releases/fbi-warns-of-teleconferencing-and-online-classroom-hijacking-during-covid-19-pandemic" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1190", - "name": "Exploit Public-Facing Application", - "reference": "https://attack.mitre.org/techniques/T1190/" - } - ] - } - ], - "id": "5e763848-6a22-42ae-ae22-4d4ff5bf470f", - "rule_id": "58ac2aa5-6718-427c-a845-5f3ac5af00ba", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "zoom.meeting.password", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Zoom Filebeat module or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*" - ], - "query": "event.type:creation and event.module:zoom and event.dataset:zoom.webhook and\n event.action:meeting.created and not zoom.meeting.password:*\n", - "language": "kuery" - }, - { - "name": "File or Directory Deletion Command", - "description": "This rule identifies the execution of commands that can be used to delete files and directories. Adversaries may delete files and directories on a host system, such as logs, browser history, or malware.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1070", - "name": "Indicator Removal", - "reference": "https://attack.mitre.org/techniques/T1070/", - "subtechnique": [ - { - "id": "T1070.004", - "name": "File Deletion", - "reference": "https://attack.mitre.org/techniques/T1070/004/" - } - ] - } - ] - } - ], - "id": "bc2f2824-eb79-47b9-b90e-7629d73cfce5", - "rule_id": "5919988c-29e1-4908-83aa-1f087a838f63", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and \n(\n (process.name: \"rundll32.exe\" and process.args: \"*InetCpl.cpl,Clear*\") or \n (process.name: \"reg.exe\" and process.args:\"delete\") or \n (\n process.name: \"cmd.exe\" and process.args: (\"*rmdir*\", \"*rm *\", \"rm\") and\n not process.args : (\n \"*\\\\AppData\\\\Local\\\\Microsoft\\\\OneDrive\\\\*\",\n \"*\\\\AppData\\\\Local\\\\Temp\\\\DockerDesktop\\\\*\",\n \"*\\\\AppData\\\\Local\\\\Temp\\\\Report.*\",\n \"*\\\\AppData\\\\Local\\\\Temp\\\\*.PackageExtraction\"\n )\n ) or\n (process.name: \"powershell.exe\" and process.args: (\"*rmdir\", \"rm\", \"rd\", \"*Remove-Item*\", \"del\", \"*]::Delete(*\"))\n) and not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "O365 Email Reported by User as Malware or Phish", - "description": "Detects the occurrence of emails reported as Phishing or Malware by Users. Security Awareness training is essential to stay ahead of scammers and threat actors, as security products can be bypassed, and the user can still receive a malicious message. Educating users to report suspicious messages can help identify gaps in security controls and prevent malware infections and Business Email Compromise attacks.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate files reported by the users" - ], - "references": [ - "https://support.microsoft.com/en-us/office/use-the-report-message-add-in-b5caa9f1-cdf3-4443-af8c-ff724ea719d2?ui=en-us&rs=en-us&ad=us" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - }, - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - } - ], - "id": "4f009eb0-9f8b-4ce6-a643-4b5e4f72e259", - "rule_id": "5930658c-2107-4afc-91af-e0e55b7f7184", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "rule.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.action:AlertTriggered and rule.name:\"Email reported by user as malware or phish\"\n", - "language": "kuery" - }, - { - "name": "Suspicious which Enumeration", - "description": "This rule monitors for the usage of the which command with an unusual amount of process arguments. Attackers may leverage the which command to enumerate the system for useful installed utilities that may be used after compromising a system to escalate privileges or move latteraly across the network.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "f76daff3-eb4e-40e7-8730-398ae85510a0", - "rule_id": "5b18eef4-842c-4b47-970f-f08d24004bde", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"which\" and process.args_count >= 10\n\n/* potential tuning if rule would turn out to be noisy\nand process.args in (\"nmap\", \"nc\", \"ncat\", \"netcat\", nc.traditional\", \"gcc\", \"g++\", \"socat\") and \nprocess.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n*/ \n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Masquerading as Browser Process", - "description": "Identifies suspicious instances of browser processes, such as unsigned or signed with unusual certificates, that can indicate an attempt to conceal malicious activity, bypass security features such as allowlists, or trick users into executing malware.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Persistence", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - }, - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1554", - "name": "Compromise Client Software Binary", - "reference": "https://attack.mitre.org/techniques/T1554/" - } - ] - } - ], - "id": "d2e3384f-ec1c-46b9-a3ef-577b2fdefccb", - "rule_id": "5b9eb30f-87d6-45f4-9289-2bf2024f0376", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n /* Chrome Related Processes */\n (process.name : (\n \"chrome.exe\", \"GoogleUpdate.exe\", \"GoogleCrashHandler64.exe\", \"GoogleCrashHandler.exe\",\n \"GoogleUpdateComRegisterShell64.exe\", \"GoogleUpdateSetup.exe\", \"GoogleUpdateOnDemand.exe\",\n \"chrome_proxy.exe\", \"remote_assistance_host.exe\", \"remoting_native_messaging_host.exe\",\n \"GoogleUpdateBroker.exe\"\n ) and not\n (process.code_signature.subject_name : (\"Google LLC\", \"Google Inc\") and process.code_signature.trusted == true)\n and not\n (\n process.executable : (\n \"?:\\\\Program Files\\\\HP\\\\Sure Click\\\\servers\\\\chrome.exe\",\n \"?:\\\\Program Files\\\\HP\\\\Sure Click\\\\*\\\\servers\\\\chrome.exe\"\n ) and\n process.code_signature.subject_name : (\"Bromium, Inc.\") and process.code_signature.trusted == true\n ) and\n not (\n process.executable : (\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\ms-playwright\\\\chromium-*\\\\chrome-win\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Programs\\\\synthetics-recorder\\\\resources\\\\local-browsers\\\\chromium-*\\\\chrome-win\\\\chrome.exe\",\n \"*\\\\node_modules\\\\puppeteer\\\\.local-chromium\\\\win64-*\\\\chrome-win\\\\chrome.exe\",\n \"?:\\\\Program Files (x86)\\\\Invicti Professional Edition\\\\chromium\\\\chrome.exe\",\n \"?:\\\\Program Files\\\\End2End, Inc\\\\ARMS Html Engine\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\*BurpSuitePro\\\\burpbrowser\\\\*\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\*BurpSuite\\\\burpbrowser\\\\*\\\\chrome.exe\"\n ) and process.args: (\n \"--enable-features=NetworkService,NetworkServiceInProcess\",\n \"--type=crashpad-handler\", \"--enable-automation\", \"--disable-xss-auditor\"\n )\n )\n ) or\n\n /* MS Edge Related Processes */\n (process.name : (\n \"msedge.exe\", \"MicrosoftEdgeUpdate.exe\", \"identity_helper.exe\", \"msedgewebview2.exe\",\n \"MicrosoftEdgeWebview2Setup.exe\", \"MicrosoftEdge_X*.exe\", \"msedge_proxy.exe\",\n \"MicrosoftEdgeUpdateCore.exe\", \"MicrosoftEdgeUpdateBroker.exe\", \"MicrosoftEdgeUpdateSetup_X*.exe\",\n \"MicrosoftEdgeUpdateComRegisterShell64.exe\", \"msedgerecovery.exe\", \"MicrosoftEdgeUpdateSetup.exe\"\n ) and not\n (process.code_signature.subject_name : \"Microsoft Corporation\" and process.code_signature.trusted == true)\n and not\n (\n process.name : \"msedgewebview2.exe\" and\n process.code_signature.subject_name : (\"Bromium, Inc.\") and process.code_signature.trusted == true\n )\n ) or\n\n /* Brave Related Processes */\n (process.name : (\n \"brave.exe\", \"BraveUpdate.exe\", \"BraveCrashHandler64.exe\", \"BraveCrashHandler.exe\",\n \"BraveUpdateOnDemand.exe\", \"brave_vpn_helper.exe\", \"BraveUpdateSetup*.exe\",\n \"BraveUpdateComRegisterShell64.exe\"\n ) and not\n (process.code_signature.subject_name : \"Brave Software, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Firefox Related Processes */\n (process.name : (\n \"firefox.exe\", \"pingsender.exe\", \"default-browser-agent.exe\", \"maintenanceservice.exe\",\n \"plugin-container.exe\", \"maintenanceservice_tmp.exe\", \"maintenanceservice_installer.exe\",\n \"minidump-analyzer.exe\"\n ) and not\n (process.code_signature.subject_name : \"Mozilla Corporation\" and process.code_signature.trusted == true)\n and not\n (\n process.name : \"default-browser-agent.exe\" and\n process.code_signature.subject_name : (\"WATERFOX LIMITED\") and process.code_signature.trusted == true\n )\n ) or\n\n /* Island Related Processes */\n (process.name : (\n \"Island.exe\", \"IslandUpdate.exe\", \"IslandCrashHandler.exe\", \"IslandCrashHandler64.exe\",\n \"IslandUpdateBroker.exe\", \"IslandUpdateOnDemand.exe\", \"IslandUpdateComRegisterShell64.exe\",\n \"IslandUpdateSetup.exe\"\n ) and not\n (process.code_signature.subject_name : \"Island Technology Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Opera Related Processes */\n (process.name : (\n \"opera.exe\", \"opera_*.exe\", \"browser_assistant.exe\"\n ) and not\n (process.code_signature.subject_name : \"Opera Norway AS\" and process.code_signature.trusted == true)\n ) or\n\n /* Whale Related Processes */\n (process.name : (\n \"whale.exe\", \"whale_update.exe\", \"wusvc.exe\"\n ) and not\n (process.code_signature.subject_name : \"NAVER Corp.\" and process.code_signature.trusted == true)\n ) or\n\n /* Chromium-based Browsers processes */\n (process.name : (\n \"chrmstp.exe\", \"notification_helper.exe\", \"elevation_service.exe\"\n ) and not\n (process.code_signature.subject_name : (\n \"Island Technology Inc.\",\n \"Citrix Systems, Inc.\",\n \"Brave Software, Inc.\",\n \"Google LLC\",\n \"Google Inc\",\n \"Microsoft Corporation\",\n \"NAVER Corp.\",\n \"AVG Technologies USA, LLC\",\n \"Avast Software s.r.o.\"\n ) and process.code_signature.trusted == true\n )\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Meterpreter Reverse Shell", - "description": "This detection rule identifies a sample of suspicious Linux system file reads used for system fingerprinting, leveraged by the Metasploit Meterpreter shell to gather information about the target that it is executing its shell on. Detecting this pattern is indicative of a successful meterpreter shell connection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - } - ], - "id": "88b37b6e-d1e7-498a-99ab-bc0332af4309", - "rule_id": "5c895b4f-9133-4e68-9e23-59902175355c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0", - "integration": "auditd" - } - ], - "required_fields": [ - { - "name": "auditd.data.a2", - "type": "unknown", - "ecs": false - }, - { - "name": "auditd.data.syscall", - "type": "unknown", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Auditbeat integration, or Auditd Manager integration.\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n### Auditd Manager Integration Setup\nThe Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.\nAuditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.\n\n#### The following steps should be executed in order to add the Elastic Agent System integration \"auditd_manager\" on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Auditd Manager and select the integration to see more details about it.\n- Click Add Auditd Manager.\n- Configure the integration name and optionally add a description.\n- Review optional and advanced settings accordingly.\n- Add the newly installed `auditd manager` to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.\n- Click Save and Continue.\n- For more details on the integeration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).\n\n#### Rule Specific Setup Note\nAuditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.\nHowever, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n- For this detection rule the following additional audit rules are required to be added to the integration:\n -w /proc/net/ -p r -k audit_proc\n -w /etc/machine-id -p wa -k machineid\n -w /etc/passwd -p wa -k passwd\n\n", - "type": "eql", - "query": "sample by host.id, process.pid, user.id\n[file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and auditd.data.syscall == \"open\" and \n auditd.data.a2 == \"1b6\" and file.path == \"/etc/machine-id\"]\n[file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and auditd.data.syscall == \"open\" and\n auditd.data.a2 == \"1b6\" and file.path == \"/etc/passwd\"]\n[file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and auditd.data.syscall == \"open\" and \n auditd.data.a2 == \"1b6\" and file.path == \"/proc/net/route\"]\n[file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and auditd.data.syscall == \"open\" and\n auditd.data.a2 == \"1b6\" and file.path == \"/proc/net/ipv6_route\"]\n[file where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and auditd.data.syscall == \"open\" and\n auditd.data.a2 == \"1b6\" and file.path == \"/proc/net/if_inet6\"]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-auditd_manager.auditd-*" - ] - }, - { - "name": "Microsoft 365 Teams Guest Access Enabled", - "description": "Identifies when guest access is enabled in Microsoft Teams. Guest access in Teams allows people outside the organization to access teams and channels. An adversary may enable guest access to maintain persistence in an environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Teams guest access may be enabled by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/skype/get-csteamsclientconfiguration?view=skype-ps" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "18538ff3-0397-4121-bbf7-f434c89aedef", - "rule_id": "5e552599-ddec-4e14-bad1-28aa42404388", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "o365.audit.Parameters.AllowGuestUser", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:(SkypeForBusiness or MicrosoftTeams) and\nevent.category:web and event.action:\"Set-CsTeamsClientConfiguration\" and\no365.audit.Parameters.AllowGuestUser:True and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Azure Command Execution on Virtual Machine", - "description": "Identifies command execution on a virtual machine (VM) in Azure. A Virtual Machine Contributor role lets you manage virtual machines, but not access them, nor access the virtual network or storage account they’re connected to. However, commands can be run via PowerShell on the VM, which execute as System. Other roles, such as certain Administrator roles may be able to execute commands on a VM as well.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Log Auditing", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Command execution on a virtual machine may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Command execution from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://adsecurity.org/?p=4277", - "https://posts.specterops.io/attacking-azure-azure-ad-and-introducing-powerzure-ca70b330511a", - "https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#virtual-machine-contributor" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - } - ], - "id": "30dadd02-2889-45ee-a3d6-17ade53d5ee3", - "rule_id": "60884af6-f553-4a6c-af13-300047455491", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.COMPUTE/VIRTUALMACHINES/RUNCOMMAND/ACTION\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Azure Service Principal Addition", - "description": "Identifies when a new service principal is added in Azure. An application, hosted service, or automated tool that accesses or modifies resources needs an identity created. This identity is known as a service principal. For security reasons, it's always recommended to use service principals with automated tools rather than allowing them to log in with a user identity.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Azure Service Principal Addition\n\nService Principals are identities used by applications, services, and automation tools to access specific resources. They grant specific access based on the assigned API permissions. Most organizations that work a lot with Azure AD make use of service principals. Whenever an application is registered, it automatically creates an application object and a service principal in an Azure AD tenant.\n\nThis rule looks for the addition of service principals. This behavior may enable attackers to impersonate legitimate service principals to camouflage their activities among noisy automations/apps.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Consider the source IP address and geolocation for the user who issued the command. Do they look normal for the user?\n- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Examine the account's commands, API calls, and data management actions in the last 24 hours.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\nIf this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and device conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 105, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A service principal may be created by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Service principal additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/", - "https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1550", - "name": "Use Alternate Authentication Material", - "reference": "https://attack.mitre.org/techniques/T1550/", - "subtechnique": [ - { - "id": "T1550.001", - "name": "Application Access Token", - "reference": "https://attack.mitre.org/techniques/T1550/001/" - } - ] - } - ] - } - ], - "id": "39983b93-5596-4895-b2ad-d466908219db", - "rule_id": "60b6b72f-0fbc-47e7-9895-9ba7627a8b50", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Add service principal\" and event.outcome:(success or Success)\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 Exchange DLP Policy Removed", - "description": "Identifies when a Data Loss Prevention (DLP) policy is removed in Microsoft 365. An adversary may remove a DLP policy to evade existing DLP monitoring.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A DLP policy may be removed by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-dlppolicy?view=exchange-ps", - "https://docs.microsoft.com/en-us/microsoft-365/compliance/data-loss-prevention-policies?view=o365-worldwide" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "fbede1b1-298e-446b-8d1e-676c4b274491", - "rule_id": "60f3adec-1df9-4104-9c75-b97d9f078b25", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Remove-DlpPolicy\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential Non-Standard Port HTTP/HTTPS connection", - "description": "Identifies potentially malicious processes communicating via a port paring typically not associated with HTTP/HTTPS. For example, HTTP over port 8443 or port 440 as opposed to the traditional port 80 , 443. Adversaries may make changes to the standard port a protocol uses to bypass filtering or muddle analysis/parsing of network data.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1571", - "name": "Non-Standard Port", - "reference": "https://attack.mitre.org/techniques/T1571/" - }, - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/", - "subtechnique": [ - { - "id": "T1071.001", - "name": "Web Protocols", - "reference": "https://attack.mitre.org/techniques/T1071/001/" - } - ] - }, - { - "id": "T1573", - "name": "Encrypted Channel", - "reference": "https://attack.mitre.org/techniques/T1573/", - "subtechnique": [ - { - "id": "T1573.001", - "name": "Symmetric Cryptography", - "reference": "https://attack.mitre.org/techniques/T1573/001/" - }, - { - "id": "T1573.002", - "name": "Asymmetric Cryptography", - "reference": "https://attack.mitre.org/techniques/T1573/002/" - } - ] - } - ] - } - ], - "id": "09a22460-2ee7-4796-b806-29280427e27d", - "rule_id": "62b68eb2-1e47-4da7-85b6-8f478db5b272", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "network where process.name : (\"http\", \"https\")\n and destination.port not in (80, 443)\n and event.action in (\"connection_attempted\", \"connection_accepted\")\n and destination.ip != \"127.0.0.1\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Kubernetes Suspicious Assignment of Controller Service Account", - "description": "This rule detects a request to attach a controller service account to an existing or new pod running in the kube-system namespace. By default, controllers running as part of the API Server utilize admin-equivalent service accounts hosted in the kube-system namespace. Controller service accounts aren't normally assigned to running pods and could indicate adversary behavior within the cluster. An attacker that can create or modify pods or pod controllers in the kube-system namespace, can assign one of these admin-equivalent service accounts to a pod and abuse their powerful token to escalate privileges and gain complete cluster control.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 5, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Execution", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Controller service accounts aren't normally assigned to running pods, this is abnormal behavior with very few legitimate use-cases and should result in very few false positives." - ], - "references": [ - "https://www.paloaltonetworks.com/apps/pan/public/downloadResource?pagePath=/content/pan/en_US/resources/whitepapers/kubernetes-privilege-escalation-excessive-permissions-in-popular-platforms" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.001", - "name": "Default Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/001/" - } - ] - } - ] - } - ], - "id": "05d9b22a-71c1-4fcd-8603-fa4767be4367", - "rule_id": "63c05204-339a-11ed-a261-0242ac120002", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.namespace", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.resource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.serviceAccountName", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.verb", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.verb : \"create\"\n and kubernetes.audit.objectRef.resource : \"pods\"\n and kubernetes.audit.objectRef.namespace : \"kube-system\"\n and kubernetes.audit.requestObject.spec.serviceAccountName:*controller\n", - "language": "kuery" - }, - { - "name": "Kubernetes Denied Service Account Request", - "description": "This rule detects when a service account makes an unauthorized request for resources from the API server. Service accounts follow a very predictable pattern of behavior. A service account should never send an unauthorized request to the API server. This behavior is likely an indicator of compromise or of a problem within the cluster. An adversary may have gained access to credentials/tokens and this could be an attempt to access or create resources to facilitate further movement or execution within the cluster.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 4, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Discovery" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Unauthorized requests from service accounts are highly abnormal and more indicative of human behavior or a serious problem within the cluster. This behavior should be investigated further." - ], - "references": [ - "https://research.nccgroup.com/2021/11/10/detection-engineering-for-kubernetes-clusters/#part3-kubernetes-detections", - "https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1613", - "name": "Container and Resource Discovery", - "reference": "https://attack.mitre.org/techniques/T1613/" - } - ] - } - ], - "id": "05ef5ef4-1520-4395-8dc0-22019a9a496e", - "rule_id": "63c056a0-339a-11ed-a261-0242ac120002", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.user.username", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset: \"kubernetes.audit_logs\"\n and kubernetes.audit.user.username: system\\:serviceaccount\\:*\n and kubernetes.audit.annotations.authorization_k8s_io/decision: \"forbid\"\n", - "language": "kuery" - }, - { - "name": "Network Connection via Recently Compiled Executable", - "description": "This rule monitors a sequence involving a program compilation event followed by its execution and a subsequent network connection event. This behavior can indicate the set up of a reverse tcp connection to a command-and-control server. Attackers may spawn reverse shells to establish persistence onto a target system.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - } - ], - "id": "bbe6dbec-ab32-430f-8dbd-3e03de812c9f", - "rule_id": "64cfca9e-0f6f-4048-8251-9ec56a055e9e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id with maxspan=1m\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name in (\"gcc\", \"g++\", \"cc\")] by process.args\n [file where host.os.type == \"linux\" and event.action == \"creation\" and process.name == \"ld\"] by file.name\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\"] by process.name\n [network where host.os.type == \"linux\" and event.action == \"connection_attempted\"] by process.name\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Kubernetes Exposed Service Created With Type NodePort", - "description": "This rule detects an attempt to create or modify a service as type NodePort. The NodePort service allows a user to externally expose a set of labeled pods to the internet. This creates an open port on every worker node in the cluster that has a pod for that service. When external traffic is received on that open port, it directs it to the specific pod through the service representing it. A malicious user can configure a service as type Nodeport in order to intercept traffic from other pods or nodes, bypassing firewalls and other network security measures configured for load balancers within a cluster. This creates a direct method of communication between the cluster and the outside world, which could be used for more malicious behavior and certainly widens the attack surface of your cluster.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 202, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Execution", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Developers may have a legitimate use for NodePorts. For frontend parts of an application you may want to expose a Service onto an external IP address without using cloud specific Loadbalancers. NodePort can be used to expose the Service on each Node's IP at a static port (the NodePort). You'll be able to contact the NodePort Service from outside the cluster, by requesting :. NodePort unlike Loadbalancers, allow the freedom to set up your own load balancing solution, configure environments that aren't fully supported by Kubernetes, or even to expose one or more node's IPs directly." - ], - "references": [ - "https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", - "https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", - "https://www.tigera.io/blog/new-vulnerability-exposes-kubernetes-to-man-in-the-middle-attacks-heres-how-to-mitigate/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1133", - "name": "External Remote Services", - "reference": "https://attack.mitre.org/techniques/T1133/" - } - ] - } - ], - "id": "ed3bc33b-506d-4613-8ff5-38adf6533635", - "rule_id": "65f9bccd-510b-40df-8263-334f03174fed", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.resource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.type", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.verb", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:\"services\"\n and kubernetes.audit.verb:(\"create\" or \"update\" or \"patch\")\n and kubernetes.audit.requestObject.spec.type:\"NodePort\"\n", - "language": "kuery" - }, - { - "name": "O365 Mailbox Audit Logging Bypass", - "description": "Detects the occurrence of mailbox audit bypass associations. The mailbox audit is responsible for logging specified mailbox events (like accessing a folder or a message or permanently deleting a message). However, actions taken by some authorized accounts, such as accounts used by third-party tools or accounts used for lawful monitoring, can create a large number of mailbox audit log entries and may not be of interest to your organization. Because of this, administrators can create bypass associations, allowing certain accounts to perform their tasks without being logged. Attackers can abuse this allowlist mechanism to conceal actions taken, as the mailbox audit will log no activity done by the account.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Tactic: Initial Access", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate allowlisting of noisy accounts" - ], - "references": [ - "https://twitter.com/misconfig/status/1476144066807140355" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "a60b0fce-bec4-4f60-9329-42dc267a91e4", - "rule_id": "675239ea-c1bc-4467-a6d3-b9e2cc7f676d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.action:Set-MailboxAuditBypassAssociation and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "New or Modified Federation Domain", - "description": "Identifies a new or modified federation domain, which can be used to create a trust between O365 and an external identity provider.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Identity and Access Audit", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-accepteddomain?view=exchange-ps", - "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-federateddomain?view=exchange-ps", - "https://docs.microsoft.com/en-us/powershell/module/exchange/new-accepteddomain?view=exchange-ps", - "https://docs.microsoft.com/en-us/powershell/module/exchange/add-federateddomain?view=exchange-ps", - "https://docs.microsoft.com/en-us/powershell/module/exchange/set-accepteddomain?view=exchange-ps", - "https://docs.microsoft.com/en-us/powershell/module/msonline/set-msoldomainfederationsettings?view=azureadps-1.0" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1484", - "name": "Domain Policy Modification", - "reference": "https://attack.mitre.org/techniques/T1484/", - "subtechnique": [ - { - "id": "T1484.002", - "name": "Domain Trust Modification", - "reference": "https://attack.mitre.org/techniques/T1484/002/" - } - ] - } - ] - } - ], - "id": "988119a3-634e-4332-9359-7093f76e65c5", - "rule_id": "684554fc-0777-47ce-8c9b-3d01f198d7f8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:(\"Set-AcceptedDomain\" or\n\"Set-MsolDomainFederationSettings\" or \"Add-FederatedDomain\" or \"New-AcceptedDomain\" or \"Remove-AcceptedDomain\" or \"Remove-FederatedDomain\") and\nevent.outcome:success\n", - "language": "kuery" - }, - { - "name": "Suspicious Utility Launched via ProxyChains", - "description": "This rule monitors for the execution of suspicious linux tools through ProxyChains. ProxyChains is a command-line tool that enables the routing of network connections through intermediary proxies, enhancing anonymity and enabling access to restricted resources. Attackers can exploit the ProxyChains utility to hide their true source IP address, evade detection, and perform malicious activities through a chain of proxy servers, potentially masking their identity and intentions.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - } - ], - "id": "18f5e6ce-eef1-473f-acaa-3ffaea9d86d1", - "rule_id": "6ace94ba-f02c-4d55-9f53-87d99b6f9af4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"proxychains\" and process.args : (\n \"ssh\", \"sshd\", \"sshuttle\", \"socat\", \"iodine\", \"iodined\", \"dnscat\", \"hans\", \"hans-ubuntu\", \"ptunnel-ng\",\n \"ssf\", \"3proxy\", \"ngrok\", \"gost\", \"pivotnacci\", \"chisel*\", \"nmap\", \"ping\", \"python*\", \"php*\", \"perl\", \"ruby\",\n \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\", \"java\", \"telnet\", \"ftp\", \"curl\", \"wget\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Container Management Utility Run Inside A Container", - "description": "This rule detects when a container management binary is run from inside a container. These binaries are critical components of many containerized environments, and their presence and execution in unauthorized containers could indicate compromise or a misconfiguration.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic Licence v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "There is a potential for false positives if the container is used for legitimate administrative tasks that require the use of container management utilities, such as deploying, scaling, or updating containerized applications. It is important to investigate any alerts generated by this rule to determine if they are indicative of malicious activity or part of legitimate container activity." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1609", - "name": "Container Administration Command", - "reference": "https://attack.mitre.org/techniques/T1609/" - } - ] - } - ], - "id": "8ddf1b45-b10f-4cca-ac9c-650bfe59b457", - "rule_id": "6c6bb7ea-0636-44ca-b541-201478ef6b50", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where container.id: \"*\" and event.type== \"start\" \n and process.name: (\"dockerd\", \"docker\", \"kubelet\", \"kube-proxy\", \"kubectl\", \"containerd\", \"runc\", \"systemd\", \"crictl\")\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "Potential Privilege Escalation via CVE-2023-4911", - "description": "This rule detects potential privilege escalation attempts through Looney Tunables (CVE-2023-4911). Looney Tunables is a buffer overflow vulnerability in GNU C Library's dynamic loader's processing of the GLIBC_TUNABLES environment variable.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Use Case: Vulnerability", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.qualys.com/vulnerabilities-threat-research/2023/10/03/cve-2023-4911-looney-tunables-local-privilege-escalation-in-the-glibcs-ld-so" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "10ae2076-2e87-432b-8772-8dab43af88d9", - "rule_id": "6d8685a1-94fa-4ef7-83de-59302e7c4ca8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.env_vars", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\nElastic Defend integration does not collect environment variable logging by default.\nIn order to capture this behavior, this rule requires a specific configuration option set within the advanced settings of the Elastic Defend integration.\n #### To set up environment variable capture for an Elastic Agent policy:\n- Go to Security → Manage → Policies.\n- Select an Elastic Agent policy.\n- Click Show advanced settings.\n- Scroll down or search for linux.advanced.capture_env_vars.\n- Enter the names of env vars you want to capture, separated by commas.\n- For this rule the linux.advanced.capture_env_vars variable should be set to \"GLIBC_TUNABLES\".\n- Click Save.\nAfter saving the integration change, the Elastic Agents running this policy will be updated and\nthe rule will function properly.\nFor more information on capturing environment variables refer the [helper guide](https://www.elastic.co/guide/en/security/current/environment-variable-capture.html).\n\n", - "type": "eql", - "query": "sequence by host.id, process.parent.entity_id, process.executable with maxspan=5s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.env_vars : \"*GLIBC_TUNABLES=glibc.*=glibc.*=*\"] with runs=5\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Linux Tunneling and/or Port Forwarding", - "description": "This rule monitors for a set of Linux utilities that can be used for tunneling and port forwarding. Attackers can leverage tunneling and port forwarding techniques to bypass network defenses, establish hidden communication channels, and gain unauthorized access to internal resources, facilitating data exfiltration, lateral movement, and remote control.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform", - "https://book.hacktricks.xyz/generic-methodologies-and-resources/tunneling-and-port-forwarding" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - } - ], - "id": "7f252889-6f57-4149-98a2-d3476aef4355", - "rule_id": "6ee947e9-de7e-4281-a55d-09289bdf947e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and ((\n // gost & pivotnacci - spawned without process.parent.name\n (process.name == \"gost\" and process.args : (\"-L*\", \"-C*\", \"-R*\")) or (process.name == \"pivotnacci\")) or (\n // ssh\n (process.name in (\"ssh\", \"sshd\") and (process.args in (\"-R\", \"-L\", \"D\", \"-w\") and process.args_count >= 4 and \n not process.args : \"chmod\")) or\n // sshuttle\n (process.name == \"sshuttle\" and process.args in (\"-r\", \"--remote\", \"-l\", \"--listen\") and process.args_count >= 4) or\n // socat\n (process.name == \"socat\" and process.args : (\"TCP4-LISTEN:*\", \"SOCKS*\") and process.args_count >= 3) or\n // chisel\n (process.name : \"chisel*\" and process.args in (\"client\", \"server\")) or\n // iodine(d), dnscat, hans, ptunnel-ng, ssf, 3proxy & ngrok \n (process.name in (\"iodine\", \"iodined\", \"dnscat\", \"hans\", \"hans-ubuntu\", \"ptunnel-ng\", \"ssf\", \"3proxy\", \"ngrok\"))\n ) and process.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Kubernetes Container Created with Excessive Linux Capabilities", - "description": "This rule detects a container deployed with one or more dangerously permissive Linux capabilities. An attacker with the ability to deploy a container with added capabilities could use this for further execution, lateral movement, or privilege escalation within a cluster. The capabilities detected in this rule have been used in container escapes to the host machine.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Kubernetes Container Created with Excessive Linux Capabilities\n\nLinux capabilities were designed to divide root privileges into smaller units. Each capability grants a thread just enough power to perform specific privileged tasks. In Kubernetes, containers are given a set of default capabilities that can be dropped or added to at the time of creation. Added capabilities entitle containers in a pod with additional privileges that can be used to change\ncore processes, change network settings of a cluster, or directly access the underlying host. The following have been used in container escape techniques:\n\nBPF - Allow creating BPF maps, loading BPF Type Format (BTF) data, retrieve JITed code of BPF programs, and more.\nDAC_READ_SEARCH - Bypass file read permission checks and directory read and execute permission checks.\nNET_ADMIN - Perform various network-related operations.\nSYS_ADMIN - Perform a range of system administration operations.\nSYS_BOOT - Use reboot(2) and kexec_load(2), reboot and load a new kernel for later execution.\nSYS_MODULE - Load and unload kernel modules.\nSYS_PTRACE - Trace arbitrary processes using ptrace(2).\nSYS_RAWIO - Perform I/O port operations (iopl(2) and ioperm(2)).\nSYSLOG - Perform privileged syslog(2) operations.\n\n### False positive analysis\n\n- While these capabilities are not included by default in containers, some legitimate images may need to add them. This rule leaves space for the exception of trusted container images. To add an exception, add the trusted container image name to the query field, kubernetes.audit.requestObject.spec.containers.image.", - "version": 3, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Execution", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Some container images require the addition of privileged capabilities. This rule leaves space for the exception of trusted container images. To add an exception, add the trusted container image name to the query field, kubernetes.audit.requestObject.spec.containers.image." - ], - "references": [ - "https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container", - "https://0xn3va.gitbook.io/cheat-sheets/container/escaping/excessive-capabilities", - "https://man7.org/linux/man-pages/man7/capabilities.7.html", - "https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1611", - "name": "Escape to Host", - "reference": "https://attack.mitre.org/techniques/T1611/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1610", - "name": "Deploy Container", - "reference": "https://attack.mitre.org/techniques/T1610/" - } - ] - } - ], - "id": "3db02ac5-0a63-4214-94c2-5c500859a9c8", - "rule_id": "7164081a-3930-11ed-a261-0242ac120002", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.resource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.containers.image", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.containers.securityContext.capabilities.add", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.verb", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset: kubernetes.audit_logs\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.verb: create\n and kubernetes.audit.objectRef.resource: pods\n and kubernetes.audit.requestObject.spec.containers.securityContext.capabilities.add: (\"BPF\" or \"DAC_READ_SEARCH\" or \"NET_ADMIN\" or \"SYS_ADMIN\" or \"SYS_BOOT\" or \"SYS_MODULE\" or \"SYS_PTRACE\" or \"SYS_RAWIO\" or \"SYSLOG\")\n and not kubernetes.audit.requestObject.spec.containers.image : (\"docker.elastic.co/beats/elastic-agent:8.4.0\" or \"rancher/klipper-lb:v0.3.5\" or \"\")\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 Potential ransomware activity", - "description": "Identifies when Microsoft Cloud App Security reports that a user has uploaded files to the cloud that might be infected with ransomware.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "If Cloud App Security identifies, for example, a high rate of file uploads or file deletion activities it may represent an adverse encryption process." - ], - "references": [ - "https://docs.microsoft.com/en-us/cloud-app-security/anomaly-detection-policy", - "https://docs.microsoft.com/en-us/cloud-app-security/policy-template-reference" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1486", - "name": "Data Encrypted for Impact", - "reference": "https://attack.mitre.org/techniques/T1486/" - } - ] - } - ], - "id": "088e4351-b81e-495c-a8c9-796bb58335ef", - "rule_id": "721999d0-7ab2-44bf-b328-6e63367b9b29", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.category:web and event.action:\"Potential ransomware activity\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Web Application Suspicious Activity: Unauthorized Method", - "description": "A request to a web application returned a 405 response, which indicates the web application declined to process the request because the HTTP method is not allowed for the resource.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 102, - "tags": [ - "Data Source: APM" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Security scans and tests may result in these errors. Misconfigured or buggy applications may produce large numbers of these errors. If the source is unexpected, the user unauthorized, or the request unusual, these may indicate suspicious or malicious activity." - ], - "references": [ - "https://en.wikipedia.org/wiki/HTTP_405" - ], - "max_signals": 100, - "threat": [], - "id": "3bf00785-9b07-496e-ab12-4a5b84384156", - "rule_id": "75ee75d8-c180-481c-ba88-ee50129a6aef", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "apm", - "version": "^8.0.0" - } - ], - "required_fields": [ - { - "name": "http.response.status_code", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "apm-*-transaction*", - "traces-apm*" - ], - "query": "http.response.status_code:405\n", - "language": "kuery" - }, - { - "name": "Kubernetes Pod Created With HostIPC", - "description": "This rule detects an attempt to create or modify a pod using the host IPC namespace. This gives access to data used by any pod that also use the hosts IPC namespace. If any process on the host or any processes in a pod uses the hosts inter-process communication mechanisms (shared memory, semaphore arrays, message queues, etc.), an attacker can read/write to those same mechanisms. They may look for files in /dev/shm or use ipcs to check for any IPC facilities being used.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 202, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Execution", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "An administrator or developer may want to use a pod that runs as root and shares the host's IPC, Network, and PID namespaces for debugging purposes. If something is going wrong in the cluster and there is no easy way to SSH onto the host nodes directly, a privileged pod of this nature can be useful for viewing things like iptable rules and network namespaces from the host's perspective. Add exceptions for trusted container images using the query field \"kubernetes.audit.requestObject.spec.container.image\"" - ], - "references": [ - "https://research.nccgroup.com/2021/11/10/detection-engineering-for-kubernetes-clusters/#part3-kubernetes-detections", - "https://kubernetes.io/docs/concepts/security/pod-security-policy/#host-namespaces", - "https://bishopfox.com/blog/kubernetes-pod-privilege-escalation" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1611", - "name": "Escape to Host", - "reference": "https://attack.mitre.org/techniques/T1611/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1610", - "name": "Deploy Container", - "reference": "https://attack.mitre.org/techniques/T1610/" - } - ] - } - ], - "id": "39ccf44b-a9dc-4d92-a902-f07996d5a905", - "rule_id": "764c8437-a581-4537-8060-1fdb0e92c92d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.resource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.containers.image", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.hostIPC", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.verb", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:\"pods\"\n and kubernetes.audit.verb:(\"create\" or \"update\" or \"patch\")\n and kubernetes.audit.requestObject.spec.hostIPC:true\n and not kubernetes.audit.requestObject.spec.containers.image: (\"docker.elastic.co/beats/elastic-agent:8.4.0\")\n", - "language": "kuery" - }, - { - "name": "Privilege Escalation via Rogue Named Pipe Impersonation", - "description": "Identifies a privilege escalation attempt via rogue named pipe impersonation. An adversary may abuse this technique by masquerading as a known named pipe and manipulating a privileged process to connect to it.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "Named Pipe Creation Events need to be enabled within the Sysmon configuration by including the following settings:\n`condition equal \"contains\" and keyword equal \"pipe\"`\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://itm4n.github.io/printspoofer-abusing-impersonate-privileges/", - "https://github.com/zcgonvh/EfsPotato", - "https://twitter.com/SBousseaden/status/1429530155291193354" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/" - } - ] - } - ], - "id": "0732ee42-dfec-437a-8159-47b3b58cf025", - "rule_id": "76ddb638-abf7-42d5-be22-4a70b0bf7241", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "Named Pipe Creation Events need to be enabled within the Sysmon configuration by including the following settings:\n`condition equal "contains" and keyword equal "pipe"`\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.action : \"Pipe Created*\" and\n /* normal sysmon named pipe creation events truncate the pipe keyword */\n file.name : \"\\\\*\\\\Pipe\\\\*\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "User Added as Owner for Azure Application", - "description": "Identifies when a user is added as an owner for an Azure application. An adversary may add a user account as an owner for an Azure application in order to grant additional permissions and modify the application's configuration using another account.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Configuration Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "98eee84a-4d8a-462e-ae01-cf1f77a1648d", - "rule_id": "774f5e28-7b75-4a58-b94e-41bf060fdd86", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Add owner to application\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Adversary Behavior - Detected - Elastic Endgame", - "description": "Elastic Endgame detected an Adversary Behavior. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 102, - "tags": [ - "Data Source: Elastic Endgame" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [], - "id": "889922ee-5118-4894-8ad8-13aeb01b5c4e", - "rule_id": "77a3c3df-8ec4-4da4-b758-878f551dee69", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and (event.action:behavior_protection_event or endgame.event_subtype_full:behavior_protection_event)\n", - "language": "kuery" - }, - { - "name": "Azure Privilege Identity Management Role Modified", - "description": "Azure Active Directory (AD) Privileged Identity Management (PIM) is a service that enables you to manage, control, and monitor access to important resources in an organization. PIM can be used to manage the built-in Azure resource roles such as Global Administrator and Application Administrator. An adversary may add a user to a PIM role in order to maintain persistence in their target's environment or modify a PIM role to weaken their target's security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Azure Privilege Identity Management Role Modified\n\nAzure Active Directory (AD) Privileged Identity Management (PIM) is a service that enables you to manage, control, and monitor access to important resources in an organization. PIM can be used to manage the built-in Azure resource roles such as Global Administrator and Application Administrator.\n\nThis rule identifies the update of PIM role settings, which can indicate that an attacker has already gained enough access to modify role assignment settings.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Consider the source IP address and geolocation for the user who issued the command. Do they look normal for the user?\n- Consider the time of day. If the user is a human, not a program or script, did the activity take place during a normal time of day?\n- Check if this operation was approved and performed according to the organization's change management policy.\n- Contact the account owner and confirm whether they are aware of this activity.\n- Examine the account's commands, API calls, and data management actions in the last 24 hours.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this activity didn't follow your organization's change management policies, it should be reviewed by the security team.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Restore the PIM roles to the desired state.\n- Consider enabling multi-factor authentication for users.\n- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 105, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/pim-resource-roles-assign-roles", - "https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/pim-configure" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "49fb6dc0-6637-4d1f-99d8-0ed9fd718bce", - "rule_id": "7882cebf-6cf1-4de3-9662-213aa13e8b80", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Update role setting in PIM\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Azure Key Vault Modified", - "description": "Identifies modifications to a Key Vault in Azure. The Key Vault is a service that safeguards encryption keys and secrets like certificates, connection strings, and passwords. Because this data is sensitive and business critical, access to key vaults should be secured to allow only authorized applications and users.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 103, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Key vault modifications may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Key vault modifications from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/key-vault/general/basic-concepts", - "https://docs.microsoft.com/en-us/azure/key-vault/general/secure-your-key-vault", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.001", - "name": "Credentials In Files", - "reference": "https://attack.mitre.org/techniques/T1552/001/" - } - ] - } - ] - } - ], - "id": "1186df76-5709-43c1-b487-9bccc3dd626f", - "rule_id": "792dd7a6-7e00-4a0a-8a9a-a7c24720b5ec", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.KEYVAULT/VAULTS/WRITE\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Potential Masquerading as System32 Executable", - "description": "Identifies suspicious instances of default system32 executables, either unsigned or signed with non-MS certificates. This could indicate the attempt to masquerade as system executables or backdoored and resigned legitimate executables.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "Data Source: Elastic Defend", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Persistence", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - }, - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1554", - "name": "Compromise Client Software Binary", - "reference": "https://attack.mitre.org/techniques/T1554/" - } - ] - } - ], - "id": "2714c730-9e22-4b9a-b67f-5d83d216857a", - "rule_id": "79ce2c96-72f7-44f9-88ef-60fa1ac2ce47", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and process.code_signature.status : \"*\" and\n process.name: (\n \"agentactivationruntimestarter.exe\", \"agentservice.exe\", \"aitstatic.exe\", \"alg.exe\", \"apphostregistrationverifier.exe\", \"appidcertstorecheck.exe\", \"appidpolicyconverter.exe\", \"appidtel.exe\", \"applicationframehost.exe\", \"applysettingstemplatecatalog.exe\", \"applytrustoffline.exe\", \"approvechildrequest.exe\", \"appvclient.exe\", \"appvdllsurrogate.exe\", \"appvnice.exe\", \"appvshnotify.exe\", \"arp.exe\", \"assignedaccessguard.exe\", \"at.exe\", \"atbroker.exe\", \"attrib.exe\", \"audiodg.exe\", \"auditpol.exe\", \"authhost.exe\", \"autochk.exe\", \"autoconv.exe\", \"autofmt.exe\", \"axinstui.exe\", \"baaupdate.exe\", \"backgroundtaskhost.exe\", \"backgroundtransferhost.exe\", \"bcdboot.exe\", \"bcdedit.exe\", \"bdechangepin.exe\", \"bdehdcfg.exe\", \"bdeuisrv.exe\", \"bdeunlock.exe\", \"bioiso.exe\", \"bitlockerdeviceencryption.exe\", \"bitlockerwizard.exe\", \"bitlockerwizardelev.exe\", \"bitsadmin.exe\", \"bootcfg.exe\", \"bootim.exe\", \"bootsect.exe\", \"bridgeunattend.exe\", \"browserexport.exe\", \"browser_broker.exe\", \"bthudtask.exe\", \"bytecodegenerator.exe\", \"cacls.exe\", \"calc.exe\", \"camerasettingsuihost.exe\", \"castsrv.exe\", \"certenrollctrl.exe\", \"certreq.exe\", \"certutil.exe\", \"change.exe\", \"changepk.exe\", \"charmap.exe\", \"checknetisolation.exe\", \"chglogon.exe\", \"chgport.exe\", \"chgusr.exe\", \"chkdsk.exe\", \"chkntfs.exe\", \"choice.exe\", \"cidiag.exe\", \"cipher.exe\", \"cleanmgr.exe\", \"cliconfg.exe\", \"clip.exe\", \"clipup.exe\", \"cloudexperiencehostbroker.exe\", \"cloudnotifications.exe\", \"cmd.exe\", \"cmdkey.exe\", \"cmdl32.exe\", \"cmmon32.exe\", \"cmstp.exe\", \"cofire.exe\", \"colorcpl.exe\", \"comp.exe\", \"compact.exe\", \"compattelrunner.exe\", \"compmgmtlauncher.exe\", \"comppkgsrv.exe\", \"computerdefaults.exe\", \"conhost.exe\", \"consent.exe\", \"control.exe\", \"convert.exe\", \"convertvhd.exe\", \"coredpussvr.exe\", \"credentialenrollmentmanager.exe\", \"credentialuibroker.exe\", \"credwiz.exe\", \"cscript.exe\", \"csrss.exe\", \"ctfmon.exe\", \"cttune.exe\", \"cttunesvr.exe\", \"custominstallexec.exe\", \"customshellhost.exe\", \"dashost.exe\", \"dataexchangehost.exe\", \"datastorecachedumptool.exe\", \"dccw.exe\", \"dcomcnfg.exe\", \"ddodiag.exe\", \"defrag.exe\", \"deploymentcsphelper.exe\", \"desktopimgdownldr.exe\", \"devicecensus.exe\", \"devicecredentialdeployment.exe\", \"deviceeject.exe\", \"deviceenroller.exe\", \"devicepairingwizard.exe\", \"deviceproperties.exe\", \"dfdwiz.exe\", \"dfrgui.exe\", \"dialer.exe\", \"directxdatabaseupdater.exe\", \"diskpart.exe\", \"diskperf.exe\", \"diskraid.exe\", \"disksnapshot.exe\", \"dism.exe\", \"dispdiag.exe\", \"displayswitch.exe\", \"djoin.exe\", \"dllhost.exe\", \"dllhst3g.exe\", \"dmcertinst.exe\", \"dmcfghost.exe\", \"dmclient.exe\", \"dmnotificationbroker.exe\", \"dmomacpmo.exe\", \"dnscacheugc.exe\", \"doskey.exe\", \"dpapimig.exe\", \"dpiscaling.exe\", \"dpnsvr.exe\", \"driverquery.exe\", \"drvinst.exe\", \"dsmusertask.exe\", \"dsregcmd.exe\", \"dstokenclean.exe\", \"dusmtask.exe\", \"dvdplay.exe\", \"dwm.exe\", \"dwwin.exe\", \"dxdiag.exe\", \"dxgiadaptercache.exe\", \"dxpserver.exe\", \"eap3host.exe\", \"easeofaccessdialog.exe\", \"easinvoker.exe\", \"easpolicymanagerbrokerhost.exe\", \"edpcleanup.exe\", \"edpnotify.exe\", \"eduprintprov.exe\", \"efsui.exe\", \"ehstorauthn.exe\", \"eoaexperiences.exe\", \"esentutl.exe\", \"eudcedit.exe\", \"eventcreate.exe\", \"eventvwr.exe\", \"expand.exe\", \"extrac32.exe\", \"fc.exe\", \"fclip.exe\", \"fhmanagew.exe\", \"filehistory.exe\", \"find.exe\", \"findstr.exe\", \"finger.exe\", \"fixmapi.exe\", \"fltmc.exe\", \"fodhelper.exe\", \"fondue.exe\", \"fontdrvhost.exe\", \"fontview.exe\", \"forfiles.exe\", \"fsavailux.exe\", \"fsiso.exe\", \"fsquirt.exe\", \"fsutil.exe\", \"ftp.exe\", \"fvenotify.exe\", \"fveprompt.exe\", \"gamebarpresencewriter.exe\", \"gamepanel.exe\", \"genvalobj.exe\", \"getmac.exe\", \"gpresult.exe\", \"gpscript.exe\", \"gpupdate.exe\", \"grpconv.exe\", \"hdwwiz.exe\", \"help.exe\", \"hostname.exe\", \"hvax64.exe\", \"hvix64.exe\", \"hvsievaluator.exe\", \"icacls.exe\", \"icsentitlementhost.exe\", \"icsunattend.exe\", \"ie4uinit.exe\", \"ie4ushowie.exe\", \"iesettingsync.exe\", \"ieunatt.exe\", \"iexpress.exe\", \"immersivetpmvscmgrsvr.exe\", \"infdefaultinstall.exe\", \"inputswitchtoasthandler.exe\", \"iotstartup.exe\", \"ipconfig.exe\", \"iscsicli.exe\", \"iscsicpl.exe\", \"isoburn.exe\", \"klist.exe\", \"ksetup.exe\", \"ktmutil.exe\", \"label.exe\", \"languagecomponentsinstallercomhandler.exe\", \"launchtm.exe\", \"launchwinapp.exe\", \"legacynetuxhost.exe\", \"licensemanagershellext.exe\", \"licensingdiag.exe\", \"licensingui.exe\", \"locationnotificationwindows.exe\", \"locator.exe\", \"lockapphost.exe\", \"lockscreencontentserver.exe\", \"lodctr.exe\", \"logagent.exe\", \"logman.exe\", \"logoff.exe\", \"logonui.exe\", \"lpkinstall.exe\", \"lpksetup.exe\", \"lpremove.exe\", \"lsaiso.exe\", \"lsass.exe\", \"magnify.exe\", \"makecab.exe\", \"manage-bde.exe\", \"mavinject.exe\", \"mbaeparsertask.exe\", \"mblctr.exe\", \"mbr2gpt.exe\", \"mcbuilder.exe\", \"mdeserver.exe\", \"mdmagent.exe\", \"mdmappinstaller.exe\", \"mdmdiagnosticstool.exe\", \"mdres.exe\", \"mdsched.exe\", \"mfpmp.exe\", \"microsoft.uev.cscunpintool.exe\", \"microsoft.uev.synccontroller.exe\", \"microsoftedgebchost.exe\", \"microsoftedgecp.exe\", \"microsoftedgedevtools.exe\", \"microsoftedgesh.exe\", \"mmc.exe\", \"mmgaserver.exe\", \"mobsync.exe\", \"mountvol.exe\", \"mousocoreworker.exe\", \"mpnotify.exe\", \"mpsigstub.exe\", \"mrinfo.exe\", \"mschedexe.exe\", \"msconfig.exe\", \"msdt.exe\", \"msdtc.exe\", \"msfeedssync.exe\", \"msg.exe\", \"mshta.exe\", \"msiexec.exe\", \"msinfo32.exe\", \"mspaint.exe\", \"msra.exe\", \"msspellcheckinghost.exe\", \"mstsc.exe\", \"mtstocom.exe\", \"muiunattend.exe\", \"multidigimon.exe\", \"musnotification.exe\", \"musnotificationux.exe\", \"musnotifyicon.exe\", \"narrator.exe\", \"nbtstat.exe\", \"ndadmin.exe\", \"ndkping.exe\", \"net.exe\", \"net1.exe\", \"netbtugc.exe\", \"netcfg.exe\", \"netcfgnotifyobjecthost.exe\", \"netevtfwdr.exe\", \"nethost.exe\", \"netiougc.exe\", \"netplwiz.exe\", \"netsh.exe\", \"netstat.exe\", \"newdev.exe\", \"ngciso.exe\", \"nltest.exe\", \"notepad.exe\", \"nslookup.exe\", \"ntoskrnl.exe\", \"ntprint.exe\", \"odbcad32.exe\", \"odbcconf.exe\", \"ofdeploy.exe\", \"omadmclient.exe\", \"omadmprc.exe\", \"openfiles.exe\", \"openwith.exe\", \"optionalfeatures.exe\", \"osk.exe\", \"pacjsworker.exe\", \"packagedcwalauncher.exe\", \"packageinspector.exe\", \"passwordonwakesettingflyout.exe\", \"pathping.exe\", \"pcalua.exe\", \"pcaui.exe\", \"pcwrun.exe\", \"perfmon.exe\", \"phoneactivate.exe\", \"pickerhost.exe\", \"pinenrollmentbroker.exe\", \"ping.exe\", \"pkgmgr.exe\", \"pktmon.exe\", \"plasrv.exe\", \"pnpunattend.exe\", \"pnputil.exe\", \"poqexec.exe\", \"pospaymentsworker.exe\", \"powercfg.exe\", \"presentationhost.exe\", \"presentationsettings.exe\", \"prevhost.exe\", \"printbrmui.exe\", \"printfilterpipelinesvc.exe\", \"printisolationhost.exe\", \"printui.exe\", \"proquota.exe\", \"provlaunch.exe\", \"provtool.exe\", \"proximityuxhost.exe\", \"prproc.exe\", \"psr.exe\", \"pwlauncher.exe\", \"qappsrv.exe\", \"qprocess.exe\", \"query.exe\", \"quser.exe\", \"qwinsta.exe\", \"rasautou.exe\", \"rasdial.exe\", \"raserver.exe\", \"rasphone.exe\", \"rdpclip.exe\", \"rdpinit.exe\", \"rdpinput.exe\", \"rdpsa.exe\", \"rdpsaproxy.exe\", \"rdpsauachelper.exe\", \"rdpshell.exe\", \"rdpsign.exe\", \"rdrleakdiag.exe\", \"reagentc.exe\", \"recdisc.exe\", \"recover.exe\", \"recoverydrive.exe\", \"refsutil.exe\", \"reg.exe\", \"regedt32.exe\", \"regini.exe\", \"register-cimprovider.exe\", \"regsvr32.exe\", \"rekeywiz.exe\", \"relog.exe\", \"relpost.exe\", \"remoteapplifetimemanager.exe\", \"remoteposworker.exe\", \"repair-bde.exe\", \"replace.exe\", \"reset.exe\", \"resetengine.exe\", \"resmon.exe\", \"rmactivate.exe\", \"rmactivate_isv.exe\", \"rmactivate_ssp.exe\", \"rmactivate_ssp_isv.exe\", \"rmclient.exe\", \"rmttpmvscmgrsvr.exe\", \"robocopy.exe\", \"route.exe\", \"rpcping.exe\", \"rrinstaller.exe\", \"rstrui.exe\", \"runas.exe\", \"rundll32.exe\", \"runexehelper.exe\", \"runlegacycplelevated.exe\", \"runonce.exe\", \"runtimebroker.exe\", \"rwinsta.exe\", \"sc.exe\", \"schtasks.exe\", \"scriptrunner.exe\", \"sdbinst.exe\", \"sdchange.exe\", \"sdclt.exe\", \"sdiagnhost.exe\", \"searchfilterhost.exe\", \"searchindexer.exe\", \"searchprotocolhost.exe\", \"secedit.exe\", \"secinit.exe\", \"securekernel.exe\", \"securityhealthhost.exe\", \"securityhealthservice.exe\", \"securityhealthsystray.exe\", \"sensordataservice.exe\", \"services.exe\", \"sessionmsg.exe\", \"sethc.exe\", \"setspn.exe\", \"settingsynchost.exe\", \"setupcl.exe\", \"setupugc.exe\", \"setx.exe\", \"sfc.exe\", \"sgrmbroker.exe\", \"sgrmlpac.exe\", \"shellappruntime.exe\", \"shrpubw.exe\", \"shutdown.exe\", \"sigverif.exe\", \"sihclient.exe\", \"sihost.exe\", \"slidetoshutdown.exe\", \"slui.exe\", \"smartscreen.exe\", \"smss.exe\", \"sndvol.exe\", \"snippingtool.exe\", \"snmptrap.exe\", \"sort.exe\", \"spaceagent.exe\", \"spaceman.exe\", \"spatialaudiolicensesrv.exe\", \"spectrum.exe\", \"spoolsv.exe\", \"sppextcomobj.exe\", \"sppsvc.exe\", \"srdelayed.exe\", \"srtasks.exe\", \"stordiag.exe\", \"subst.exe\", \"svchost.exe\", \"sxstrace.exe\", \"syncappvpublishingserver.exe\", \"synchost.exe\", \"sysreseterr.exe\", \"systeminfo.exe\", \"systempropertiesadvanced.exe\", \"systempropertiescomputername.exe\", \"systempropertiesdataexecutionprevention.exe\", \"systempropertieshardware.exe\", \"systempropertiesperformance.exe\", \"systempropertiesprotection.exe\", \"systempropertiesremote.exe\", \"systemreset.exe\", \"systemsettingsadminflows.exe\", \"systemsettingsbroker.exe\", \"systemsettingsremovedevice.exe\", \"systemuwplauncher.exe\", \"systray.exe\", \"tabcal.exe\", \"takeown.exe\", \"tapiunattend.exe\", \"tar.exe\", \"taskhostw.exe\", \"taskkill.exe\", \"tasklist.exe\", \"taskmgr.exe\", \"tcblaunch.exe\", \"tcmsetup.exe\", \"tcpsvcs.exe\", \"thumbnailextractionhost.exe\", \"tieringengineservice.exe\", \"timeout.exe\", \"tokenbrokercookies.exe\", \"tpminit.exe\", \"tpmtool.exe\", \"tpmvscmgr.exe\", \"tpmvscmgrsvr.exe\", \"tracerpt.exe\", \"tracert.exe\", \"tscon.exe\", \"tsdiscon.exe\", \"tskill.exe\", \"tstheme.exe\", \"tswbprxy.exe\", \"ttdinject.exe\", \"tttracer.exe\", \"typeperf.exe\", \"tzsync.exe\", \"tzutil.exe\", \"ucsvc.exe\", \"uevagentpolicygenerator.exe\", \"uevappmonitor.exe\", \"uevtemplatebaselinegenerator.exe\", \"uevtemplateconfigitemgenerator.exe\", \"uimgrbroker.exe\", \"unlodctr.exe\", \"unregmp2.exe\", \"upfc.exe\", \"upgraderesultsui.exe\", \"upnpcont.exe\", \"upprinterinstaller.exe\", \"useraccountbroker.exe\", \"useraccountcontrolsettings.exe\", \"userinit.exe\", \"usoclient.exe\", \"utcdecoderhost.exe\", \"utilman.exe\", \"vaultcmd.exe\", \"vds.exe\", \"vdsldr.exe\", \"verclsid.exe\", \"verifier.exe\", \"verifiergui.exe\", \"vssadmin.exe\", \"vssvc.exe\", \"w32tm.exe\", \"waasmedicagent.exe\", \"waitfor.exe\", \"wallpaperhost.exe\", \"wbadmin.exe\", \"wbengine.exe\", \"wecutil.exe\", \"werfault.exe\", \"werfaultsecure.exe\", \"wermgr.exe\", \"wevtutil.exe\", \"wextract.exe\", \"where.exe\", \"whoami.exe\", \"wiaacmgr.exe\", \"wiawow64.exe\", \"wifitask.exe\", \"wimserv.exe\", \"winbiodatamodeloobe.exe\", \"windows.media.backgroundplayback.exe\", \"windows.warp.jitservice.exe\", \"windowsactiondialog.exe\", \"windowsupdateelevatedinstaller.exe\", \"wininit.exe\", \"winload.exe\", \"winlogon.exe\", \"winresume.exe\", \"winrs.exe\", \"winrshost.exe\", \"winrtnetmuahostserver.exe\", \"winsat.exe\", \"winver.exe\", \"wkspbroker.exe\", \"wksprt.exe\", \"wlanext.exe\", \"wlrmdr.exe\", \"wmpdmc.exe\", \"workfolders.exe\", \"wowreg32.exe\", \"wpcmon.exe\", \"wpctok.exe\", \"wpdshextautoplay.exe\", \"wpnpinst.exe\", \"wpr.exe\", \"write.exe\", \"wscadminui.exe\", \"wscollect.exe\", \"wscript.exe\", \"wsl.exe\", \"wsmanhttpconfig.exe\", \"wsmprovhost.exe\", \"wsqmcons.exe\", \"wsreset.exe\", \"wuapihost.exe\", \"wuauclt.exe\", \"wudfcompanionhost.exe\", \"wudfhost.exe\", \"wusa.exe\", \"wwahost.exe\", \"xblgamesavetask.exe\", \"xcopy.exe\", \"xwizard.exe\", \"aggregatorhost.exe\", \"diskusage.exe\", \"dtdump.exe\", \"ism.exe\", \"ndkperfcmd.exe\", \"ntkrla57.exe\", \"securekernella57.exe\", \"spaceutil.exe\", \"configure-smremoting.exe\", \"dcgpofix.exe\", \"dcpromo.exe\", \"dimc.exe\", \"diskshadow.exe\", \"drvcfg.exe\", \"escunattend.exe\", \"iashost.exe\", \"ktpass.exe\", \"lbfoadmin.exe\", \"netdom.exe\", \"rdspnf.exe\", \"rsopprov.exe\", \"sacsess.exe\", \"servermanager.exe\", \"servermanagerlauncher.exe\", \"setres.exe\", \"tsecimp.exe\", \"vssuirun.exe\", \"webcache.exe\", \"win32calc.exe\", \"certoc.exe\", \"sdndiagnosticstask.exe\", \"xpsrchvw.exe\"\n ) and\n not (\n process.code_signature.subject_name in (\n \"Microsoft Windows\",\n \"Microsoft Corporation\",\n \"Microsoft Windows Publisher\"\n ) and process.code_signature.trusted == true\n ) and not process.code_signature.status: (\"errorCode_endpoint*\", \"errorUntrustedRoot\", \"errorChaining\") and\n not\n (\n process.executable: (\n \"?:\\\\Program Files\\\\Git\\\\usr\\\\bin\\\\hostname.exe\",\n \"?:\\\\Windows\\\\Temp\\\\{*}\\\\taskkill.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\{*}\\\\taskkill.exe\",\n \"?:\\\\$WINDOWS.~BT\\\\NewOS\\\\Windows\\\\System32\\\\ie4ushowIE.exe\",\n \"?:\\\\Program Files\\\\Git\\\\usr\\\\bin\\\\find.exe\"\n )\n ) and\n not\n (\n (process.name: \"ucsvc.exe\" and process.code_signature.subject_name == \"Wellbia.com Co., Ltd.\" and process.code_signature.status: \"trusted\") or\n (process.name: \"pnputil.exe\" and process.code_signature.subject_name: \"Lenovo\" and process.code_signature.status: \"trusted\")\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "GCP Service Account Creation", - "description": "Identifies when a new service account is created in Google Cloud Platform (GCP). A service account is a special type of account used by an application or a virtual machine (VM) instance, not a person. Applications use service accounts to make authorized API calls, authorized as either the service account itself, or as G Suite or Cloud Identity users through domain-wide delegation. If service accounts are not tracked and managed properly, they can present a security risk. An adversary may create a new service account to use during their operations in order to avoid using a standard user account and attempt to evade detection.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Identity and Access Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Service accounts can be created by system administrators. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/iam/docs/service-accounts" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/" - } - ] - } - ], - "id": "dc39f493-5289-4028-9299-df4b76eef296", - "rule_id": "7ceb2216-47dd-4e64-9433-cddc99727623", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.CreateServiceAccount and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Discovery of Internet Capabilities via Built-in Tools", - "description": "Identifies the use of built-in tools attackers can use to check for Internet connectivity on compromised systems. These results may be used to determine communication capabilities with C2 servers, or to identify routes, redirectors, and proxy servers.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 101, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1016", - "name": "System Network Configuration Discovery", - "reference": "https://attack.mitre.org/techniques/T1016/", - "subtechnique": [ - { - "id": "T1016.001", - "name": "Internet Connection Discovery", - "reference": "https://attack.mitre.org/techniques/T1016/001/" - } - ] - } - ] - } - ], - "id": "af81c7fa-9a93-4bfb-9b08-451494743918", - "rule_id": "7f89afef-9fc5-4e7b-bf16-75ffdf27f8db", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name.caseless", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type:windows and event.category:process and event.type:start and \nprocess.name.caseless:(\"ping.exe\" or \"tracert.exe\" or \"pathping.exe\") and\nnot process.args:(\"127.0.0.1\" or \"0.0.0.0\" or \"localhost\" or \"1.1.1.1\" or \"1.2.3.4\" or \"::1\")\n", - "new_terms_fields": [ - "host.id", - "user.id", - "process.command_line" - ], - "history_window_start": "now-14d", - "index": [ - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "Unusual Process Extension", - "description": "Identifies processes running with unusual extensions that are not typically valid for Windows executables.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.008", - "name": "Masquerade File Type", - "reference": "https://attack.mitre.org/techniques/T1036/008/" - } - ] - } - ] - } - ], - "id": "d1fd97db-e1c8-42c6-b5ba-a1cb7d604d5b", - "rule_id": "800e01be-a7a4-46d0-8de9-69f3c9582b44", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.executable : \"?*\" and \n not process.name : (\"*.exe\", \"*.com\", \"*.scr\", \"*.tmp\", \"*.dat\") and\n not process.executable : \n (\n \"MemCompression\",\n \"Registry\",\n \"vmmem\",\n \"vmmemWSL\",\n \"?:\\\\Program Files\\\\Dell\\\\SupportAssistAgent\\\\*.p5x\",\n \"?:\\\\Program Files\\\\Docker\\\\Docker\\\\com.docker.service\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Intel\\\\AGS\\\\Libs\\\\AGSRunner.bin\"\n ) and\n not (\n (process.name : \"C9632CF058AE4321B6B0B5EA39B710FE\" and process.code_signature.subject_name == \"Dell Inc\") or\n (process.name : \"*.upd\" and process.code_signature.subject_name == \"Bloomberg LP\") or\n (process.name: \"FD552E21-686E-413C-931D-3B82A9D29F3B\" and process.code_signature.subject_name: \"Adobe Inc.\") or\n (process.name: \"3B91051C-AE82-43C9-BCEF-0309CD2DD9EB\" and process.code_signature.subject_name: \"McAfee, LLC\")\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Process Injection - Detected - Elastic Endgame", - "description": "Elastic Endgame detected Process Injection. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - } - ], - "id": "200bc9ad-5c8a-4a3f-81d0-c4bfd0179cea", - "rule_id": "80c52164-c82a-402c-9964-852533d58be1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:kernel_shellcode_event or endgame.event_subtype_full:kernel_shellcode_event)\n", - "language": "kuery" - }, - { - "name": "Azure Kubernetes Pods Deleted", - "description": "Identifies the deletion of Azure Kubernetes Pods. Adversaries may delete a Kubernetes pod to disrupt the normal behavior of the environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Asset Visibility", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Pods may be deleted by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Pods deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftkubernetes" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [] - } - ], - "id": "7d939e11-493e-4b8e-bc0c-d6c05584faac", - "rule_id": "83a1931d-8136-46fc-b7b9-2db4f639e014", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/PODS/DELETE\" and\nevent.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Potential Suspicious Clipboard Activity Detected", - "description": "This rule monitors for the usage of the most common clipboard utilities on unix systems by an uncommon process group leader. Adversaries may collect data stored in the clipboard from users copying information within or between applications.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Collection", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1115", - "name": "Clipboard Data", - "reference": "https://attack.mitre.org/techniques/T1115/" - } - ] - } - ], - "id": "e92a91c8-f9b6-4e98-823b-0c18628badbb", - "rule_id": "884e87cc-c67b-4c90-a4ed-e1e24a940c82", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "new_terms", - "query": "event.category:process and host.os.type:\"linux\" and event.action:\"exec\" and event.type:\"start\" and \nprocess.name:(\"xclip\" or \"xsel\" or \"wl-clipboard\" or \"clipman\" or \"copyq\")\n", - "new_terms_fields": [ - "host.id", - "process.group_leader.executable" - ], - "history_window_start": "now-7d", - "index": [ - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "Microsoft 365 Global Administrator Role Assigned", - "description": "In Azure Active Directory (Azure AD), permissions to manage resources are assigned using roles. The Global Administrator is a role that enables users to have access to all administrative features in Azure AD and services that use Azure AD identities like the Microsoft 365 Defender portal, the Microsoft 365 compliance center, Exchange, SharePoint Online, and Skype for Business Online. Attackers can add users as Global Administrators to maintain access and manage all subscriptions and their settings and resources.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Identity and Access Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/azure/active-directory/roles/permissions-reference#global-administrator" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/", - "subtechnique": [ - { - "id": "T1098.003", - "name": "Additional Cloud Roles", - "reference": "https://attack.mitre.org/techniques/T1098/003/" - } - ] - } - ] - } - ], - "id": "13150220-70a9-4edd-8e4f-96c544d7fdfc", - "rule_id": "88671231-6626-4e1b-abb7-6e361a171fbb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "o365.audit.ModifiedProperties.Role_DisplayName.NewValue", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.code:\"AzureActiveDirectory\" and event.action:\"Add member to role.\" and\no365.audit.ModifiedProperties.Role_DisplayName.NewValue:\"Global Administrator\"\n", - "language": "kuery" - }, - { - "name": "Potential Sudo Privilege Escalation via CVE-2019-14287", - "description": "This rule monitors for the execution of a suspicious sudo command that is leveraged in CVE-2019-14287 to escalate privileges to root. Sudo does not verify the presence of the designated user ID and proceeds to execute using a user ID that can be chosen arbitrarily. By using the sudo privileges, the command \"sudo -u#-1\" translates to an ID of 0, representing the root user. This exploit may work for sudo versions prior to v1.28.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend", - "Use Case: Vulnerability" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.exploit-db.com/exploits/47502" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - } - ] - } - ], - "id": "cbf5a1c4-1b8d-444f-bb30-981ae656d00b", - "rule_id": "8af5b42f-8d74-48c8-a8d0-6d14b4197288", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"sudo\" and process.args == \"-u#-1\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Azure Kubernetes Events Deleted", - "description": "Identifies when events are deleted in Azure Kubernetes. Kubernetes events are objects that log any state changes. Example events are a container creation, an image pull, or a pod scheduling on a node. An adversary may delete events in Azure Kubernetes in an attempt to evade detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Log Auditing", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Events deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Events deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftkubernetes" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "f0a7c2ae-2e70-4717-8afc-305f215ce1c2", - "rule_id": "8b64d36a-1307-4b2e-a77b-a0027e4d27c8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/EVENTS.K8S.IO/EVENTS/DELETE\" and\nevent.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Ransomware - Detected - Elastic Endgame", - "description": "Elastic Endgame detected ransomware. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 99, - "severity": "critical", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [], - "id": "78800a96-e519-45e0-be0e-d097e6f535fe", - "rule_id": "8cb4f625-7743-4dfb-ae1b-ad92be9df7bd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:ransomware_event or endgame.event_subtype_full:ransomware_event)\n", - "language": "kuery" - }, - { - "name": "Suspicious Interactive Shell Spawned From Inside A Container", - "description": "This rule detects when an interactive shell is spawned inside a running container. This could indicate a potential container breakout attempt or an attacker's attempt to gain unauthorized access to the underlying host.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Legitimate users and processes, such as system administration tools, may utilize shell utilities inside a container resulting in false positives." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "c95b3300-6630-4914-9069-0423d7a8f986", - "rule_id": "8d3d0794-c776-476b-8674-ee2e685f6470", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entry_leader.same_as_process", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where container.id: \"*\" and\nevent.type== \"start\" and \n\n/*D4C consolidates closely spawned event.actions, this excludes end actions to only capture ongoing processes*/\nevent.action in (\"fork\", \"exec\") and event.action != \"end\"\n and process.entry_leader.same_as_process== false and\n(\n(process.executable: \"*/*sh\" and process.args: (\"-i\", \"-it\")) or\nprocess.args: \"*/*sh\"\n)\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "Azure Automation Runbook Deleted", - "description": "Identifies when an Azure Automation runbook is deleted. An adversary may delete an Azure Automation runbook in order to disrupt their target's automated business operations or to remove a malicious runbook for defense evasion.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://powerzure.readthedocs.io/en/latest/Functions/operational.html#create-backdoor", - "https://github.com/hausec/PowerZure", - "https://posts.specterops.io/attacking-azure-azure-ad-and-introducing-powerzure-ca70b330511a", - "https://azure.microsoft.com/en-in/blog/azure-automation-runbook-management/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [] - } - ], - "id": "f468d87b-f376-43a0-aca4-e2a9fc3b901e", - "rule_id": "8ddab73b-3d15-4e5d-9413-47f05553c1d7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and\n azure.activitylogs.operation_name:\"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/RUNBOOKS/DELETE\" and\n event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "GCP Service Account Deletion", - "description": "Identifies when a service account is deleted in Google Cloud Platform (GCP). A service account is a special type of account used by an application or a virtual machine (VM) instance, not a person. Applications use service accounts to make authorized API calls, authorized as either the service account itself, or as G Suite or Cloud Identity users through domain-wide delegation. An adversary may delete a service account in order to disrupt their target's business operations.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Identity and Access Audit", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Service accounts may be deleted by system administrators. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/iam/docs/service-accounts" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1531", - "name": "Account Access Removal", - "reference": "https://attack.mitre.org/techniques/T1531/" - } - ] - } - ], - "id": "3140d4ea-32cd-43bf-871f-b63a5fa99f44", - "rule_id": "8fb75dda-c47a-4e34-8ecd-34facf7aad13", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.DeleteServiceAccount and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "GCP Virtual Private Cloud Route Creation", - "description": "Identifies when a virtual private cloud (VPC) route is created in Google Cloud Platform (GCP). Google Cloud routes define the paths that network traffic takes from a virtual machine (VM) instance to other destinations. These destinations can be inside a Google VPC network or outside it. An adversary may create a route in order to impact the flow of network traffic in their target's cloud environment.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Virtual Private Cloud routes may be created by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/vpc/docs/routes", - "https://cloud.google.com/vpc/docs/using-routes" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "e4e74612-2584-4206-99ba-f74650ce89ad", - "rule_id": "9180ffdf-f3d0-4db3-bf66-7a14bcff71b8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:(v*.compute.routes.insert or \"beta.compute.routes.insert\")\n", - "language": "kuery" - }, - { - "name": "PowerShell Suspicious Script with Screenshot Capabilities", - "description": "Detects PowerShell scripts that can take screenshots, which is a common feature in post-exploitation kits and remote access tools (RATs).", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating PowerShell Suspicious Script with Screenshot Capabilities\n\nPowerShell is one of the main tools system administrators use for automation, report routines, and other tasks, which makes it available for use in various environments and creates an attractive way for attackers to execute code.\n\nAttackers can abuse PowerShell capabilities and take screen captures of desktops to gather information over the course of an operation.\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Determine whether the script stores the captured data locally.\n- Investigate whether the script contains exfiltration capabilities and identify the exfiltration server.\n- Assess network data to determine if the host communicated with the exfiltration server.\n\n### False positive analysis\n\n- Regular users do not have a business justification for using scripting utilities to take screenshots, which makes false positives unlikely. In the case of authorized benign true positives (B-TPs), exceptions can be added.\n\n### Related rules\n\n- PowerShell Keylogging Script - bd2c86a0-8b61-4457-ab38-96943984e889\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/dotnet/api/system.drawing.graphics.copyfromscreen" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1113", - "name": "Screen Capture", - "reference": "https://attack.mitre.org/techniques/T1113/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "82ee57d4-867c-4ac8-aaed-1695f228a122", - "rule_id": "959a7353-1129-4aa7-9084-30746b256a70", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n CopyFromScreen and\n (\"System.Drawing.Bitmap\" or \"Drawing.Bitmap\")\n ) and not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "Sensitive Keys Or Passwords Searched For Inside A Container", - "description": "This rule detects the use of system search utilities like grep and find to search for private SSH keys or passwords inside a container. Unauthorized access to these sensitive files could lead to further compromise of the container environment or facilitate a container breakout to the underlying host machine.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://sysdig.com/blog/cve-2021-25741-kubelet-falco/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.001", - "name": "Credentials In Files", - "reference": "https://attack.mitre.org/techniques/T1552/001/" - } - ] - } - ] - } - ], - "id": "bd327baa-3465-4d3d-88ee-c55853b0a49a", - "rule_id": "9661ed8b-001c-40dc-a777-0983b7b0c91a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where container.id: \"*\" and event.type== \"start\" and\n((\n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/ \n (process.name in (\"grep\", \"egrep\", \"fgrep\") or process.args in (\"grep\", \"egrep\", \"fgrep\")) \n and process.args : (\"*BEGIN PRIVATE*\", \"*BEGIN OPENSSH PRIVATE*\", \"*BEGIN RSA PRIVATE*\", \n\"*BEGIN DSA PRIVATE*\", \"*BEGIN EC PRIVATE*\", \"*pass*\", \"*ssh*\", \"*user*\")\n) \nor \n(\n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/\n (process.name in (\"find\", \"locate\", \"mlocate\") or process.args in (\"find\", \"locate\", \"mlocate\")) \n and process.args : (\"*id_rsa*\", \"*id_dsa*\")\n))\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "SeDebugPrivilege Enabled by a Suspicious Process", - "description": "Identifies the creation of a process running as SYSTEM and impersonating a Windows core binary privileges. Adversaries may create a new process with a different token to escalate privileges and bypass access controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 4, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4703", - "https://blog.palantir.com/windows-privilege-abuse-auditing-detection-and-defense-3078a403d74e" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/" - } - ] - } - ], - "id": "75129c0b-6af8-4d9e-a2ff-9921f557b6cb", - "rule_id": "97020e61-e591-4191-8a3b-2861a2b887cd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.EnabledPrivilegeList", - "type": "unknown", - "ecs": false - }, - { - "name": "winlog.event_data.ProcessName", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.event_data.SubjectUserSid", - "type": "keyword", - "ecs": false - } - ], - "setup": "Windows Event 4703 logs Token Privileges changes and need to be configured (Enable).\n\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDetailed Tracking >\nToken Right Adjusted Events (Success)\n```", - "type": "eql", - "query": "any where host.os.type == \"windows\" and event.provider: \"Microsoft-Windows-Security-Auditing\" and\n event.action : \"Token Right Adjusted Events\" and\n\n winlog.event_data.EnabledPrivilegeList : \"SeDebugPrivilege\" and\n\n /* exclude processes with System Integrity */\n not winlog.event_data.SubjectUserSid : (\"S-1-5-18\", \"S-1-5-19\", \"S-1-5-20\") and\n\n not winlog.event_data.ProcessName :\n (\"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\lsass.exe\",\n \"?:\\\\Windows\\\\WinSxS\\\\*\",\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\MRT.exe\",\n \"?:\\\\Windows\\\\System32\\\\cleanmgr.exe\",\n \"?:\\\\Windows\\\\System32\\\\taskhostw.exe\",\n \"?:\\\\Windows\\\\System32\\\\mmc.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\*-*\\\\DismHost.exe\",\n \"?:\\\\Windows\\\\System32\\\\auditpol.exe\",\n \"?:\\\\Windows\\\\System32\\\\wbem\\\\WmiPrvSe.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\wbem\\\\WmiPrvSe.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ] - }, - { - "name": "Microsoft 365 Exchange Anti-Phish Rule Modification", - "description": "Identifies the modification of an anti-phishing rule in Microsoft 365. By default, Microsoft 365 includes built-in features that help protect users from phishing attacks. Anti-phishing rules increase this protection by refining settings to better detect and prevent attacks.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "An anti-phishing rule may be deleted by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-antiphishrule?view=exchange-ps", - "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-antiphishrule?view=exchange-ps" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/" - } - ] - } - ], - "id": "d08f0060-1880-4aa7-9507-03f02042ee43", - "rule_id": "97314185-2568-4561-ae81-f3e480e5e695", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:(\"Remove-AntiPhishRule\" or \"Disable-AntiPhishRule\") and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "GCP Storage Bucket Configuration Modification", - "description": "Identifies when the configuration is modified for a storage bucket in Google Cloud Platform (GCP). An adversary may modify the configuration of a storage bucket in order to weaken the security controls of their target's environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Identity and Access Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Storage bucket configuration may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/storage/docs/key-terms#buckets" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1578", - "name": "Modify Cloud Compute Infrastructure", - "reference": "https://attack.mitre.org/techniques/T1578/" - } - ] - } - ], - "id": "465673f3-023d-4696-b7ca-14860e09a688", - "rule_id": "97359fd8-757d-4b1d-9af1-ef29e4a8680e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:\"storage.buckets.update\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Google Workspace Drive Encryption Key(s) Accessed from Anonymous User", - "description": "Detects when an external (anonymous) user has viewed, copied or downloaded an encryption key file from a Google Workspace drive. Adversaries may gain access to encryption keys stored in private drives from rogue access links that do not have an expiration. Access to encryption keys may allow adversaries to access sensitive data or authenticate on behalf of users.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "### Important Information Regarding Google Workspace Event Lag Times\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 2, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Configuration Audit", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A user may generate a shared access link to encryption key files to share with others. It is unlikely that the intended recipient is an external or anonymous user." - ], - "references": [ - "https://support.google.com/drive/answer/2494822" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.004", - "name": "Private Keys", - "reference": "https://attack.mitre.org/techniques/T1552/004/" - } - ] - } - ] - } - ], - "id": "7a65df21-dede-4079-a871-227d2c4d9d3d", - "rule_id": "980b70a0-c820-11ed-8799-f661ea17fbcc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.drive.visibility", - "type": "unknown", - "ecs": false - }, - { - "name": "source.user.email", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "eql", - "query": "file where event.dataset == \"google_workspace.drive\" and event.action : (\"copy\", \"view\", \"download\") and\n google_workspace.drive.visibility: \"people_with_link\" and source.user.email == \"\" and\n file.extension: (\n \"token\",\"assig\", \"pssc\", \"keystore\", \"pub\", \"pgp.asc\", \"ps1xml\", \"pem\", \"gpg.sig\", \"der\", \"key\",\n \"p7r\", \"p12\", \"asc\", \"jks\", \"p7b\", \"signature\", \"gpg\", \"pgp.sig\", \"sst\", \"pgp\", \"gpgz\", \"pfx\", \"crt\",\n \"p8\", \"sig\", \"pkcs7\", \"jceks\", \"pkcs8\", \"psc1\", \"p7c\", \"csr\", \"cer\", \"spc\", \"ps2xml\")\n", - "language": "eql", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ] - }, - { - "name": "GCP IAM Service Account Key Deletion", - "description": "Identifies the deletion of an Identity and Access Management (IAM) service account key in Google Cloud Platform (GCP). Each service account is associated with two sets of public/private RSA key pairs that are used to authenticate. If a key is deleted, the application will no longer be able to access Google Cloud resources using that key. A security best practice is to rotate your service account keys regularly.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Identity and Access Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Service account key deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Key deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/iam/docs/service-accounts", - "https://cloud.google.com/iam/docs/creating-managing-service-account-keys" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "686712c9-90f1-4725-a95f-bfe49a577b07", - "rule_id": "9890ee61-d061-403d-9bf6-64934c51f638", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.DeleteServiceAccountKey and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 Exchange Management Group Role Assignment", - "description": "Identifies when a new role is assigned to a management group in Microsoft 365. An adversary may attempt to add a role in order to maintain persistence in an environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Identity and Access Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A new role may be assigned to a management group by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/new-managementroleassignment?view=exchange-ps", - "https://docs.microsoft.com/en-us/microsoft-365/admin/add-users/about-admin-roles?view=o365-worldwide" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "1e60527c-2b21-47f7-8d08-1239d8a62182", - "rule_id": "98995807-5b09-4e37-8a54-5cae5dc932d7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"New-ManagementRoleAssignment\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Process Injection - Prevented - Elastic Endgame", - "description": "Elastic Endgame prevented Process Injection. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - } - ], - "id": "ec1e055a-550b-45bc-8e18-a1926a06f534", - "rule_id": "990838aa-a953-4f3e-b3cb-6ddf7584de9e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:kernel_shellcode_event or endgame.event_subtype_full:kernel_shellcode_event)\n", - "language": "kuery" - }, - { - "name": "GCP Pub/Sub Topic Creation", - "description": "Identifies the creation of a topic in Google Cloud Platform (GCP). In GCP, the publisher-subscriber relationship (Pub/Sub) is an asynchronous messaging service that decouples event-producing and event-processing services. A topic is used to forward messages from publishers to subscribers.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Log Auditing", - "Tactic: Collection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Topic creations may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Topic creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/pubsub/docs/admin" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1530", - "name": "Data from Cloud Storage", - "reference": "https://attack.mitre.org/techniques/T1530/" - } - ] - } - ], - "id": "2a92984e-0fd1-436b-bea4-1c60a07534a6", - "rule_id": "a10d3d9d-0f65-48f1-8b25-af175e2594f5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.pubsub.v*.Publisher.CreateTopic and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential LSASS Clone Creation via PssCaptureSnapShot", - "description": "Identifies the creation of an LSASS process clone via PssCaptureSnapShot where the parent process is the initial LSASS process instance. This may indicate an attempt to evade detection and dump LSASS memory for credential access.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Sysmon Only" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.matteomalvica.com/blog/2019/12/02/win-defender-atp-cred-bypass/", - "https://medium.com/@Achilles8284/the-birth-of-a-process-part-2-97c6fb9c42a2" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "f2b196e2-538d-48d9-bdda-156bbf4715f1", - "rule_id": "a16612dd-b30e-4d41-86a0-ebe70974ec00", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "This is meant to run only on datasources using Windows security event 4688 that captures the process clone creation.\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.code:\"4688\" and\n process.executable : \"?:\\\\Windows\\\\System32\\\\lsass.exe\" and\n process.parent.executable : \"?:\\\\Windows\\\\System32\\\\lsass.exe\"\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ] - }, - { - "name": "GCP Virtual Private Cloud Route Deletion", - "description": "Identifies when a Virtual Private Cloud (VPC) route is deleted in Google Cloud Platform (GCP). Google Cloud routes define the paths that network traffic takes from a virtual machine (VM) instance to other destinations. These destinations can be inside a Google VPC network or outside it. An adversary may delete a route in order to impact the flow of network traffic in their target's cloud environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Virtual Private Cloud routes may be deleted by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/vpc/docs/routes", - "https://cloud.google.com/vpc/docs/using-routes" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "0f6d5f97-a775-4436-a989-9ff739a0fc8f", - "rule_id": "a17bcc91-297b-459b-b5ce-bc7460d8f82a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:v*.compute.routes.delete and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "My First Rule", - "description": "This rule helps you test and practice using alerts with Elastic Security as you get set up. It’s not a sign of threat activity.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "This is a test alert.\n\nThis alert does not show threat activity. Elastic created this alert to help you understand how alerts work.\n\nFor normal rules, the Investigation Guide will help analysts investigate alerts.\n\nThis alert will show once every 24 hours for each host. It is safe to disable this rule.\n", - "version": 2, - "tags": [ - "Use Case: Guided Onboarding", - "Data Source: APM", - "OS: Windows", - "Data Source: Elastic Endgame" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "24h", - "from": "now-24h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "This rule is not looking for threat activity. Disable the rule if you're already familiar with alerts." - ], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-rules.html" - ], - "max_signals": 1, - "threat": [], - "id": "c51bd824-e819-4e36-a215-4c21bf03e05e", - "rule_id": "a198fbbd-9413-45ec-a269-47ae4ccf59ce", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.kind", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "event.kind:event\n", - "threshold": { - "field": [ - "host.name" - ], - "value": 1 - }, - "index": [ - "apm-*-transaction*", - "auditbeat-*", - "endgame-*", - "filebeat-*", - "logs-*", - "packetbeat-*", - "traces-apm*", - "winlogbeat-*", - "-*elastic-cloud-logs-*" - ], - "language": "kuery" - }, - { - "name": "Linux Group Creation", - "description": "Identifies attempts to create a new group. Attackers may create new groups to establish persistence on a system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Linux Group Creation\n\nThe `groupadd` and `addgroup` commands are used to create new user groups in Linux-based operating systems.\n\nAttackers may create new groups to maintain access to victim systems or escalate privileges by assigning a compromised account to a privileged group.\n\nThis rule identifies the usages of `groupadd` and `addgroup` to create new groups.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible investigation steps\n\n- Investigate whether the group was created succesfully.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific Group\",\"query\":\"SELECT * FROM groups WHERE groupname = {{group.name}}\"}}\n- Identify if a user account was added to this group after creation.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific User\",\"query\":\"SELECT * FROM users WHERE username = {{user.name}}\"}}\n- Investigate whether the user is currently logged in and active.\n - !{osquery{\"label\":\"Osquery - Investigate the Account Authentication Status\",\"query\":\"SELECT * FROM logged_in_users WHERE user = {{user.name}}\"}}\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Group creation is a common administrative task, so there is a high chance of the activity being legitimate. Before investigating further, verify that this activity is not benign.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Remove and block malicious artifacts identified during triage.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Delete the created group and, in case an account was added to this group, delete the account.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/", - "subtechnique": [ - { - "id": "T1136.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1136/001/" - } - ] - } - ] - } - ], - "id": "554f4c13-1519-438f-b8ef-6cfe8b5ab152", - "rule_id": "a1c2589e-0c8c-4ca8-9eb6-f83c4bbdbe8f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "group.name", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "iam where host.os.type == \"linux\" and (event.type == \"group\" and event.type == \"creation\") and\nprocess.name in (\"groupadd\", \"addgroup\") and group.name != null\n", - "language": "eql", - "index": [ - "logs-system.auth-*" - ] - }, - { - "name": "Netcat Listener Established Inside A Container", - "description": "This rule detects an established netcat listener running inside a container. Netcat is a utility used for reading and writing data across network connections, and it can be used for malicious purposes such as establishing a backdoor for persistence or exfiltrating data.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "There is a potential for false positives if the container is used for legitimate tasks that require the use of netcat, such as network troubleshooting, testing or system monitoring. It is important to investigate any alerts generated by this rule to determine if they are indicative of malicious activity or part of legitimate container activity." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "7f9f3031-6312-4f6d-ae6a-4c3d9ad1574a", - "rule_id": "a52a9439-d52c-401c-be37-2785235c6547", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where container.id: \"*\" and event.type== \"start\" \nand event.action in (\"fork\", \"exec\") and \n(\nprocess.name:(\"nc\",\"ncat\",\"netcat\",\"netcat.openbsd\",\"netcat.traditional\") or\n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/\nprocess.args: (\"nc\",\"ncat\",\"netcat\",\"netcat.openbsd\",\"netcat.traditional\")\n) and (\n /* bind shell to echo for command execution */\n (process.args:(\"-*l*\", \"--listen\", \"-*p*\", \"--source-port\") and process.args:(\"-c\", \"--sh-exec\", \"-e\", \"--exec\", \"echo\",\"$*\"))\n /* bind shell to specific port */\n or process.args:(\"-*l*\", \"--listen\", \"-*p*\", \"--source-port\")\n )\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "Potential Reverse Shell via UDP", - "description": "This detection rule identifies suspicious network traffic patterns associated with UDP reverse shell activity. This activity consists of a sample of an execve, socket and connect syscall executed by the same process, where the auditd.data.a0-1 indicate a UDP connection, ending with an egress connection event. An attacker may establish a Linux UDP reverse shell to bypass traditional firewall restrictions and gain remote access to a target system covertly.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1071", - "name": "Application Layer Protocol", - "reference": "https://attack.mitre.org/techniques/T1071/" - } - ] - } - ], - "id": "35f09ff7-bb72-4ca3-a083-4a044c20b31a", - "rule_id": "a5eb21b7-13cc-4b94-9fe2-29bb2914e037", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "auditd_manager", - "version": "^1.0.0", - "integration": "auditd" - } - ], - "required_fields": [ - { - "name": "auditd.data.a0", - "type": "unknown", - "ecs": false - }, - { - "name": "auditd.data.a1", - "type": "unknown", - "ecs": false - }, - { - "name": "auditd.data.syscall", - "type": "unknown", - "ecs": false - }, - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "network.direction", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.pid", - "type": "long", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in either from Auditbeat integration, or Auditd Manager integration.\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n### Auditd Manager Integration Setup\nThe Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.\nAuditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.\n\n#### The following steps should be executed in order to add the Elastic Agent System integration \"auditd_manager\" on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Auditd Manager and select the integration to see more details about it.\n- Click Add Auditd Manager.\n- Configure the integration name and optionally add a description.\n- Review optional and advanced settings accordingly.\n- Add the newly installed `auditd manager` to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.\n- Click Save and Continue.\n- For more details on the integeration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).\n\n#### Rule Specific Setup Note\nAuditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.\nHowever, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the \"audit rules\" configuration box or the \"auditd rule files\" box by specifying a file to read the audit rules from.\n- For this detection rule no additional audit rules are required to be added to the integration.\n\n", - "type": "eql", - "query": "sample by host.id, process.pid, process.parent.pid\n[process where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n auditd.data.syscall == \"execve\" and process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\",\n \"csh\", \"zsh\", \"ksh\", \"fish\", \"perl\", \"python*\", \"nc\", \"ncat\", \"netcat\", \"php*\", \"ruby\",\n \"openssl\", \"awk\", \"telnet\", \"lua*\", \"socat\")]\n[process where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n auditd.data.syscall == \"socket\" and process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\",\n \"zsh\", \"ksh\", \"fish\", \"perl\", \"python*\", \"nc\", \"ncat\", \"netcat\", \"php*\", \"ruby\", \"openssl\",\n \"awk\", \"telnet\", \"lua*\", \"socat\") and auditd.data.a0 == \"2\" and auditd.data.a1 : (\"2\", \"802\")]\n[network where host.os.type == \"linux\" and event.dataset == \"auditd_manager.auditd\" and \n auditd.data.syscall == \"connect\" and process.name : (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\",\n \"zsh\", \"ksh\", \"fish\", \"perl\", \"python*\", \"nc\", \"ncat\", \"netcat\", \"php*\", \"ruby\", \"openssl\",\n \"awk\", \"telnet\", \"lua*\", \"socat\") and network.direction == \"egress\" and destination.ip != null and \n destination.ip != \"127.0.0.1\" and destination.ip != \"127.0.0.53\" and destination.ip != \"::1\"]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-auditd_manager.auditd-*" - ] - }, - { - "name": "Azure Active Directory PowerShell Sign-in", - "description": "Identifies a sign-in using the Azure Active Directory PowerShell module. PowerShell for Azure Active Directory allows for managing settings from the command line, which is intended for users who are members of an admin role.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Azure Active Directory PowerShell Sign-in\n\nAzure Active Directory PowerShell for Graph (Azure AD PowerShell) is a module IT professionals commonly use to manage their Azure Active Directory. The cmdlets in the Azure AD PowerShell module enable you to retrieve data from the directory, create new objects in the directory, update existing objects, remove objects, as well as configure the directory and its features.\n\nThis rule identifies sign-ins that use the Azure Active Directory PowerShell module, which can indicate unauthorized access if done outside of IT or engineering.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Evaluate whether the user needs to access Azure AD using PowerShell to complete its tasks.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Consider the source IP address and geolocation for the involved user account. Do they look normal?\n- Contact the account owner and confirm whether they are aware of this activity.\n- Investigate suspicious actions taken by the user using the module, for example, modifications in security settings that weakens the security policy, persistence-related tasks, and data access.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- If this activity is expected and noisy in your environment, consider adding IT, Engineering, and other authorized users as exceptions — preferably with a combination of user and device conditions.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.\n- Consider enabling multi-factor authentication for users.\n- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 105, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Sign-ins using PowerShell may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be signing into your environment. Sign-ins from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/", - "https://docs.microsoft.com/en-us/microsoft-365/enterprise/connect-to-microsoft-365-powershell?view=o365-worldwide" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/", - "subtechnique": [ - { - "id": "T1078.004", - "name": "Cloud Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/004/" - } - ] - } - ] - } - ], - "id": "03d18f6a-7810-44b8-a769-7d6e5780d874", - "rule_id": "a605c51a-73ad-406d-bf3a-f24cc41d5c97", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.signinlogs.properties.app_display_name", - "type": "keyword", - "ecs": false - }, - { - "name": "azure.signinlogs.properties.token_issuer_type", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.signinlogs and\n azure.signinlogs.properties.app_display_name:\"Azure Active Directory PowerShell\" and\n azure.signinlogs.properties.token_issuer_type:AzureAD and event.outcome:(success or Success)\n", - "language": "kuery" - }, - { - "name": "Web Application Suspicious Activity: POST Request Declined", - "description": "A POST request to a web application returned a 403 response, which indicates the web application declined to process the request because the action requested was not allowed.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 102, - "tags": [ - "Data Source: APM" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Security scans and tests may result in these errors. Misconfigured or buggy applications may produce large numbers of these errors. If the source is unexpected, the user unauthorized, or the request unusual, these may indicate suspicious or malicious activity." - ], - "references": [ - "https://en.wikipedia.org/wiki/HTTP_403" - ], - "max_signals": 100, - "threat": [], - "id": "16068873-c11f-438a-b538-793914a25813", - "rule_id": "a87a4e42-1d82-44bd-b0bf-d9b7f91fb89e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "apm", - "version": "^8.0.0" - } - ], - "required_fields": [ - { - "name": "http.request.method", - "type": "keyword", - "ecs": true - }, - { - "name": "http.response.status_code", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "apm-*-transaction*", - "traces-apm*" - ], - "query": "http.response.status_code:403 and http.request.method:post\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 Exchange Safe Link Policy Disabled", - "description": "Identifies when a Safe Link policy is disabled in Microsoft 365. Safe Link policies for Office applications extend phishing protection to documents that contain hyperlinks, even after they have been delivered to a user.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Identity and Access Audit", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Disabling safe links may be done by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-safelinksrule?view=exchange-ps", - "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/atp-safe-links?view=o365-worldwide" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/" - } - ] - } - ], - "id": "4d4935ae-9bc9-4e92-9cff-e513e1d1b641", - "rule_id": "a989fa1b-9a11-4dd8-a3e9-f0de9c6eb5f2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Disable-SafeLinksRule\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "GCP IAM Custom Role Creation", - "description": "Identifies an Identity and Access Management (IAM) custom role creation in Google Cloud Platform (GCP). Custom roles are user-defined, and allow for the bundling of one or more supported permissions to meet specific needs. Custom roles will not be updated automatically and could lead to privilege creep if not carefully scrutinized.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Identity and Access Audit", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Custom role creations may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Role creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/iam/docs/understanding-custom-roles" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "ea6db099-48ac-4075-a015-69115249c758", - "rule_id": "aa8007f0-d1df-49ef-8520-407857594827", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.CreateRole and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential Protocol Tunneling via Chisel Server", - "description": "This rule monitors for common command line flags leveraged by the Chisel server utility followed by a received connection within a timespan of 1 minute. Chisel is a command-line utility used for creating and managing TCP and UDP tunnels, enabling port forwarding and secure communication between machines. Attackers can abuse the Chisel utility to establish covert communication channels, bypass network restrictions, and carry out malicious activities by creating tunnels that allow unauthorized access to internal systems.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform", - "https://book.hacktricks.xyz/generic-methodologies-and-resources/tunneling-and-port-forwarding" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - } - ], - "id": "cedf2d41-b0cc-4c50-8cd6-9ffe47a9434f", - "rule_id": "ac8805f6-1e08-406c-962e-3937057fa86f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=1m\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.args == \"server\" and process.args in (\"--port\", \"-p\", \"--reverse\", \"--backend\", \"--socks5\") and \n process.args_count >= 3 and process.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")]\n [network where host.os.type == \"linux\" and event.action == \"connection_accepted\" and event.type == \"start\" and \n destination.ip != null and destination.ip != \"127.0.0.1\" and destination.ip != \"::1\" and \n not process.name : (\n \"python*\", \"php*\", \"perl\", \"ruby\", \"lua*\", \"openssl\", \"nc\", \"netcat\", \"ncat\", \"telnet\", \"awk\", \"java\", \"telnet\",\n \"ftp\", \"socat\", \"curl\", \"wget\", \"dpkg\", \"docker\", \"dockerd\", \"yum\", \"apt\", \"rpm\", \"dnf\", \"ssh\", \"sshd\", \"hugo\")]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Invoke-Mimikatz PowerShell Script", - "description": "Mimikatz is a credential dumper capable of obtaining plaintext Windows account logins and passwords, along with many other features that make it useful for testing the security of networks. This rule detects Invoke-Mimikatz PowerShell script and alike.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Mimikatz PowerShell Activity\n\n[Mimikatz](https://github.com/gentilkiwi/mimikatz) is an open-source tool used to collect, decrypt, and/or use cached credentials. This tool is commonly abused by adversaries during the post-compromise stage where adversaries have gained an initial foothold on an endpoint and are looking to elevate privileges and seek out additional authentication objects such as tokens/hashes/credentials that can then be used to move laterally and pivot across a network.\n\nThis rule looks for PowerShell scripts that load mimikatz in memory, like Invoke-Mimikataz, which are used to dump credentials from the Local Security Authority Subsystem Service (LSASS). Any activity triggered from this rule should be treated with high priority as it typically represents an active adversary.\n\nMore information about Mimikatz components and how to detect/prevent them can be found on [ADSecurity](https://adsecurity.org/?page_id=1821).\n\n#### Possible investigation steps\n\n- Examine the script content that triggered the detection; look for suspicious DLL imports, collection or exfiltration capabilities, suspicious functions, encoded or compressed data, and other potentially malicious characteristics.\n- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Examine file or network events from the involved PowerShell process for suspicious behavior.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n - Invoke-Mimitakz and alike scripts heavily use other capabilities covered by other detections described in the \"Related Rules\" section.\n- Evaluate whether the user needs to use PowerShell to complete tasks.\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host.\n - Examine network and security events in the environment to identify potential lateral movement using compromised credentials.\n\n### False positive analysis\n\n- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.\n\n### Related rules\n\n- PowerShell PSReflect Script - 56f2e9b5-4803-4e44-a0a4-a52dc79d57fe\n- Suspicious .NET Reflection via PowerShell - e26f042e-c590-4e82-8e05-41e81bd822ad\n- PowerShell Suspicious Payload Encoded and Compressed - 81fe9dc6-a2d7-4192-a2d8-eed98afc766a\n- Potential Process Injection via PowerShell - 2e29e96a-b67c-455a-afe4-de6183431d0d\n- Mimikatz Memssp Log File Detected - ebb200e8-adf0-43f8-a0bb-4ee5b5d852c6\n- Modification of WDigest Security Provider - d703a5af-d5b0-43bd-8ddb-7a5d500b7da5\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.\n- Validate that cleartext passwords are disabled in memory for use with `WDigest`.\n- Look into preventing access to `LSASS` using capabilities such as LSA protection or antivirus/EDR tools that provide this capability.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 106, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Resources: Investigation Guide", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://attack.mitre.org/software/S0002/", - "https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1", - "https://www.elastic.co/security-labs/detect-credential-access" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "61a429e6-48c6-4e02-968f-cdd586a98555", - "rule_id": "ac96ceb8-4399-4191-af1d-4feeac1f1f46", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be configured (Enable).\n\nSteps to implement the logging policy with with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\npowershell.file.script_block_text:(\n (DumpCreds and\n DumpCerts) or\n \"sekurlsa::logonpasswords\" or\n (\"crypto::certificates\" and\n \"CERT_SYSTEM_STORE_LOCAL_MACHINE\")\n)\n", - "language": "kuery" - }, - { - "name": "Signed Proxy Execution via MS Work Folders", - "description": "Identifies the use of Windows Work Folders to execute a potentially masqueraded control.exe file in the current working directory. Misuse of Windows Work Folders could indicate malicious activity.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Signed Proxy Execution via MS Work Folders\n\nWork Folders is a role service for file servers running Windows Server that provides a consistent way for users to access their work files from their PCs and devices. This allows users to store work files and access them from anywhere. When called, Work Folders will automatically execute any Portable Executable (PE) named control.exe as an argument before accessing the synced share.\n\nUsing Work Folders to execute a masqueraded control.exe could allow an adversary to bypass application controls and increase privileges.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n - Examine the location of the WorkFolders.exe binary to determine if it was copied to the location of the control.exe binary. It resides in the System32 directory by default.\n- Trace the activity related to the control.exe binary to identify any continuing intrusion activity on the host.\n- Review the control.exe binary executed with Work Folders to determine maliciousness such as additional host activity or network traffic.\n- Determine if control.exe was synced to sync share, indicating potential lateral movement.\n- Review how control.exe was originally delivered on the host, such as emailed, downloaded from the web, or written to\ndisk from a separate binary.\n\n### False positive analysis\n\n- Windows Work Folders are used legitimately by end users and administrators for file sharing and syncing but not in the instance where a suspicious control.exe is passed as an argument.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Review the Work Folders synced share to determine if the control.exe was shared and if so remove it.\n- If no lateral movement was identified during investigation, take the affected host offline if possible and remove the control.exe binary as well as any additional artifacts identified during investigation.\n- Review integrating Windows Information Protection (WIP) to enforce data protection by encrypting the data on PCs using Work Folders.\n- Confirm with the user whether this was expected or not, and reset their password.", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/windows-server/storage/work-folders/work-folders-overview", - "https://twitter.com/ElliotKillick/status/1449812843772227588", - "https://lolbas-project.github.io/lolbas/Binaries/WorkFolders/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "f570b449-de04-4a03-8bce-964bf2f8e430", - "rule_id": "ad0d2742-9a49-11ec-8d6b-acde48001122", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\"\n and process.name : \"control.exe\" and process.parent.name : \"WorkFolders.exe\"\n and not process.executable : (\"?:\\\\Windows\\\\System32\\\\control.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\control.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Suspicious Communication App Child Process", - "description": "Identifies suspicious child processes of communications apps, which can indicate a potential masquerading as the communication app or the exploitation of a vulnerability on the application causing it to execute code.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Persistence", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - }, - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - }, - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1554", - "name": "Compromise Client Software Binary", - "reference": "https://attack.mitre.org/techniques/T1554/" - } - ] - } - ], - "id": "60c933ab-bd79-4270-956d-22c135929b0e", - "rule_id": "adbfa3ee-777e-4747-b6b0-7bd645f30880", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n /* Slack */\n (process.parent.name : \"slack.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Zoom\\\\bin\\\\Zoom.exe\",\n \"?:\\\\Windows\\\\System32\\\\rundll32.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Mozilla Firefox\\\\firefox.exe\",\n \"?:\\\\Windows\\\\System32\\\\notepad.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Slack Technologies, Inc.\",\n \"Slack Technologies, LLC\"\n ) and process.code_signature.trusted == true\n ) or\n (\n (process.name : \"powershell.exe\" and process.command_line : \"powershell.exe -c Invoke-WebRequest -Uri https://slackb.com/*\") or\n (process.name : \"cmd.exe\" and process.command_line : \"C:\\\\WINDOWS\\\\system32\\\\cmd.exe /d /s /c \\\"%windir%\\\\System32\\\\rundll32.exe User32.dll,SetFocus 0\\\"\")\n )\n )\n ) or\n\n /* WebEx */\n (process.parent.name : (\"CiscoCollabHost.exe\", \"WebexHost.exe\") and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Cisco Systems, Inc.\",\n \"Cisco WebEx LLC\",\n \"Cisco Systems Inc.\"\n ) and process.code_signature.trusted == true\n )\n )\n ) or\n\n /* Teams */\n (process.parent.name : \"Teams.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Microsoft Corporation\",\n \"Microsoft 3rd Party Application Component\"\n ) and process.code_signature.trusted == true\n ) or\n (\n (process.name : \"taskkill.exe\" and process.args : \"Teams.exe\")\n )\n )\n ) or\n\n /* Discord */\n (process.parent.name : \"Discord.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\reg.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\reg.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Discord Inc.\"\n ) and process.code_signature.trusted == true\n ) or\n (\n process.name : \"cmd.exe\" and process.command_line : (\n \"C:\\\\WINDOWS\\\\system32\\\\cmd.exe /d /s /c \\\"chcp\\\"\",\n \"C:\\\\WINDOWS\\\\system32\\\\cmd.exe /q /d /s /c \\\"C:\\\\Program^ Files\\\\NVIDIA^ Corporation\\\\NVSMI\\\\nvidia-smi.exe\\\"\"\n )\n )\n )\n ) or\n\n /* WhatsApp */\n (process.parent.name : \"Whatsapp.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\reg.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\reg.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"WhatsApp LLC\",\n \"WhatsApp, Inc\",\n \"24803D75-212C-471A-BC57-9EF86AB91435\"\n ) and process.code_signature.trusted == true\n ) or\n (\n (process.name : \"cmd.exe\" and process.command_line : \"C:\\\\Windows\\\\system32\\\\cmd.exe /d /s /c \\\"C:\\\\Windows\\\\system32\\\\wbem\\\\wmic.exe*\")\n )\n )\n ) or\n\n /* Zoom */\n (process.parent.name : \"Zoom.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Zoom Video Communications, Inc.\"\n ) and process.code_signature.trusted == true\n )\n )\n ) or\n\n /* Outlook */\n (process.parent.name : \"outlook.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Microsoft\\\\Teams\\\\current\\\\Teams.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\NewOutlookInstall\\\\NewOutlookInstaller.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Zoom\\\\bin\\\\Zoom.exe\",\n \"?:\\\\Windows\\\\System32\\\\IME\\\\SHARED\\\\IMEWDBLD.EXE\",\n \"?:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\prevhost.exe\",\n \"?:\\\\Windows\\\\System32\\\\dwwin.exe\",\n \"?:\\\\Windows\\\\System32\\\\notepad.exe\",\n \"?:\\\\Windows\\\\explorer.exe\"\n ) and process.code_signature.trusted == true \n )\n )\n ) or\n\n /* Thunderbird */\n (process.parent.name : \"thunderbird.exe\" and not\n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\"\n ) and process.code_signature.trusted == true \n ) or\n (\n process.code_signature.subject_name : (\n \"Mozilla Corporation\"\n ) and process.code_signature.trusted == true\n )\n )\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual User Privilege Enumeration via id", - "description": "This rule monitors for a sequence of 20 \"id\" command executions within 1 second by the same parent process. This behavior is unusual, and may be indicative of the execution of an enumeration script such as LinPEAS or LinEnum. These scripts leverage the \"id\" command to enumerate the privileges of all users present on the system.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1033", - "name": "System Owner/User Discovery", - "reference": "https://attack.mitre.org/techniques/T1033/" - } - ] - } - ], - "id": "ac872de7-488d-48a6-9d5a-7d0b6cb37c2a", - "rule_id": "afa135c0-a365-43ab-aa35-fd86df314a47", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, process.parent.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name == \"id\" and process.args_count == 2 and \n not (process.parent.name == \"rpm\" or process.parent.args : \"/var/tmp/rpm-tmp*\")] with runs=20\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Network Activity Detected via cat", - "description": "This rule monitors for the execution of the cat command, followed by a connection attempt by the same process. Cat is capable of transfering data via tcp/udp channels by redirecting its read output to a /dev/tcp or /dev/udp channel. This activity is highly suspicious, and should be investigated. Attackers may leverage this capability to transfer tools or files to another host in the network or exfiltrate data while attempting to evade detection in the process.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [] - } - ], - "id": "448298ee-9121-4e34-81f7-cc44668e19aa", - "rule_id": "afd04601-12fc-4149-9b78-9c3f8fe45d39", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and process.name == \"cat\" and \n process.parent.name in (\"bash\", \"dash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")]\n [network where host.os.type == \"linux\" and event.action in (\"connection_attempted\", \"disconnect_received\") and process.name == \"cat\" and \n destination.ip != null and not cidrmatch(destination.ip, \"127.0.0.0/8\", \"169.254.0.0/16\", \"224.0.0.0/4\", \"::1\")]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Network Share Discovery", - "description": "Adversaries may look for folders and drives shared on remote systems to identify sources of information to gather as a precursor for collection and identify potential systems of interest for Lateral Movement.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Tactic: Collection", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1135", - "name": "Network Share Discovery", - "reference": "https://attack.mitre.org/techniques/T1135/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1039", - "name": "Data from Network Shared Drive", - "reference": "https://attack.mitre.org/techniques/T1039/" - } - ] - } - ], - "id": "fe122867-0662-4780-9a2e-16cf78a5d0ef", - "rule_id": "b2318c71-5959-469a-a3ce-3a0768e63b9c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - }, - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "source.ip", - "type": "ip", - "ecs": true - }, - { - "name": "source.port", - "type": "long", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.ShareName", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "sequence by user.name, source.port, source.ip with maxspan=15s \n [file where event.action == \"network-share-object-access-checked\" and \n winlog.event_data.ShareName : (\"\\\\*ADMIN$\", \"\\\\*C$\") and \n source.ip != null and source.ip != \"0.0.0.0\" and source.ip != \"::1\" and source.ip != \"::\" and source.ip != \"127.0.0.1\"]\n [file where event.action == \"network-share-object-access-checked\" and \n winlog.event_data.ShareName : (\"\\\\*ADMIN$\", \"\\\\*C$\") and \n source.ip != null and source.ip != \"0.0.0.0\" and source.ip != \"::1\" and source.ip != \"::\" and source.ip != \"127.0.0.1\"]\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*", - "logs-system.*" - ] - }, - { - "name": "Microsoft 365 Unusual Volume of File Deletion", - "description": "Identifies that a user has deleted an unusually large volume of files as reported by Microsoft Cloud App Security.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Users or System Administrator cleaning out folders." - ], - "references": [ - "https://docs.microsoft.com/en-us/cloud-app-security/anomaly-detection-policy", - "https://docs.microsoft.com/en-us/cloud-app-security/policy-template-reference" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - } - ], - "id": "b7c5f85b-a6cb-41f6-99ff-7f6529dda1ff", - "rule_id": "b2951150-658f-4a60-832f-a00d1e6c6745", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.category:web and event.action:\"Unusual volume of file deletion\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "At.exe Command Lateral Movement", - "description": "Identifies use of at.exe to interact with the task scheduler on remote hosts. Remote task creations, modifications or execution could be indicative of adversary lateral movement.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1053", - "name": "Scheduled Task/Job", - "reference": "https://attack.mitre.org/techniques/T1053/", - "subtechnique": [ - { - "id": "T1053.002", - "name": "At", - "reference": "https://attack.mitre.org/techniques/T1053/002/" - }, - { - "id": "T1053.005", - "name": "Scheduled Task", - "reference": "https://attack.mitre.org/techniques/T1053/005/" - } - ] - } - ] - } - ], - "id": "d6d93c79-65d8-4c84-a40d-4849767706e1", - "rule_id": "b483365c-98a8-40c0-92d8-0458ca25058a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"at.exe\" and process.args : \"\\\\\\\\*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Azure Event Hub Authorization Rule Created or Updated", - "description": "Identifies when an Event Hub Authorization Rule is created or updated in Azure. An authorization rule is associated with specific rights, and carries a pair of cryptographic keys. When you create an Event Hubs namespace, a policy rule named RootManageSharedAccessKey is created for the namespace. This has manage permissions for the entire namespace and it's recommended that you treat this rule like an administrative root account and don't use it in your application.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 103, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Log Auditing", - "Tactic: Collection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Authorization rule additions or modifications may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Authorization rule additions or modifications from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/event-hubs/authorize-access-shared-access-signature" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1530", - "name": "Data from Cloud Storage", - "reference": "https://attack.mitre.org/techniques/T1530/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1537", - "name": "Transfer Data to Cloud Account", - "reference": "https://attack.mitre.org/techniques/T1537/" - } - ] - } - ], - "id": "c2a4583d-5606-4acf-88d2-c63d22ad8063", - "rule_id": "b6dce542-2b75-4ffb-b7d6-38787298ba9d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.EVENTHUB/NAMESPACES/AUTHORIZATIONRULES/WRITE\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Linux System Information Discovery", - "description": "Enrich process events with uname and other command lines that imply Linux system information discovery.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1082", - "name": "System Information Discovery", - "reference": "https://attack.mitre.org/techniques/T1082/" - } - ] - } - ], - "id": "79e91603-bafc-4bc5-89ef-cb9385bbab71", - "rule_id": "b81bd314-db5b-4d97-82e8-88e3e5fc9de5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and\n(\n process.name: \"uname\" or\n (process.name: (\"cat\", \"more\", \"less\") and\n process.args: (\"*issue*\", \"*version*\", \"*profile*\", \"*services*\", \"*cpuinfo*\"))\n)\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Kirbi File Creation", - "description": "Identifies the creation of .kirbi files. The creation of this kind of file is an indicator of an attacker running Kerberos ticket dump utilities, such as Mimikatz, and precedes attacks such as Pass-The-Ticket (PTT), which allows the attacker to impersonate users using Kerberos tickets.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - }, - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/" - } - ] - } - ], - "id": "40740277-0995-42ea-ae05-4b896455eb67", - "rule_id": "b8f8da2d-a9dc-48c0-90e4-955c0aa1259a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and file.extension : \"kirbi\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Multiple Alerts in Different ATT&CK Tactics on a Single Host", - "description": "This rule uses alert data to determine when multiple alerts in different phases of an attack involving the same host are triggered. Analysts can use this to prioritize triage and response, as these hosts are more likely to be compromised.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 4, - "tags": [ - "Use Case: Threat Detection", - "Rule Type: Higher-Order Rule" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "1h", - "from": "now-24h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "False positives can occur because the rules may be mapped to a few MITRE ATT&CK tactics. Use the attached Timeline to determine which detections were triggered on the host." - ], - "references": [], - "max_signals": 100, - "threat": [], - "id": "37050c8c-9432-4f95-bea0-ef06d5790b60", - "rule_id": "b946c2f7-df06-4c00-a5aa-1f6fbc7bb72c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "kibana.alert.rule.threat.tactic.id", - "type": "unknown", - "ecs": false - }, - { - "name": "signal.rule.name", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "threshold", - "query": "signal.rule.name:* and kibana.alert.rule.threat.tactic.id:*\n", - "threshold": { - "field": [ - "host.id" - ], - "value": 1, - "cardinality": [ - { - "field": "kibana.alert.rule.threat.tactic.id", - "value": 3 - } - ] - }, - "index": [ - ".alerts-security.*" - ], - "language": "kuery" - }, - { - "name": "Azure Resource Group Deletion", - "description": "Identifies the deletion of a resource group in Azure, which includes all resources within the group. Deletion is permanent and irreversible. An adversary may delete a resource group in an attempt to evade defenses or intentionally destroy data.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Log Auditing", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Deletion of a resource group may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Resource group deletions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "7f6c7479-8587-4244-9c79-ec1f0c8f9127", - "rule_id": "bb4fe8d2-7ae2-475c-8b5d-55b449e4264f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.RESOURCES/SUBSCRIPTIONS/RESOURCEGROUPS/DELETE\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "OneDrive Malware File Upload", - "description": "Identifies the occurence of files uploaded to OneDrive being detected as Malware by the file scanning engine. Attackers can use File Sharing and Organization Repositories to spread laterally within the company and amplify their access. Users can inadvertently share these files without knowing their maliciousness, giving adversaries opportunity to gain initial access to other endpoints in the environment.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Benign files can trigger signatures in the built-in virus protection" - ], - "references": [ - "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/virus-detection-in-spo?view=o365-worldwide" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1080", - "name": "Taint Shared Content", - "reference": "https://attack.mitre.org/techniques/T1080/" - } - ] - } - ], - "id": "40da07a5-4e1c-4b4a-95e8-b73c8869d11e", - "rule_id": "bba1b212-b85c-41c6-9b28-be0e5cdfc9b1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:OneDrive and event.code:SharePointFileOperation and event.action:FileMalwareDetected\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 Teams Custom Application Interaction Allowed", - "description": "Identifies when custom applications are allowed in Microsoft Teams. If an organization requires applications other than those available in the Teams app store, custom applications can be developed as packages and uploaded. An adversary may abuse this behavior to establish persistence in an environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Custom applications may be allowed by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/deploy-and-publish/apps-upload" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - } - ], - "id": "f4cbff4a-4895-4be6-8069-70f8fba55f05", - "rule_id": "bbd1a775-8267-41fa-9232-20e5582596ac", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "o365.audit.Name", - "type": "keyword", - "ecs": false - }, - { - "name": "o365.audit.NewValue", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:MicrosoftTeams and\nevent.category:web and event.action:TeamsTenantSettingChanged and\no365.audit.Name:\"Allow sideloading and interaction of custom apps\" and\no365.audit.NewValue:True and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "GCP Storage Bucket Deletion", - "description": "Identifies when a Google Cloud Platform (GCP) storage bucket is deleted. An adversary may delete a storage bucket in order to disrupt their target's business operations.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Storage buckets may be deleted by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Bucket deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/storage/docs/key-terms#buckets" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - } - ], - "id": "c13cf5af-7b10-4b51-9189-42e2ecab2d92", - "rule_id": "bc0f2d83-32b8-4ae2-b0e6-6a45772e9331", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:\"storage.buckets.delete\"\n", - "language": "kuery" - }, - { - "name": "Azure Conditional Access Policy Modified", - "description": "Identifies when an Azure Conditional Access policy is modified. Azure Conditional Access policies control access to resources via if-then statements. For example, if a user wants to access a resource, then they must complete an action such as using multi-factor authentication to access it. An adversary may modify a Conditional Access policy in order to weaken their target's security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Configuration Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/overview" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "28473cab-ae72-41c8-a338-902647fbe832", - "rule_id": "bc48bba7-4a23-4232-b551-eca3ca1e3f20", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - }, - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:(azure.activitylogs or azure.auditlogs) and\nevent.action:\"Update conditional access policy\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "GCP Service Account Disabled", - "description": "Identifies when a service account is disabled in Google Cloud Platform (GCP). A service account is a special type of account used by an application or a virtual machine (VM) instance, not a person. Applications use service accounts to make authorized API calls, authorized as either the service account itself, or as G Suite or Cloud Identity users through domain-wide delegation. An adversary may disable a service account in order to disrupt to disrupt their target's business operations.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Identity and Access Audit", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Service accounts may be disabled by system administrators. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/iam/docs/service-accounts" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1531", - "name": "Account Access Removal", - "reference": "https://attack.mitre.org/techniques/T1531/" - } - ] - } - ], - "id": "18f46392-2f95-4b95-af82-224bbe1fe249", - "rule_id": "bca7d28e-4a48-47b1-adb7-5074310e9a61", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.DisableServiceAccount and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "System Owner/User Discovery Linux", - "description": "Identifies the use of built-in tools which adversaries may use to enumerate the system owner/user of a compromised system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1033", - "name": "System Owner/User Discovery", - "reference": "https://attack.mitre.org/techniques/T1033/" - }, - { - "id": "T1069", - "name": "Permission Groups Discovery", - "reference": "https://attack.mitre.org/techniques/T1069/" - } - ] - } - ], - "id": "194feeab-06a3-47f2-9728-1599d1c5acfb", - "rule_id": "bf8c007c-7dee-4842-8e9a-ee534c09d205", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and\n process.name : (\"whoami\", \"w\", \"who\", \"users\", \"id\")\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Credential Manipulation - Detected - Elastic Endgame", - "description": "Elastic Endgame detected Credential Manipulation. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/" - } - ] - } - ], - "id": "b1deb36c-0d6d-4c28-8310-0c55ce4690c9", - "rule_id": "c0be5f31-e180-48ed-aa08-96b36899d48f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:token_manipulation_event or endgame.event_subtype_full:token_manipulation_event)\n", - "language": "kuery" - }, - { - "name": "Unsigned DLL Loaded by a Trusted Process", - "description": "Identifies digitally signed (trusted) processes loading unsigned DLLs. Attackers may plant their payloads into the application folder and invoke the legitimate application to execute the payload, masking actions they perform under a legitimate, trusted, and potentially elevated system or software process.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 101, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.001", - "name": "DLL Search Order Hijacking", - "reference": "https://attack.mitre.org/techniques/T1574/001/" - }, - { - "id": "T1574.002", - "name": "DLL Side-Loading", - "reference": "https://attack.mitre.org/techniques/T1574/002/" - } - ] - } - ] - } - ], - "id": "5dd44365-6389-4783-89ca-dea9d66d34af", - "rule_id": "c20cd758-07b1-46a1-b03f-fa66158258b8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.Ext.device.product_id", - "type": "unknown", - "ecs": false - }, - { - "name": "dll.Ext.relative_file_creation_time", - "type": "unknown", - "ecs": false - }, - { - "name": "dll.Ext.relative_file_name_modify_time", - "type": "unknown", - "ecs": false - }, - { - "name": "dll.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.hash.sha256", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "library where host.os.type == \"windows\" and\n (dll.Ext.relative_file_creation_time <= 500 or\n dll.Ext.relative_file_name_modify_time <= 500 or\n dll.Ext.device.product_id : (\"Virtual DVD-ROM\", \"Virtual Disk\")) and dll.hash.sha256 != null and\n process.code_signature.status :\"trusted\" and not dll.code_signature.status : (\"trusted\", \"errorExpired\", \"errorCode_endpoint*\") and\n /* DLL loaded from the process.executable current directory */\n endswith~(substring(dll.path, 0, length(dll.path) - (length(dll.name) + 1)), substring(process.executable, 0, length(process.executable) - (length(process.name) + 1)))\n and not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Permission Theft - Detected - Elastic Endgame", - "description": "Elastic Endgame detected Permission Theft. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/" - } - ] - } - ], - "id": "b990f237-6a45-47be-8e10-4b1586f0aaaf", - "rule_id": "c3167e1b-f73c-41be-b60b-87f4df707fe3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:detection and (event.action:token_protection_event or endgame.event_subtype_full:token_protection_event)\n", - "language": "kuery" - }, - { - "name": "GCP Virtual Private Cloud Network Deletion", - "description": "Identifies when a Virtual Private Cloud (VPC) network is deleted in Google Cloud Platform (GCP). A VPC network is a virtual version of a physical network within a GCP project. Each VPC network has its own subnets, routes, and firewall, as well as other elements. An adversary may delete a VPC network in order to disrupt their target's network and business operations.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Virtual Private Cloud networks may be deleted by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/vpc/docs/vpc" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.007", - "name": "Disable or Modify Cloud Firewall", - "reference": "https://attack.mitre.org/techniques/T1562/007/" - } - ] - } - ] - } - ], - "id": "178c36f1-79e2-460c-90ed-ee1093d4c271", - "rule_id": "c58c3081-2e1d-4497-8491-e73a45d1a6d6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:v*.compute.networks.delete and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "CyberArk Privileged Access Security Recommended Monitor", - "description": "Identifies the occurrence of a CyberArk Privileged Access Security (PAS) non-error level audit event which is recommended for monitoring by the vendor. The event.code correlates to the CyberArk Vault Audit Action Code.", - "risk_score": 73, - "severity": "high", - "rule_name_override": "event.action", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\nThis is a promotion rule for CyberArk events, which the vendor recommends should be monitored.\nConsult vendor documentation on interpreting specific events.", - "version": 102, - "tags": [ - "Data Source: CyberArk PAS", - "Use Case: Log Auditing", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "To tune this rule, add exceptions to exclude any event.code which should not trigger this rule." - ], - "references": [ - "https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PASREF/Vault%20Audit%20Action%20Codes.htm?tocpath=Administration%7CReferences%7C_____3#RecommendedActionCodesforMonitoring" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [] - } - ], - "id": "effce35a-9261-48ed-87cc-8ce2f9381e78", - "rule_id": "c5f81243-56e0-47f9-b5bb-55a5ed89ba57", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cyberarkpas", - "version": "^2.2.0" - } - ], - "required_fields": [ - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "The CyberArk Privileged Access Security (PAS) Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-cyberarkpas.audit*" - ], - "query": "event.dataset:cyberarkpas.audit and\n event.code:(4 or 22 or 24 or 31 or 38 or 57 or 60 or 130 or 295 or 300 or 302 or\n 308 or 319 or 344 or 346 or 359 or 361 or 378 or 380 or 411) and\n not event.type:error\n", - "language": "kuery" - }, - { - "name": "Kubernetes Privileged Pod Created", - "description": "This rule detects when a user creates a pod/container running in privileged mode. A highly privileged container has access to the node's resources and breaks the isolation between containers. If compromised, an attacker can use the privileged container to gain access to the underlying host. Gaining access to the host may provide the adversary with the opportunity to achieve follow-on objectives, such as establishing persistence, moving laterally within the environment, or setting up a command and control channel on the host.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 202, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Execution", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "By default a container is not allowed to access any devices on the host, but a \"privileged\" container is given access to all devices on the host. This allows the container nearly all the same access as processes running on the host. An administrator may want to run a privileged container to use operating system administrative capabilities such as manipulating the network stack or accessing hardware devices from within the cluster. Add exceptions for trusted container images using the query field \"kubernetes.audit.requestObject.spec.container.image\"" - ], - "references": [ - "https://media.defense.gov/2021/Aug/03/2002820425/-1/-1/1/CTR_KUBERNETES%20HARDENING%20GUIDANCE.PDF", - "https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1611", - "name": "Escape to Host", - "reference": "https://attack.mitre.org/techniques/T1611/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1610", - "name": "Deploy Container", - "reference": "https://attack.mitre.org/techniques/T1610/" - } - ] - } - ], - "id": "e1cffa1e-8da2-48a6-8219-f3862831d682", - "rule_id": "c7908cac-337a-4f38-b50d-5eeb78bdb531", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.resource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.containers.image", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.containers.securityContext.privileged", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.verb", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:pods\n and kubernetes.audit.verb:create\n and kubernetes.audit.requestObject.spec.containers.securityContext.privileged:true\n and not kubernetes.audit.requestObject.spec.containers.image: (\"docker.elastic.co/beats/elastic-agent:8.4.0\")\n", - "language": "kuery" - }, - { - "name": "Credential Manipulation - Prevented - Elastic Endgame", - "description": "Elastic Endgame prevented Credential Manipulation. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1134", - "name": "Access Token Manipulation", - "reference": "https://attack.mitre.org/techniques/T1134/" - } - ] - } - ], - "id": "def00a7a-ba21-40ab-b554-79c625141462", - "rule_id": "c9e38e64-3f4c-4bf3-ad48-0e61a60ea1fa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:token_manipulation_event or endgame.event_subtype_full:token_manipulation_event)\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 Exchange Malware Filter Rule Modification", - "description": "Identifies when a malware filter rule has been deleted or disabled in Microsoft 365. An adversary or insider threat may want to modify a malware filter rule to evade detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A malware filter rule may be deleted by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-malwarefilterrule?view=exchange-ps", - "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-malwarefilterrule?view=exchange-ps" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "b44140b8-b96e-448a-aec3-08cbdeaaa491", - "rule_id": "ca79768e-40e1-4e45-a097-0e5fbc876ac2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:(\"Remove-MalwareFilterRule\" or \"Disable-MalwareFilterRule\") and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Google Workspace MFA Enforcement Disabled", - "description": "Detects when multi-factor authentication (MFA) enforcement is disabled for Google Workspace users. An adversary may disable MFA enforcement in order to weaken an organization’s security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Google Workspace MFA Enforcement Disabled\n\nMulti-factor authentication is a process in which users are prompted during the sign-in process for an additional form of identification, such as a code on their cellphone or a fingerprint scan.\n\nIf you only use a password to authenticate a user, it leaves an insecure vector for attack. If the password is weak or has been exposed elsewhere, an attacker could be using it to gain access. When you require a second form of authentication, security is increased because this additional factor isn't something that's easy for an attacker to obtain or duplicate.\n\nFor more information about using MFA in Google Workspace, access the [official documentation](https://support.google.com/a/answer/175197).\n\nThis rule identifies the disabling of MFA enforcement in Google Workspace. This modification weakens the security of the accounts and can lead to the compromise of accounts and other assets.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- While this activity can be done by administrators, all users must use MFA. The security team should address any potential benign true positive (B-TP), as this configuration can risk the user and domain.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate the multi-factor authentication enforcement.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security best practices [outlined](https://support.google.com/a/answer/7587183) by Google.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n\n\n\n### Important Information Regarding Google Workspace Event Lag Times\n\n- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.\n- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.\n- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.\n- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).\n- See the following references for further information:\n - https://support.google.com/a/answer/7061566\n - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html", - "version": 207, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Configuration Audit", - "Tactic: Impact", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "MFA policies may be modified by system administrators. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://support.google.com/a/answer/9176657?hl=en#" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1531", - "name": "Account Access Removal", - "reference": "https://attack.mitre.org/techniques/T1531/" - } - ] - } - ], - "id": "da76b106-6585-4905-b696-18a62c3cf798", - "rule_id": "cad4500a-abd7-4ef3-b5d3-95524de7cfe1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "google_workspace.admin.new_value", - "type": "keyword", - "ecs": false - } - ], - "setup": "The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset:google_workspace.admin and event.provider:admin\n and event.category:iam and event.action:ENFORCE_STRONG_AUTHENTICATION\n and google_workspace.admin.new_value:false\n", - "language": "kuery" - }, - { - "name": "GCP Pub/Sub Subscription Deletion", - "description": "Identifies the deletion of a subscription in Google Cloud Platform (GCP). In GCP, the publisher-subscriber relationship (Pub/Sub) is an asynchronous messaging service that decouples event-producing and event-processing services. A subscription is a named resource representing the stream of messages to be delivered to the subscribing application.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Log Auditing", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Subscription deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Subscription deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/pubsub/docs/overview" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "a76b6efe-8922-46e1-a79e-3f96bd259d36", - "rule_id": "cc89312d-6f47-48e4-a87c-4977bd4633c3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.pubsub.v*.Subscriber.DeleteSubscription and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Compression DLL Loaded by Unusual Process", - "description": "Identifies the image load of a compression DLL. Adversaries will often compress and encrypt data in preparation for exfiltration.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1560", - "name": "Archive Collected Data", - "reference": "https://attack.mitre.org/techniques/T1560/" - } - ] - } - ], - "id": "3c61f441-76f8-46e9-845f-f886d4cc8a77", - "rule_id": "d197478e-39f0-4347-a22f-ba654718b148", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "library where \n dll.name : (\"System.IO.Compression.FileSystem.ni.dll\", \"System.IO.Compression.ni.dll\") and\n not \n (\n (\n process.executable : (\n \"?:\\\\Program Files\\\\*\",\n \"?:\\\\Program Files (x86)\\\\*\",\n \"?:\\\\Windows\\\\Microsoft.NET\\\\Framework*\\\\mscorsvw.exe\",\n \"?:\\\\Windows\\\\System32\\\\sdiagnhost.exe\",\n \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\w3wp.exe\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows Defender Advanced Threat Protection\\\\DataCollection\\\\*\\\\OpenHandleCollector.exe\"\n ) and process.code_signature.trusted == true\n ) or\n (\n process.name : \"NuGet.exe\" and process.code_signature.trusted == true and user.id : (\"S-1-5-18\", \"S-1-5-20\")\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Web Application Suspicious Activity: sqlmap User Agent", - "description": "This is an example of how to detect an unwanted web client user agent. This search matches the user agent for sqlmap 1.3.11, which is a popular FOSS tool for testing web applications for SQL injection vulnerabilities.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 102, - "tags": [ - "Data Source: APM" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "This rule does not indicate that a SQL injection attack occurred, only that the `sqlmap` tool was used. Security scans and tests may result in these errors. If the source is not an authorized security tester, this is generally suspicious or malicious activity." - ], - "references": [ - "http://sqlmap.org/" - ], - "max_signals": 100, - "threat": [], - "id": "6223caf5-8d51-439e-b9de-282676ea2758", - "rule_id": "d49cc73f-7a16-4def-89ce-9fc7127d7820", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "apm", - "version": "^8.0.0" - } - ], - "required_fields": [ - { - "name": "user_agent.original", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "apm-*-transaction*", - "traces-apm*" - ], - "query": "user_agent.original:\"sqlmap/1.3.11#stable (http://sqlmap.org)\"\n", - "language": "kuery" - }, - { - "name": "Linux init (PID 1) Secret Dump via GDB", - "description": "This rule monitors for the potential memory dump of the init process (PID 1) through gdb. Attackers may leverage memory dumping techniques to attempt secret extraction from privileged processes. Tools that display this behavior include \"truffleproc\" and \"bash-memory-dump\". This behavior should not happen by default, and should be investigated thoroughly.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/controlplaneio/truffleproc", - "https://github.com/hajzer/bash-memory-dump" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.007", - "name": "Proc Filesystem", - "reference": "https://attack.mitre.org/techniques/T1003/007/" - } - ] - } - ] - } - ], - "id": "1e960657-5b57-4ef4-8f1d-1f956e912c77", - "rule_id": "d4ff2f53-c802-4d2e-9fb9-9ecc08356c3f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"gdb\" and process.args in (\"--pid\", \"-p\") and process.args == \"1\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "GCP Pub/Sub Subscription Creation", - "description": "Identifies the creation of a subscription in Google Cloud Platform (GCP). In GCP, the publisher-subscriber relationship (Pub/Sub) is an asynchronous messaging service that decouples event-producing and event-processing services. A subscription is a named resource representing the stream of messages to be delivered to the subscribing application.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 105, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Log Auditing", - "Tactic: Collection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Subscription creations may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Subscription creations by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/pubsub/docs/overview" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1530", - "name": "Data from Cloud Storage", - "reference": "https://attack.mitre.org/techniques/T1530/" - } - ] - } - ], - "id": "12198067-c394-4a0e-b755-58558934e5c9", - "rule_id": "d62b64a8-a7c9-43e5-aee3-15a725a794e7", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.pubsub.v*.Subscriber.CreateSubscription and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 Exchange Anti-Phish Policy Deletion", - "description": "Identifies the deletion of an anti-phishing policy in Microsoft 365. By default, Microsoft 365 includes built-in features that help protect users from phishing attacks. Anti-phishing polices increase this protection by refining settings to better detect and prevent attacks.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "An anti-phishing policy may be deleted by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-antiphishpolicy?view=exchange-ps", - "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/set-up-anti-phishing-policies?view=o365-worldwide" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/" - } - ] - } - ], - "id": "582a2b9d-386f-47f8-9450-86ee7f77e0c9", - "rule_id": "d68eb1b5-5f1c-4b6d-9e63-5b6b145cd4aa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Remove-AntiPhishPolicy\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Microsoft 365 Exchange Malware Filter Policy Deletion", - "description": "Identifies when a malware filter policy has been deleted in Microsoft 365. A malware filter policy is used to alert administrators that an internal user sent a message that contained malware. This may indicate an account or machine compromise that would need to be investigated. Deletion of a malware filter policy may be done to evade detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A malware filter policy may be deleted by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/remove-malwarefilterpolicy?view=exchange-ps" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "f2947459-c8fa-4859-b511-022a5fc30133", - "rule_id": "d743ff2a-203e-4a46-a3e3-40512cfe8fbb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"Remove-MalwareFilterPolicy\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Potential Pass-the-Hash (PtH) Attempt", - "description": "Adversaries may pass the hash using stolen password hashes to move laterally within an environment, bypassing normal system access controls. Pass the hash (PtH) is a method of authenticating as a user without having access to the user's cleartext password.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://attack.mitre.org/techniques/T1550/002/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1550", - "name": "Use Alternate Authentication Material", - "reference": "https://attack.mitre.org/techniques/T1550/", - "subtechnique": [ - { - "id": "T1550.002", - "name": "Pass the Hash", - "reference": "https://attack.mitre.org/techniques/T1550/002/" - } - ] - } - ] - } - ], - "id": "1cd8e30e-1673-4042-8e1e-4ef69cac6335", - "rule_id": "daafdf96-e7b1-4f14-b494-27e0d24b11f6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - }, - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.LogonProcessName", - "type": "keyword", - "ecs": false - }, - { - "name": "winlog.logon.type", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type:\"windows\" and \nevent.category : \"authentication\" and event.action : \"logged-in\" and \nwinlog.logon.type : \"NewCredentials\" and event.outcome : \"success\" and \nuser.id : (S-1-5-21-* or S-1-12-1-*) and winlog.event_data.LogonProcessName : \"seclogo\"\n", - "new_terms_fields": [ - "user.id" - ], - "history_window_start": "now-10d", - "index": [ - "winlogbeat-*", - "logs-windows.*", - "logs-system.*" - ], - "language": "kuery" - }, - { - "name": "Multi-Factor Authentication Disabled for an Azure User", - "description": "Identifies when multi-factor authentication (MFA) is disabled for an Azure user account. An adversary may disable MFA for a user account in order to weaken the authentication requirements for the account.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Multi-Factor Authentication Disabled for an Azure User\n\nMulti-factor authentication is a process in which users are prompted during the sign-in process for an additional form of identification, such as a code on their cellphone or a fingerprint scan.\n\nIf you only use a password to authenticate a user, it leaves an insecure vector for attack. If the password is weak or has been exposed elsewhere, an attacker could be using it to gain access. When you require a second form of authentication, security is increased because this additional factor isn't something that's easy for an attacker to obtain or duplicate.\n\nFor more information about using MFA in Azure AD, access the [official documentation](https://docs.microsoft.com/en-us/azure/active-directory/authentication/concept-mfa-howitworks#how-to-enable-and-use-azure-ad-multi-factor-authentication).\n\nThis rule identifies the deactivation of MFA for an Azure user account. This modification weakens account security and can lead to the compromise of accounts and other assets.\n\n#### Possible investigation steps\n\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user account during the past 48 hours.\n- Contact the account and resource owners and confirm whether they are aware of this activity.\n- Check if this operation was approved and performed according to the organization's change management policy.\n- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.\n\n### False positive analysis\n\n- While this activity can be done by administrators, all users must use MFA. The security team should address any potential benign true positive (B-TP), as this configuration can risk the user and domain.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Disable or limit the account during the investigation and response.\n- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:\n - Identify the account role in the cloud environment.\n - Assess the criticality of affected services and servers.\n - Work with your IT team to identify and minimize the impact on users.\n - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.\n - Identify any regulatory or legal ramifications related to this activity.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.\n- Reactivate multi-factor authentication for the user.\n- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.\n- Implement security defaults [provided by Microsoft](https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/concept-fundamentals-security-defaults).\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 105, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "d7742322-b171-4698-838d-7a2f55284b1c", - "rule_id": "dafa3235-76dc-40e2-9f71-1773b96d24cf", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Disable Strong Authentication\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Network-Level Authentication (NLA) Disabled", - "description": "Identifies the attempt to disable Network-Level Authentication (NLA) via registry modification. Network Level Authentication (NLA) is a feature on Windows that provides an extra layer of security for Remote Desktop (RDP) connections, as it requires users to authenticate before allowing a full RDP session. Attackers can disable NLA to enable persistence methods that require access to the Windows sign-in screen without authenticating, such as Accessibility Features persistence methods, like Sticky Keys.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Data Source: Elastic Endgame", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.microsoft.com/en-us/security/blog/2023/08/24/flax-typhoon-using-legitimate-software-to-quietly-access-taiwanese-organizations/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - }, - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "8e318d58-dec5-4c50-8b63-e1e880470c8b", - "rule_id": "db65f5ba-d1ef-4944-b9e8-7e51060c2b42", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.action != \"deletion\" and\n registry.path :\n (\"HKLM\\\\SYSTEM\\\\ControlSet*\\\\Control\\\\Terminal Server\\\\WinStations\\\\RDP-Tcp\\\\UserAuthentication\", \n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Terminal Server\\\\WinStations\\\\RDP-Tcp\\\\UserAuthentication\" ) and\n registry.data.strings : \"0\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Credential Dumping - Prevented - Elastic Endgame", - "description": "Elastic Endgame prevented Credential Dumping. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame", - "Use Case: Threat Detection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "82bc27b6-267e-4ba2-9b6b-756c6edca093", - "rule_id": "db8c33a8-03cd-4988-9e2c-d0a4863adb13", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:cred_theft_event or endgame.event_subtype_full:cred_theft_event)\n", - "language": "kuery" - }, - { - "name": "Azure Automation Account Created", - "description": "Identifies when an Azure Automation account is created. Azure Automation accounts can be used to automate management tasks and orchestrate actions across systems. An adversary may create an Automation account in order to maintain persistence in their target's environment.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://powerzure.readthedocs.io/en/latest/Functions/operational.html#create-backdoor", - "https://github.com/hausec/PowerZure", - "https://posts.specterops.io/attacking-azure-azure-ad-and-introducing-powerzure-ca70b330511a", - "https://azure.microsoft.com/en-in/blog/azure-automation-runbook-management/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "0f32a4d2-1b1e-4191-b1c2-4900a32abd0b", - "rule_id": "df26fd74-1baa-4479-b42e-48da84642330", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/WRITE\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Kubernetes Pod Created With HostPID", - "description": "This rule detects an attempt to create or modify a pod attached to the host PID namespace. HostPID allows a pod to access all the processes running on the host and could allow an attacker to take malicious action. When paired with ptrace this can be used to escalate privileges outside of the container. When paired with a privileged container, the pod can see all of the processes on the host. An attacker can enter the init system (PID 1) on the host. From there, they could execute a shell and continue to escalate privileges to root.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 202, - "tags": [ - "Data Source: Kubernetes", - "Tactic: Execution", - "Tactic: Privilege Escalation" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "An administrator or developer may want to use a pod that runs as root and shares the hosts IPC, Network, and PID namespaces for debugging purposes. If something is going wrong in the cluster and there is no easy way to SSH onto the host nodes directly, a privileged pod of this nature can be useful for viewing things like iptable rules and network namespaces from the host's perspective. Add exceptions for trusted container images using the query field \"kubernetes.audit.requestObject.spec.container.image\"" - ], - "references": [ - "https://research.nccgroup.com/2021/11/10/detection-engineering-for-kubernetes-clusters/#part3-kubernetes-detections", - "https://kubernetes.io/docs/concepts/security/pod-security-policy/#host-namespaces", - "https://bishopfox.com/blog/kubernetes-pod-privilege-escalation" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1611", - "name": "Escape to Host", - "reference": "https://attack.mitre.org/techniques/T1611/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1610", - "name": "Deploy Container", - "reference": "https://attack.mitre.org/techniques/T1610/" - } - ] - } - ], - "id": "be2def3d-dd34-44e3-ae92-a5f9fe660b60", - "rule_id": "df7fda76-c92b-4943-bc68-04460a5ea5ba", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "kubernetes", - "version": "^1.4.1" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "kubernetes.audit.annotations.authorization_k8s_io/decision", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.objectRef.resource", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.containers.image", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.requestObject.spec.hostPID", - "type": "unknown", - "ecs": false - }, - { - "name": "kubernetes.audit.verb", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Kubernetes Fleet integration with Audit Logs enabled or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "logs-kubernetes.*" - ], - "query": "event.dataset : \"kubernetes.audit_logs\"\n and kubernetes.audit.annotations.authorization_k8s_io/decision:\"allow\"\n and kubernetes.audit.objectRef.resource:\"pods\"\n and kubernetes.audit.verb:(\"create\" or \"update\" or \"patch\")\n and kubernetes.audit.requestObject.spec.hostPID:true\n and not kubernetes.audit.requestObject.spec.containers.image: (\"docker.elastic.co/beats/elastic-agent:8.4.0\")\n", - "language": "kuery" - }, - { - "name": "Azure Firewall Policy Deletion", - "description": "Identifies the deletion of a firewall policy in Azure. An adversary may delete a firewall policy in an attempt to evade defenses and/or to eliminate barriers to their objective.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Network Security Monitoring", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Firewall policy deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Firewall policy deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/firewall-manager/policy-overview" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "2547c0fc-7be2-4c49-853d-f49084aae987", - "rule_id": "e02bd3ea-72c6-4181-ac2b-0f83d17ad969", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.NETWORK/FIREWALLPOLICIES/DELETE\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Azure Event Hub Deletion", - "description": "Identifies an Event Hub deletion in Azure. An Event Hub is an event processing service that ingests and processes large volumes of events and data. An adversary may delete an Event Hub in an attempt to evade detection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Log Auditing", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Event Hub deletions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Event Hub deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-about", - "https://azure.microsoft.com/en-in/services/event-hubs/", - "https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "adb5f692-97c9-422c-9d48-084fdfb78161", - "rule_id": "e0f36de1-0342-453d-95a9-a068b257b053", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.EVENTHUB/NAMESPACES/EVENTHUBS/DELETE\" and event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "System Network Connections Discovery", - "description": "Adversaries may attempt to get a listing of network connections to or from a compromised system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1049", - "name": "System Network Connections Discovery", - "reference": "https://attack.mitre.org/techniques/T1049/" - } - ] - } - ], - "id": "ee7d6f2f-fc51-400d-9fcc-f3ea64121dd6", - "rule_id": "e2dc8f8c-5f16-42fa-b49e-0eb8057f7444", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and\n process.name : (\"netstat\", \"lsof\", \"who\", \"w\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "GCP IAM Role Deletion", - "description": "Identifies an Identity and Access Management (IAM) role deletion in Google Cloud Platform (GCP). A role contains a set of permissions that allows you to perform specific actions on Google Cloud resources. An adversary may delete an IAM role to inhibit access to accounts utilized by legitimate users.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Identity and Access Audit", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Role deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Role deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://cloud.google.com/iam/docs/understanding-roles" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1531", - "name": "Account Access Removal", - "reference": "https://attack.mitre.org/techniques/T1531/" - } - ] - } - ], - "id": "54783da6-440e-4cc4-8738-33557345fa3a", - "rule_id": "e2fb5b18-e33c-4270-851e-c3d675c9afcd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:google.iam.admin.v*.DeleteRole and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Ransomware - Prevented - Elastic Endgame", - "description": "Elastic Endgame prevented ransomware. Click the Elastic Endgame icon in the event.module column or the link in the rule.reference column for additional information.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 101, - "tags": [ - "Data Source: Elastic Endgame" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-15m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [], - "id": "9b335ac5-6dcc-4f3d-b3f2-97f604f35118", - "rule_id": "e3c5d5cb-41d5-4206-805c-f30561eae3ac", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "endgame.event_subtype_full", - "type": "unknown", - "ecs": false - }, - { - "name": "endgame.metadata.type", - "type": "unknown", - "ecs": false - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "endgame-*" - ], - "query": "event.kind:alert and event.module:endgame and endgame.metadata.type:prevention and (event.action:ransomware_event or endgame.event_subtype_full:ransomware_event)\n", - "language": "kuery" - }, - { - "name": "Unusual Process For MSSQL Service Accounts", - "description": "Identifies unusual process executions using MSSQL Service accounts, which can indicate the exploitation/compromise of SQL instances. Attackers may exploit exposed MSSQL instances for initial access or lateral movement.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Tactic: Persistence", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.microsoft.com/en-us/security/blog/2023/08/24/flax-typhoon-using-legitimate-software-to-quietly-access-taiwanese-organizations/", - "https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-windows-service-accounts-and-permissions?view=sql-server-ver16" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1505", - "name": "Server Software Component", - "reference": "https://attack.mitre.org/techniques/T1505/", - "subtechnique": [ - { - "id": "T1505.001", - "name": "SQL Stored Procedures", - "reference": "https://attack.mitre.org/techniques/T1505/001/" - } - ] - } - ] - } - ], - "id": "03bd32cb-83a3-48a9-af34-2f331b7954f1", - "rule_id": "e74d645b-fec6-431e-bf93-ca64a538e0de", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.domain", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and host.os.type == \"windows\" and\n user.name : (\n \"SQLSERVERAGENT\", \"SQLAGENT$*\",\n \"MSSQLSERVER\", \"MSSQL$*\",\n \"MSSQLServerOLAPService\",\n \"ReportServer*\", \"MsDtsServer150\",\n \"MSSQLFDLauncher*\",\n \"SQLServer2005SQLBrowserUser$*\",\n \"SQLWriter\", \"winmgmt\"\n ) and user.domain : \"NT SERVICE\" and\n not (\n process.name : (\n \"sqlceip.exe\", \"sqlservr.exe\", \"sqlagent.exe\",\n \"msmdsrv.exe\", \"ReportingServicesService.exe\",\n \"MsDtsSrvr.exe\", \"sqlbrowser.exe\"\n ) and (process.code_signature.subject_name : \"Microsoft Corporation\" and process.code_signature.trusted == true)\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Azure Automation Webhook Created", - "description": "Identifies when an Azure Automation webhook is created. Azure Automation runbooks can be configured to execute via a webhook. A webhook uses a custom URL passed to Azure Automation along with a data payload specific to the runbook. An adversary may create a webhook in order to trigger a runbook that contains malicious code.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Configuration Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://powerzure.readthedocs.io/en/latest/Functions/operational.html#create-backdoor", - "https://github.com/hausec/PowerZure", - "https://posts.specterops.io/attacking-azure-azure-ad-and-introducing-powerzure-ca70b330511a", - "https://www.ciraltos.com/webhooks-and-azure-automation-runbooks/" - ], - "max_signals": 100, - "threat": [], - "id": "c7fdf8ae-0b2b-46ea-82cc-d62d72d12ba6", - "rule_id": "e9ff9c1c-fe36-4d0d-b3fd-9e0bf4853a62", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and\n azure.activitylogs.operation_name:\n (\n \"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/WEBHOOKS/ACTION\" or\n \"MICROSOFT.AUTOMATION/AUTOMATIONACCOUNTS/WEBHOOKS/WRITE\"\n ) and\n event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "External Alerts", - "description": "Generates a detection alert for each external alert written to the configured indices. Enabling this rule allows you to immediately begin investigating external alerts in the app.", - "risk_score": 47, - "severity": "medium", - "rule_name_override": "message", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 102, - "tags": [ - "OS: Windows", - "Data Source: APM", - "OS: macOS", - "OS: Linux" - ], - "enabled": false, - "risk_score_mapping": [ - { - "field": "event.risk_score", - "operator": "equals", - "value": "" - } - ], - "severity_mapping": [ - { - "field": "event.severity", - "operator": "equals", - "severity": "low", - "value": "21" - }, - { - "field": "event.severity", - "operator": "equals", - "severity": "medium", - "value": "47" - }, - { - "field": "event.severity", - "operator": "equals", - "severity": "high", - "value": "73" - }, - { - "field": "event.severity", - "operator": "equals", - "severity": "critical", - "value": "99" - } - ], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 10000, - "threat": [], - "id": "76453041-89d0-40bd-8630-a73920de3a92", - "rule_id": "eb079c62-4481-4d6e-9643-3ca499df7aaa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "apm-*-transaction*", - "traces-apm*", - "auditbeat-*", - "filebeat-*", - "logs-*", - "packetbeat-*", - "winlogbeat-*" - ], - "query": "event.kind:alert and not event.module:(endgame or endpoint or cloud_defend)\n", - "language": "kuery" - }, - { - "name": "File Made Executable via Chmod Inside A Container", - "description": "This rule detects when chmod is used to add the execute permission to a file inside a container. Modifying file permissions to make a file executable could indicate malicious activity, as an attacker may attempt to run unauthorized or malicious code inside the container.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1222", - "name": "File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/", - "subtechnique": [ - { - "id": "T1222.002", - "name": "Linux and Mac File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/002/" - } - ] - } - ] - } - ], - "id": "0975852f-e366-409c-83ec-4a4a2cc39b82", - "rule_id": "ec604672-bed9-43e1-8871-cf591c052550", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where container.id: \"*\" and event.type in (\"change\", \"creation\") and\n\n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/\n(process.name : \"chmod\" or process.args : \"chmod\") and \nprocess.args : (\"*x*\", \"777\", \"755\", \"754\", \"700\") and not process.args: \"-x\"\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "Microsoft 365 Inbox Forwarding Rule Created", - "description": "Identifies when a new Inbox forwarding rule is created in Microsoft 365. Inbox rules process messages in the Inbox based on conditions and take actions. In this case, the rules will forward the emails to a defined address. Attackers can abuse Inbox Rules to intercept and exfiltrate email data without making organization-wide configuration changes or having the corresponding privileges.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Collection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Gary Blackwell", - "Austin Songer" - ], - "false_positives": [ - "Users and Administrators can create inbox rules for legitimate purposes. Verify if it complies with the company policy and done with the user's consent. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/responding-to-a-compromised-email-account?view=o365-worldwide", - "https://docs.microsoft.com/en-us/powershell/module/exchange/new-inboxrule?view=exchange-ps", - "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/detect-and-remediate-outlook-rules-forms-attack?view=o365-worldwide", - "https://raw.githubusercontent.com/PwC-IR/Business-Email-Compromise-Guide/main/Extractor%20Cheat%20Sheet.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1114", - "name": "Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/", - "subtechnique": [ - { - "id": "T1114.003", - "name": "Email Forwarding Rule", - "reference": "https://attack.mitre.org/techniques/T1114/003/" - } - ] - } - ] - } - ], - "id": "0e5a9937-a43c-46c1-bf53-1763a5f59029", - "rule_id": "ec8efb0c-604d-42fa-ac46-ed1cfbc38f78", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - }, - { - "name": "o365.audit.Parameters.ForwardAsAttachmentTo", - "type": "unknown", - "ecs": false - }, - { - "name": "o365.audit.Parameters.ForwardTo", - "type": "unknown", - "ecs": false - }, - { - "name": "o365.audit.Parameters.RedirectTo", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and\nevent.category:web and event.action:(\"New-InboxRule\" or \"Set-InboxRule\") and\n (\n o365.audit.Parameters.ForwardTo:* or\n o365.audit.Parameters.ForwardAsAttachmentTo:* or\n o365.audit.Parameters.RedirectTo:*\n )\n and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "Azure Global Administrator Role Addition to PIM User", - "description": "Identifies an Azure Active Directory (AD) Global Administrator role addition to a Privileged Identity Management (PIM) user account. PIM is a service that enables you to manage, control, and monitor access to important resources in an organization. Users who are assigned to the Global administrator role can read and modify any administrative setting in your Azure AD organization.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Global administrator additions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Global administrator additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/directory-assign-admin-roles" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/" - } - ] - } - ], - "id": "9bc01f6a-58fe-4987-88ef-273e9779b053", - "rule_id": "ed9ecd27-e3e6-4fd9-8586-7754803f7fc8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "azure.auditlogs.properties.category", - "type": "keyword", - "ecs": false - }, - { - "name": "azure.auditlogs.properties.target_resources.*.display_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.auditlogs and azure.auditlogs.properties.category:RoleManagement and\n azure.auditlogs.operation_name:(\"Add eligible member to role in PIM completed (permanent)\" or\n \"Add member to role in PIM completed (timebound)\") and\n azure.auditlogs.properties.target_resources.*.display_name:\"Global Administrator\" and\n event.outcome:(Success or success)\n", - "language": "kuery" - }, - { - "name": "Linux User Account Creation", - "description": "Identifies attempts to create new users. Attackers may add new users to establish persistence on a system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating Linux User Account Creation\n\nThe `useradd` and `adduser` commands are used to create new user accounts in Linux-based operating systems.\n\nAttackers may create new accounts (both local and domain) to maintain access to victim systems.\n\nThis rule identifies the usage of `useradd` and `adduser` to create new accounts.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.\n\n#### Possible investigation steps\n\n- Investigate whether the user was created succesfully.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific User\",\"query\":\"SELECT * FROM users WHERE username = {{user.name}}\"}}\n- Investigate whether the user is currently logged in and active.\n - !{osquery{\"label\":\"Osquery - Investigate the Account Authentication Status\",\"query\":\"SELECT * FROM logged_in_users WHERE user = {{user.name}}\"}}\n- Identify if the account was added to privileged groups or assigned special privileges after creation.\n - !{osquery{\"label\":\"Osquery - Retrieve Information for a Specific Group\",\"query\":\"SELECT * FROM groups WHERE groupname = {{group.name}}\"}}\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.\n - !{osquery{\"label\":\"Osquery - Retrieve Running Processes by User\",\"query\":\"SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username\"}}\n- Investigate other alerts associated with the user/host during the past 48 hours.\n\n### False positive analysis\n\n- Account creation is a common administrative task, so there is a high chance of the activity being legitimate. Before investigating further, verify that this activity is not benign.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved host to prevent further post-compromise behavior.\n- If the triage identified malware, search the environment for additional compromised hosts.\n - Implement temporary network rules, procedures, and segmentation to contain the malware.\n - Stop suspicious processes.\n - Immediately block the identified indicators of compromise (IoCs).\n - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.\n- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.\n- Delete the created account.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Resources: Investigation Guide" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/", - "subtechnique": [ - { - "id": "T1136.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1136/001/" - } - ] - } - ] - } - ], - "id": "a908f5e2-62a1-41d1-ab69-745e4046e21e", - "rule_id": "edfd5ca9-9d6c-44d9-b615-1e56b920219c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "iam where host.os.type == \"linux\" and (event.type == \"user\" and event.type == \"creation\") and\nprocess.name in (\"useradd\", \"adduser\") and user.name != null\n", - "language": "eql", - "index": [ - "logs-system.auth-*" - ] - }, - { - "name": "Azure Alert Suppression Rule Created or Modified", - "description": "Identifies the creation of suppression rules in Azure. Suppression rules are a mechanism used to suppress alerts previously identified as false positives or too noisy to be in production. This mechanism can be abused or mistakenly configured, resulting in defense evasions and loss of security visibility.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Austin Songer" - ], - "false_positives": [ - "Suppression Rules can be created legitimately by a system administrator. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Suppression Rules created by unfamiliar users should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations", - "https://docs.microsoft.com/en-us/rest/api/securitycenter/alerts-suppression-rules/update" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "c192a736-0b2c-444e-b5ae-8e8213983f5f", - "rule_id": "f0bc081a-2346-4744-a6a4-81514817e888", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0", - "integration": "activitylogs" - } - ], - "required_fields": [ - { - "name": "azure.activitylogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.activitylogs and azure.activitylogs.operation_name:\"MICROSOFT.SECURITY/ALERTSSUPPRESSIONRULES/WRITE\" and\nevent.outcome: \"success\"\n", - "language": "kuery" - }, - { - "name": "Forwarded Google Workspace Security Alert", - "description": "Identifies the occurrence of a security alert from the Google Workspace alerts center. Google Workspace's security alert center provides an overview of actionable alerts that may be affecting an organization's domain. An alert is a warning of a potential security issue that Google has detected.", - "risk_score": 73, - "severity": "high", - "rule_name_override": "google_workspace.alert.type", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\nThis is a promotion rule for Google Workspace security events, which are alertable events per the vendor.\nConsult vendor documentation on interpreting specific events.", - "version": 2, - "tags": [ - "Domain: Cloud", - "Data Source: Google Workspace", - "Use Case: Log Auditing", - "Use Case: Threat Detection" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [ - { - "field": "google_workspace.alert.metadata.severity", - "operator": "equals", - "severity": "low", - "value": "LOW" - }, - { - "field": "google_workspace.alert.metadata.severity", - "operator": "equals", - "severity": "medium", - "value": "MEDIUM" - }, - { - "field": "google_workspace.alert.metadata.severity", - "operator": "equals", - "severity": "high", - "value": "HIGH" - } - ], - "interval": "10m", - "from": "now-130m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "To tune this rule, add exceptions to exclude any google_workspace.alert.type which should not trigger this rule.", - "For additional tuning, severity exceptions for google_workspace.alert.metadata.severity can be added." - ], - "references": [ - "https://workspace.google.com/products/admin/alert-center/" - ], - "max_signals": 100, - "threat": [], - "id": "da4d7fb7-1ec1-4eda-bca3-40716f003dde", - "rule_id": "f1a6d0f4-95b8-11ed-9517-f661ea17fbcc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "google_workspace", - "version": "^2.0.0" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "query", - "index": [ - "filebeat-*", - "logs-google_workspace*" - ], - "query": "event.dataset: google_workspace.alert\n", - "language": "kuery" - }, - { - "name": "Potential curl CVE-2023-38545 Exploitation", - "description": "Detects potential exploitation of curl CVE-2023-38545 by monitoring for vulnerable command line arguments in conjunction with an unusual command line length. A flaw in curl version <= 8.3 makes curl vulnerable to a heap based buffer overflow during the SOCKS5 proxy handshake. Upgrade to curl version >= 8.4 to patch this vulnerability. This exploit can be executed with and without the use of environment variables. For increased visibility, enable the collection of http_proxy, HTTPS_PROXY and ALL_PROXY environment variables based on the instructions provided in the setup guide of this rule.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Use Case: Vulnerability", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://curl.se/docs/CVE-2023-38545.html", - "https://daniel.haxx.se/blog/2023/10/11/curl-8-4-0/", - "https://twitter.com/_JohnHammond/status/1711986412554531015" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1203", - "name": "Exploitation for Client Execution", - "reference": "https://attack.mitre.org/techniques/T1203/" - } - ] - } - ], - "id": "5919bd1f-613c-444f-bdc2-b25091c69b78", - "rule_id": "f41296b4-9975-44d6-9486-514c6f635b2d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.env_vars", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\nElastic Defend integration does not collect environment variable logging by default.\nIn order to capture this behavior, this rule requires a specific configuration option set within the advanced settings of the Elastic Defend integration.\n #### To set up environment variable capture for an Elastic Agent policy:\n- Go to Security → Manage → Policies.\n- Select an Elastic Agent policy.\n- Click Show advanced settings.\n- Scroll down or search for linux.advanced.capture_env_vars.\n- Enter the names of env vars you want to capture, separated by commas.\n- For this rule the linux.advanced.capture_env_vars variable should be set to \"http_proxy,HTTPS_PROXY,ALL_PROXY\".\n- Click Save.\nAfter saving the integration change, the Elastic Agents running this policy will be updated and\nthe rule will function properly.\nFor more information on capturing environment variables refer the [helper guide](https://www.elastic.co/guide/en/security/current/environment-variable-capture.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and process.name == \"curl\" \nand (\n process.args : (\"--socks5-hostname\", \"--proxy\", \"--preproxy\", \"socks5*\") or \n process.env_vars: (\"http_proxy=socks5h://*\", \"HTTPS_PROXY=socks5h://*\", \"ALL_PROXY=socks5h://*\")\n) and length(process.command_line) > 255\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "SSH Connection Established Inside A Running Container", - "description": "This rule detects an incoming SSH connection established inside a running container. Running an ssh daemon inside a container should be avoided and monitored closely if necessary. If an attacker gains valid credentials they can use it to gain initial access or establish persistence within a compromised environment.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "SSH usage may be legitimate depending on the environment. Access patterns and follow-on activity should be analyzed to distinguish between authorized and potentially malicious behavior." - ], - "references": [ - "https://microsoft.github.io/Threat-Matrix-for-Kubernetes/techniques/SSH%20server%20running%20inside%20container/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1133", - "name": "External Remote Services", - "reference": "https://attack.mitre.org/techniques/T1133/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.004", - "name": "SSH", - "reference": "https://attack.mitre.org/techniques/T1021/004/" - } - ] - } - ] - } - ], - "id": "1a9955a9-3c3e-4bd2-82e6-8c62ca2180d8", - "rule_id": "f5488ac1-099e-4008-a6cb-fb638a0f0828", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entry_leader.entry_meta.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entry_leader.same_as_process", - "type": "boolean", - "ecs": true - }, - { - "name": "process.interactive", - "type": "boolean", - "ecs": true - }, - { - "name": "process.session_leader.same_as_process", - "type": "boolean", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where container.id: \"*\" and event.type == \"start\" and \n\n/* use of sshd to enter a container*/\nprocess.entry_leader.entry_meta.type: \"sshd\" and \n\n/* process is the initial process run in a container or start of a new session*/\n(process.entry_leader.same_as_process== true or process.session_leader.same_as_process== true) and \n\n/* interactive process*/\nprocess.interactive== true\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "WRITEDAC Access on Active Directory Object", - "description": "Identifies the access on an object with WRITEDAC permissions. With the WRITEDAC permission, the user can perform a Write Discretionary Access Control List (WriteDACL) operation, which is used to modify the access control rules associated with a specific object within Active Directory. Attackers may abuse this privilege to grant themselves or other compromised accounts additional rights, ultimately compromising the target object, resulting in privilege escalation, lateral movement, and persistence.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Active Directory", - "Use Case: Active Directory Monitoring", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.blackhat.com/docs/us-17/wednesday/us-17-Robbins-An-ACE-Up-The-Sleeve-Designing-Active-Directory-DACL-Backdoors.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1222", - "name": "File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/", - "subtechnique": [ - { - "id": "T1222.001", - "name": "Windows File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/001/" - } - ] - } - ] - } - ], - "id": "226455e6-c1f7-4931-b237-7de1b9d72c56", - "rule_id": "f5861570-e39a-4b8a-9259-abd39f84cb97", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - }, - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.code", - "type": "keyword", - "ecs": true - }, - { - "name": "winlog.event_data.AccessMask", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'Audit Directory Service Access' logging policy must be configured for (Success, Failure).\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nPolicies >\nWindows Settings >\nSecurity Settings >\nAdvanced Audit Policies Configuration >\nAudit Policies >\nDS Access >\nAudit Directory Service Access (Success,Failure)\n```\n", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-system.*", - "logs-windows.*" - ], - "query": "event.action:\"Directory Service Access\" and event.code:\"5136\" and\n winlog.event_data.AccessMask:\"0x40000\"\n", - "language": "kuery" - }, - { - "name": "WMIC Remote Command", - "description": "Identifies the use of wmic.exe to run commands on remote hosts. While this can be used by administrators legitimately, attackers can abuse this built-in utility to achieve lateral movement.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.006", - "name": "Windows Remote Management", - "reference": "https://attack.mitre.org/techniques/T1021/006/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "1fba900d-74a4-4b04-b259-ea7f2f5f1206", - "rule_id": "f59668de-caa0-4b84-94c1-3a1549e1e798", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"WMIC.exe\" and\n process.args : \"*node:*\" and\n process.args : (\"call\", \"set\", \"get\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Account or Group Discovery via Built-In Tools", - "description": "Adversaries may use built-in applications to get a listing of local system or domain accounts and groups.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1069", - "name": "Permission Groups Discovery", - "reference": "https://attack.mitre.org/techniques/T1069/", - "subtechnique": [ - { - "id": "T1069.001", - "name": "Local Groups", - "reference": "https://attack.mitre.org/techniques/T1069/001/" - }, - { - "id": "T1069.002", - "name": "Domain Groups", - "reference": "https://attack.mitre.org/techniques/T1069/002/" - } - ] - }, - { - "id": "T1087", - "name": "Account Discovery", - "reference": "https://attack.mitre.org/techniques/T1087/", - "subtechnique": [ - { - "id": "T1087.001", - "name": "Local Account", - "reference": "https://attack.mitre.org/techniques/T1087/001/" - }, - { - "id": "T1087.002", - "name": "Domain Account", - "reference": "https://attack.mitre.org/techniques/T1087/002/" - } - ] - } - ] - } - ], - "id": "b17f8e74-9bdd-4a54-85e0-9f268bd3c0fa", - "rule_id": "f638a66d-3bbf-46b1-a52c-ef6f39fb6caf", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type== \"start\" and event.action == \"exec\" and\n ( (process.name: (\"groups\",\"id\"))\n or (process.name : \"dscl\" and process.args : (\"/Active Directory/*\", \"/Users*\", \"/Groups*\"))\n or (process.name: \"dscacheutil\" and process.args:(\"user\", \"group\"))\n or process.args:(\"/etc/passwd\", \"/etc/master.passwd\", \"/etc/sudoers\")\n or (process.name: \"getent\" and process.args:(\"passwd\", \"group\"))\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "System Hosts File Access", - "description": "Identifies the use of built-in tools to read the contents of \\etc\\hosts on a local machine. Attackers may use this data to discover remote machines in an environment that may be used for Lateral Movement from the current system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1018", - "name": "Remote System Discovery", - "reference": "https://attack.mitre.org/techniques/T1018/" - } - ] - } - ], - "id": "7252df2d-5435-4126-b3e1-5051afc3f601", - "rule_id": "f75f65cf-ed04-48df-a7ff-b02a8bfe636e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and event.action == \"exec\" and\n (process.name:(\"vi\", \"nano\", \"cat\", \"more\", \"less\") and process.args : \"/etc/hosts\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Azure Service Principal Credentials Added", - "description": "Identifies when new Service Principal credentials have been added in Azure. In most organizations, credentials will be added to service principals infrequently. Hijacking an application (by adding a rogue secret or certificate) with granted permissions will allow the attacker to access data that is normally protected by MFA requirements.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Tactic: Impact" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "10m", - "from": "now-25m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic", - "Austin Songer" - ], - "false_positives": [ - "Service principal credential additions may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be making changes in your environment. Credential additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule." - ], - "references": [ - "https://www.fireeye.com/content/dam/collateral/en/wp-m-unc2452.pdf" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1496", - "name": "Resource Hijacking", - "reference": "https://attack.mitre.org/techniques/T1496/" - } - ] - } - ], - "id": "c921c2f6-4d7c-4414-97f8-cabe369864fe", - "rule_id": "f766ffaf-9568-4909-b734-75d19b35cbf4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "azure", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "azure.auditlogs.operation_name", - "type": "keyword", - "ecs": false - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-azure*" - ], - "query": "event.dataset:azure.auditlogs and azure.auditlogs.operation_name:\"Add service principal credentials\" and event.outcome:(success or Success)\n", - "language": "kuery" - }, - { - "name": "SSH Authorized Keys File Modified Inside a Container", - "description": "This rule detects the creation or modification of an authorized_keys or sshd_config file inside a container. The Secure Shell (SSH) authorized_keys file specifies which users are allowed to log into a server using public key authentication. Adversaries may modify it to maintain persistence on a victim host by adding their own public key(s). Unexpected and unauthorized SSH usage inside a container can be an indicator of compromise and should be investigated.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/", - "subtechnique": [ - { - "id": "T1098.004", - "name": "SSH Authorized Keys", - "reference": "https://attack.mitre.org/techniques/T1098/004/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1563", - "name": "Remote Service Session Hijacking", - "reference": "https://attack.mitre.org/techniques/T1563/", - "subtechnique": [ - { - "id": "T1563.001", - "name": "SSH Hijacking", - "reference": "https://attack.mitre.org/techniques/T1563/001/" - } - ] - }, - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.004", - "name": "SSH", - "reference": "https://attack.mitre.org/techniques/T1021/004/" - } - ] - } - ] - } - ], - "id": "9efea149-6a6c-48b9-b61d-1ef05438bf09", - "rule_id": "f7769104-e8f9-4931-94a2-68fc04eadec3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "container.id", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where container.id:\"*\" and\n event.type in (\"change\", \"creation\") and file.name: (\"authorized_keys\", \"authorized_keys2\", \"sshd_config\")\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "Potential Disabling of AppArmor", - "description": "This rule monitors for potential attempts to disable AppArmor. AppArmor is a Linux security module that enforces fine-grained access control policies to restrict the actions and resources that specific applications and processes can access. Adversaries may disable security tools to avoid possible detection of their tools and activities.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "3939f961-38bf-4de8-90ea-59889be3258a", - "rule_id": "fac52c69-2646-4e79-89c0-fd7653461010", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and (\n (process.name == \"systemctl\" and process.args == \"disable\" and process.args == \"apparmor\") or\n (process.name == \"ln\" and process.args : \"/etc/apparmor.d/*\" and process.args : \"/etc/apparmor.d/disable/\")\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Masquerading as System32 DLL", - "description": "Identifies suspicious instances of default system32 DLLs either unsigned or signed with non-MS certificates. This can potentially indicate the attempt to masquerade as system DLLs, perform DLL Search Order Hijacking or backdoor and resign legitimate DLLs.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 102, - "tags": [ - "Domain: Endpoint", - "Data Source: Elastic Defend", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Persistence", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - }, - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - }, - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.001", - "name": "DLL Search Order Hijacking", - "reference": "https://attack.mitre.org/techniques/T1574/001/" - }, - { - "id": "T1574.002", - "name": "DLL Side-Loading", - "reference": "https://attack.mitre.org/techniques/T1574/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1554", - "name": "Compromise Client Software Binary", - "reference": "https://attack.mitre.org/techniques/T1554/" - } - ] - } - ], - "id": "e66de135-b6ac-4218-8285-892069f04a30", - "rule_id": "fb01d790-9f74-4e76-97dd-b4b0f7bf6435", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.Ext.relative_file_creation_time", - "type": "unknown", - "ecs": false - }, - { - "name": "dll.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.path", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "library where event.action == \"load\" and dll.Ext.relative_file_creation_time <= 3600 and\n not (\n dll.path : (\n \"?:\\\\Windows\\\\System32\\\\*\",\n \"?:\\\\Windows\\\\SysWOW64\\\\*\",\n \"?:\\\\Windows\\\\SystemTemp\\\\*\",\n \"?:\\\\$WINDOWS.~BT\\\\NewOS\\\\Windows\\\\WinSxS\\\\*\",\n \"?:\\\\$WINDOWS.~BT\\\\NewOS\\\\Windows\\\\System32\\\\*\",\n \"?:\\\\$WINDOWS.~BT\\\\Sources\\\\*\",\n \"?:\\\\$WINDOWS.~BT\\\\Work\\\\*\",\n \"?:\\\\Windows\\\\WinSxS\\\\*\",\n \"?:\\\\Windows\\\\SoftwareDistribution\\\\Download\\\\*\",\n \"?:\\\\Windows\\\\assembly\\\\NativeImages_v*\"\n )\n ) and\n not (\n dll.code_signature.subject_name in (\n \"Microsoft Windows\",\n \"Microsoft Corporation\",\n \"Microsoft Windows Hardware Abstraction Layer Publisher\",\n \"Microsoft Windows Publisher\",\n \"Microsoft Windows 3rd party Component\",\n \"Microsoft 3rd Party Application Component\"\n ) and dll.code_signature.trusted == true\n ) and not dll.code_signature.status : (\"errorCode_endpoint*\", \"errorUntrustedRoot\", \"errorChaining\") and\n dll.name : (\n \"aadauthhelper.dll\", \"aadcloudap.dll\", \"aadjcsp.dll\", \"aadtb.dll\", \"aadwamextension.dll\", \"aarsvc.dll\", \"abovelockapphost.dll\", \"accessibilitycpl.dll\", \"accountaccessor.dll\", \"accountsrt.dll\", \"acgenral.dll\", \"aclayers.dll\", \"acledit.dll\", \"aclui.dll\", \"acmigration.dll\", \"acppage.dll\", \"acproxy.dll\", \"acspecfc.dll\", \"actioncenter.dll\", \"actioncentercpl.dll\", \"actionqueue.dll\", \"activationclient.dll\", \"activeds.dll\", \"activesynccsp.dll\", \"actxprxy.dll\", \"acwinrt.dll\", \"acxtrnal.dll\", \"adaptivecards.dll\", \"addressparser.dll\", \"adhapi.dll\", \"adhsvc.dll\", \"admtmpl.dll\", \"adprovider.dll\", \"adrclient.dll\", \"adsldp.dll\", \"adsldpc.dll\", \"adsmsext.dll\", \"adsnt.dll\", \"adtschema.dll\", \"advancedemojids.dll\", \"advapi32.dll\", \"advapi32res.dll\", \"advpack.dll\", \"aeevts.dll\", \"aeinv.dll\", \"aepic.dll\", \"ajrouter.dll\", \"altspace.dll\", \"amsi.dll\", \"amsiproxy.dll\", \"amstream.dll\", \"apds.dll\", \"aphostclient.dll\", \"aphostres.dll\", \"aphostservice.dll\", \"apisampling.dll\", \"apisetschema.dll\", \"apmon.dll\", \"apmonui.dll\", \"appcontracts.dll\", \"appextension.dll\", \"apphelp.dll\", \"apphlpdm.dll\", \"appidapi.dll\", \"appidsvc.dll\", \"appinfo.dll\", \"appinfoext.dll\", \"applicationframe.dll\", \"applockercsp.dll\", \"appmgmts.dll\", \"appmgr.dll\", \"appmon.dll\", \"appointmentapis.dll\", \"appraiser.dll\", \"appreadiness.dll\", \"apprepapi.dll\", \"appresolver.dll\", \"appsruprov.dll\", \"appvcatalog.dll\", \"appvclientps.dll\", \"appvetwclientres.dll\", \"appvintegration.dll\", \"appvmanifest.dll\", \"appvpolicy.dll\", \"appvpublishing.dll\", \"appvreporting.dll\", \"appvscripting.dll\", \"appvsentinel.dll\", \"appvstreamingux.dll\", \"appvstreammap.dll\", \"appvterminator.dll\", \"appxalluserstore.dll\", \"appxpackaging.dll\", \"appxsip.dll\", \"appxsysprep.dll\", \"archiveint.dll\", \"asferror.dll\", \"aspnet_counters.dll\", \"asycfilt.dll\", \"atl.dll\", \"atlthunk.dll\", \"atmlib.dll\", \"audioeng.dll\", \"audiohandlers.dll\", \"audiokse.dll\", \"audioses.dll\", \"audiosrv.dll\", \"auditcse.dll\", \"auditpolcore.dll\", \"auditpolmsg.dll\", \"authbroker.dll\", \"authbrokerui.dll\", \"authentication.dll\", \"authext.dll\", \"authfwcfg.dll\", \"authfwgp.dll\", \"authfwsnapin.dll\", \"authfwwizfwk.dll\", \"authhostproxy.dll\", \"authui.dll\", \"authz.dll\", \"autopilot.dll\", \"autopilotdiag.dll\", \"autoplay.dll\", \"autotimesvc.dll\", \"avicap32.dll\", \"avifil32.dll\", \"avrt.dll\", \"axinstsv.dll\", \"azroles.dll\", \"azroleui.dll\", \"azsqlext.dll\", \"basecsp.dll\", \"basesrv.dll\", \"batmeter.dll\", \"bcastdvrbroker.dll\", \"bcastdvrclient.dll\", \"bcastdvrcommon.dll\", \"bcd.dll\", \"bcdprov.dll\", \"bcdsrv.dll\", \"bcp47langs.dll\", \"bcp47mrm.dll\", \"bcrypt.dll\", \"bcryptprimitives.dll\", \"bdehdcfglib.dll\", \"bderepair.dll\", \"bdesvc.dll\", \"bdesysprep.dll\", \"bdeui.dll\", \"bfe.dll\", \"bi.dll\", \"bidispl.dll\", \"bindfltapi.dll\", \"bingasds.dll\", \"bingfilterds.dll\", \"bingmaps.dll\", \"biocredprov.dll\", \"bisrv.dll\", \"bitlockercsp.dll\", \"bitsigd.dll\", \"bitsperf.dll\", \"bitsproxy.dll\", \"biwinrt.dll\", \"blbevents.dll\", \"blbres.dll\", \"blb_ps.dll\", \"bluetoothapis.dll\", \"bnmanager.dll\", \"bootmenuux.dll\", \"bootstr.dll\", \"bootux.dll\", \"bootvid.dll\", \"bridgeres.dll\", \"brokerlib.dll\", \"browcli.dll\", \"browserbroker.dll\", \"browseui.dll\", \"btagservice.dll\", \"bthavctpsvc.dll\", \"bthavrcp.dll\", \"bthavrcpappsvc.dll\", \"bthci.dll\", \"bthpanapi.dll\", \"bthradiomedia.dll\", \"bthserv.dll\", \"bthtelemetry.dll\", \"btpanui.dll\", \"bwcontexthandler.dll\", \"cabapi.dll\", \"cabinet.dll\", \"cabview.dll\", \"callbuttons.dll\", \"cameracaptureui.dll\", \"capauthz.dll\", \"capiprovider.dll\", \"capisp.dll\", \"captureservice.dll\", \"castingshellext.dll\", \"castlaunch.dll\", \"catsrv.dll\", \"catsrvps.dll\", \"catsrvut.dll\", \"cbdhsvc.dll\", \"cca.dll\", \"cdd.dll\", \"cdosys.dll\", \"cdp.dll\", \"cdprt.dll\", \"cdpsvc.dll\", \"cdpusersvc.dll\", \"cemapi.dll\", \"certca.dll\", \"certcli.dll\", \"certcredprovider.dll\", \"certenc.dll\", \"certenroll.dll\", \"certenrollui.dll\", \"certmgr.dll\", \"certpkicmdlet.dll\", \"certpoleng.dll\", \"certprop.dll\", \"cewmdm.dll\", \"cfgbkend.dll\", \"cfgmgr32.dll\", \"cfgspcellular.dll\", \"cfgsppolicy.dll\", \"cflapi.dll\", \"cfmifs.dll\", \"cfmifsproxy.dll\", \"chakra.dll\", \"chakradiag.dll\", \"chakrathunk.dll\", \"chartv.dll\", \"chatapis.dll\", \"chkwudrv.dll\", \"chsstrokeds.dll\", \"chtbopomofods.dll\", \"chtcangjieds.dll\", \"chthkstrokeds.dll\", \"chtquickds.dll\", \"chxapds.dll\", \"chxdecoder.dll\", \"chxhapds.dll\", \"chxinputrouter.dll\", \"chxranker.dll\", \"ci.dll\", \"cic.dll\", \"cimfs.dll\", \"circoinst.dll\", \"ciwmi.dll\", \"clb.dll\", \"clbcatq.dll\", \"cldapi.dll\", \"cleanpccsp.dll\", \"clfsw32.dll\", \"cliconfg.dll\", \"clipboardserver.dll\", \"clipc.dll\", \"clipsvc.dll\", \"clipwinrt.dll\", \"cloudap.dll\", \"cloudidsvc.dll\", \"clrhost.dll\", \"clusapi.dll\", \"cmcfg32.dll\", \"cmdext.dll\", \"cmdial32.dll\", \"cmgrcspps.dll\", \"cmifw.dll\", \"cmintegrator.dll\", \"cmlua.dll\", \"cmpbk32.dll\", \"cmstplua.dll\", \"cmutil.dll\", \"cngcredui.dll\", \"cngprovider.dll\", \"cnvfat.dll\", \"cofiredm.dll\", \"colbact.dll\", \"colorcnv.dll\", \"colorui.dll\", \"combase.dll\", \"comcat.dll\", \"comctl32.dll\", \"comdlg32.dll\", \"coml2.dll\", \"comppkgsup.dll\", \"compstui.dll\", \"computecore.dll\", \"computenetwork.dll\", \"computestorage.dll\", \"comrepl.dll\", \"comres.dll\", \"comsnap.dll\", \"comsvcs.dll\", \"comuid.dll\", \"configmanager2.dll\", \"conhostv1.dll\", \"connect.dll\", \"consentux.dll\", \"consentuxclient.dll\", \"console.dll\", \"consolelogon.dll\", \"contactapis.dll\", \"container.dll\", \"coredpus.dll\", \"coreglobconfig.dll\", \"coremas.dll\", \"coremessaging.dll\", \"coremmres.dll\", \"coreshell.dll\", \"coreshellapi.dll\", \"coreuicomponents.dll\", \"correngine.dll\", \"courtesyengine.dll\", \"cpfilters.dll\", \"creddialogbroker.dll\", \"credprovhelper.dll\", \"credprovhost.dll\", \"credprovs.dll\", \"credprovslegacy.dll\", \"credssp.dll\", \"credui.dll\", \"crypt32.dll\", \"cryptbase.dll\", \"cryptcatsvc.dll\", \"cryptdlg.dll\", \"cryptdll.dll\", \"cryptext.dll\", \"cryptnet.dll\", \"cryptngc.dll\", \"cryptowinrt.dll\", \"cryptsp.dll\", \"cryptsvc.dll\", \"crypttpmeksvc.dll\", \"cryptui.dll\", \"cryptuiwizard.dll\", \"cryptxml.dll\", \"cscapi.dll\", \"cscdll.dll\", \"cscmig.dll\", \"cscobj.dll\", \"cscsvc.dll\", \"cscui.dll\", \"csplte.dll\", \"cspproxy.dll\", \"csrsrv.dll\", \"cxcredprov.dll\", \"c_g18030.dll\", \"c_gsm7.dll\", \"c_is2022.dll\", \"c_iscii.dll\", \"d2d1.dll\", \"d3d10.dll\", \"d3d10core.dll\", \"d3d10level9.dll\", \"d3d10warp.dll\", \"d3d10_1.dll\", \"d3d10_1core.dll\", \"d3d11.dll\", \"d3d11on12.dll\", \"d3d12.dll\", \"d3d12core.dll\", \"d3d8thk.dll\", \"d3d9.dll\", \"d3d9on12.dll\", \"d3dscache.dll\", \"dab.dll\", \"dabapi.dll\", \"daconn.dll\", \"dafbth.dll\", \"dafdnssd.dll\", \"dafescl.dll\", \"dafgip.dll\", \"dafiot.dll\", \"dafipp.dll\", \"dafmcp.dll\", \"dafpos.dll\", \"dafprintprovider.dll\", \"dafupnp.dll\", \"dafwcn.dll\", \"dafwfdprovider.dll\", \"dafwiprov.dll\", \"dafwsd.dll\", \"damediamanager.dll\", \"damm.dll\", \"das.dll\", \"dataclen.dll\", \"datusage.dll\", \"davclnt.dll\", \"davhlpr.dll\", \"davsyncprovider.dll\", \"daxexec.dll\", \"dbgcore.dll\", \"dbgeng.dll\", \"dbghelp.dll\", \"dbgmodel.dll\", \"dbnetlib.dll\", \"dbnmpntw.dll\", \"dciman32.dll\", \"dcntel.dll\", \"dcomp.dll\", \"ddaclsys.dll\", \"ddcclaimsapi.dll\", \"ddds.dll\", \"ddisplay.dll\", \"ddoiproxy.dll\", \"ddores.dll\", \"ddpchunk.dll\", \"ddptrace.dll\", \"ddputils.dll\", \"ddp_ps.dll\", \"ddraw.dll\", \"ddrawex.dll\", \"defragproxy.dll\", \"defragres.dll\", \"defragsvc.dll\", \"deploymentcsps.dll\", \"deskadp.dll\", \"deskmon.dll\", \"desktopshellext.dll\", \"devenum.dll\", \"deviceaccess.dll\", \"devicecenter.dll\", \"devicecredential.dll\", \"devicepairing.dll\", \"deviceuxres.dll\", \"devinv.dll\", \"devmgr.dll\", \"devobj.dll\", \"devpropmgr.dll\", \"devquerybroker.dll\", \"devrtl.dll\", \"dfdts.dll\", \"dfscli.dll\", \"dfshim.dll\", \"dfsshlex.dll\", \"dggpext.dll\", \"dhcpcmonitor.dll\", \"dhcpcore.dll\", \"dhcpcore6.dll\", \"dhcpcsvc.dll\", \"dhcpcsvc6.dll\", \"dhcpsapi.dll\", \"diagcpl.dll\", \"diagnosticlogcsp.dll\", \"diagperf.dll\", \"diagsvc.dll\", \"diagtrack.dll\", \"dialclient.dll\", \"dialserver.dll\", \"dictationmanager.dll\", \"difxapi.dll\", \"dimsjob.dll\", \"dimsroam.dll\", \"dinput.dll\", \"dinput8.dll\", \"direct2ddesktop.dll\", \"directml.dll\", \"discan.dll\", \"dismapi.dll\", \"dispbroker.dll\", \"dispex.dll\", \"display.dll\", \"displaymanager.dll\", \"dlnashext.dll\", \"dmappsres.dll\", \"dmcfgutils.dll\", \"dmcmnutils.dll\", \"dmcsps.dll\", \"dmdlgs.dll\", \"dmdskmgr.dll\", \"dmdskres.dll\", \"dmdskres2.dll\", \"dmenrollengine.dll\", \"dmintf.dll\", \"dmiso8601utils.dll\", \"dmloader.dll\", \"dmocx.dll\", \"dmoleaututils.dll\", \"dmpushproxy.dll\", \"dmpushroutercore.dll\", \"dmrcdecoder.dll\", \"dmrserver.dll\", \"dmsynth.dll\", \"dmusic.dll\", \"dmutil.dll\", \"dmvdsitf.dll\", \"dmwappushsvc.dll\", \"dmwmicsp.dll\", \"dmxmlhelputils.dll\", \"dnsapi.dll\", \"dnscmmc.dll\", \"dnsext.dll\", \"dnshc.dll\", \"dnsrslvr.dll\", \"docprop.dll\", \"dolbydecmft.dll\", \"domgmt.dll\", \"dosettings.dll\", \"dosvc.dll\", \"dot3api.dll\", \"dot3cfg.dll\", \"dot3conn.dll\", \"dot3dlg.dll\", \"dot3gpclnt.dll\", \"dot3gpui.dll\", \"dot3hc.dll\", \"dot3mm.dll\", \"dot3msm.dll\", \"dot3svc.dll\", \"dot3ui.dll\", \"dpapi.dll\", \"dpapiprovider.dll\", \"dpapisrv.dll\", \"dpnaddr.dll\", \"dpnathlp.dll\", \"dpnet.dll\", \"dpnhpast.dll\", \"dpnhupnp.dll\", \"dpnlobby.dll\", \"dps.dll\", \"dpx.dll\", \"drprov.dll\", \"drt.dll\", \"drtprov.dll\", \"drttransport.dll\", \"drvsetup.dll\", \"drvstore.dll\", \"dsauth.dll\", \"dsccore.dll\", \"dsccoreconfprov.dll\", \"dsclient.dll\", \"dscproxy.dll\", \"dsctimer.dll\", \"dsdmo.dll\", \"dskquota.dll\", \"dskquoui.dll\", \"dsound.dll\", \"dsparse.dll\", \"dsprop.dll\", \"dsquery.dll\", \"dsreg.dll\", \"dsregtask.dll\", \"dsrole.dll\", \"dssec.dll\", \"dssenh.dll\", \"dssvc.dll\", \"dsui.dll\", \"dsuiext.dll\", \"dswave.dll\", \"dtsh.dll\", \"ducsps.dll\", \"dui70.dll\", \"duser.dll\", \"dusmapi.dll\", \"dusmsvc.dll\", \"dwmapi.dll\", \"dwmcore.dll\", \"dwmghost.dll\", \"dwminit.dll\", \"dwmredir.dll\", \"dwmscene.dll\", \"dwrite.dll\", \"dxcore.dll\", \"dxdiagn.dll\", \"dxgi.dll\", \"dxgwdi.dll\", \"dxilconv.dll\", \"dxmasf.dll\", \"dxp.dll\", \"dxpps.dll\", \"dxptasksync.dll\", \"dxtmsft.dll\", \"dxtrans.dll\", \"dxva2.dll\", \"dynamoapi.dll\", \"eapp3hst.dll\", \"eappcfg.dll\", \"eappcfgui.dll\", \"eappgnui.dll\", \"eapphost.dll\", \"eappprxy.dll\", \"eapprovp.dll\", \"eapputil.dll\", \"eapsimextdesktop.dll\", \"eapsvc.dll\", \"eapteapauth.dll\", \"eapteapconfig.dll\", \"eapteapext.dll\", \"easconsent.dll\", \"easwrt.dll\", \"edgeangle.dll\", \"edgecontent.dll\", \"edgehtml.dll\", \"edgeiso.dll\", \"edgemanager.dll\", \"edpauditapi.dll\", \"edpcsp.dll\", \"edptask.dll\", \"edputil.dll\", \"eeprov.dll\", \"eeutil.dll\", \"efsadu.dll\", \"efscore.dll\", \"efsext.dll\", \"efslsaext.dll\", \"efssvc.dll\", \"efsutil.dll\", \"efswrt.dll\", \"ehstorapi.dll\", \"ehstorpwdmgr.dll\", \"ehstorshell.dll\", \"els.dll\", \"elscore.dll\", \"elshyph.dll\", \"elslad.dll\", \"elstrans.dll\", \"emailapis.dll\", \"embeddedmodesvc.dll\", \"emojids.dll\", \"encapi.dll\", \"energy.dll\", \"energyprov.dll\", \"energytask.dll\", \"enrollmentapi.dll\", \"enterpriseapncsp.dll\", \"enterprisecsps.dll\", \"enterpriseetw.dll\", \"eqossnap.dll\", \"errordetails.dll\", \"errordetailscore.dll\", \"es.dll\", \"esclprotocol.dll\", \"esclscan.dll\", \"esclwiadriver.dll\", \"esdsip.dll\", \"esent.dll\", \"esentprf.dll\", \"esevss.dll\", \"eshims.dll\", \"etwrundown.dll\", \"euiccscsp.dll\", \"eventaggregation.dll\", \"eventcls.dll\", \"evr.dll\", \"execmodelclient.dll\", \"execmodelproxy.dll\", \"explorerframe.dll\", \"exsmime.dll\", \"extrasxmlparser.dll\", \"f3ahvoas.dll\", \"facilitator.dll\", \"familysafetyext.dll\", \"faultrep.dll\", \"fcon.dll\", \"fdbth.dll\", \"fdbthproxy.dll\", \"fddevquery.dll\", \"fde.dll\", \"fdeploy.dll\", \"fdphost.dll\", \"fdpnp.dll\", \"fdprint.dll\", \"fdproxy.dll\", \"fdrespub.dll\", \"fdssdp.dll\", \"fdwcn.dll\", \"fdwnet.dll\", \"fdwsd.dll\", \"feclient.dll\", \"ffbroker.dll\", \"fhcat.dll\", \"fhcfg.dll\", \"fhcleanup.dll\", \"fhcpl.dll\", \"fhengine.dll\", \"fhevents.dll\", \"fhshl.dll\", \"fhsrchapi.dll\", \"fhsrchph.dll\", \"fhsvc.dll\", \"fhsvcctl.dll\", \"fhtask.dll\", \"fhuxadapter.dll\", \"fhuxapi.dll\", \"fhuxcommon.dll\", \"fhuxgraphics.dll\", \"fhuxpresentation.dll\", \"fidocredprov.dll\", \"filemgmt.dll\", \"filterds.dll\", \"findnetprinters.dll\", \"firewallapi.dll\", \"flightsettings.dll\", \"fltlib.dll\", \"fluencyds.dll\", \"fmapi.dll\", \"fmifs.dll\", \"fms.dll\", \"fntcache.dll\", \"fontext.dll\", \"fontprovider.dll\", \"fontsub.dll\", \"fphc.dll\", \"framedyn.dll\", \"framedynos.dll\", \"frameserver.dll\", \"frprov.dll\", \"fsutilext.dll\", \"fthsvc.dll\", \"fundisc.dll\", \"fveapi.dll\", \"fveapibase.dll\", \"fvecerts.dll\", \"fvecpl.dll\", \"fveskybackup.dll\", \"fveui.dll\", \"fvewiz.dll\", \"fwbase.dll\", \"fwcfg.dll\", \"fwmdmcsp.dll\", \"fwpolicyiomgr.dll\", \"fwpuclnt.dll\", \"fwremotesvr.dll\", \"gameinput.dll\", \"gamemode.dll\", \"gamestreamingext.dll\", \"gameux.dll\", \"gamingtcui.dll\", \"gcdef.dll\", \"gdi32.dll\", \"gdi32full.dll\", \"gdiplus.dll\", \"generaltel.dll\", \"geocommon.dll\", \"geolocation.dll\", \"getuname.dll\", \"glmf32.dll\", \"globinputhost.dll\", \"glu32.dll\", \"gmsaclient.dll\", \"gpapi.dll\", \"gpcsewrappercsp.dll\", \"gpedit.dll\", \"gpprefcl.dll\", \"gpprnext.dll\", \"gpscript.dll\", \"gpsvc.dll\", \"gptext.dll\", \"graphicscapture.dll\", \"graphicsperfsvc.dll\", \"groupinghc.dll\", \"hal.dll\", \"halextpl080.dll\", \"hascsp.dll\", \"hashtagds.dll\", \"hbaapi.dll\", \"hcproviders.dll\", \"hdcphandler.dll\", \"heatcore.dll\", \"helppaneproxy.dll\", \"hgcpl.dll\", \"hhsetup.dll\", \"hid.dll\", \"hidcfu.dll\", \"hidserv.dll\", \"hlink.dll\", \"hmkd.dll\", \"hnetcfg.dll\", \"hnetcfgclient.dll\", \"hnetmon.dll\", \"hologramworld.dll\", \"holoshellruntime.dll\", \"holoshextensions.dll\", \"hotplug.dll\", \"hrtfapo.dll\", \"httpapi.dll\", \"httpprxc.dll\", \"httpprxm.dll\", \"httpprxp.dll\", \"httpsdatasource.dll\", \"htui.dll\", \"hvhostsvc.dll\", \"hvloader.dll\", \"hvsigpext.dll\", \"hvsocket.dll\", \"hydrogen.dll\", \"ia2comproxy.dll\", \"ias.dll\", \"iasacct.dll\", \"iasads.dll\", \"iasdatastore.dll\", \"iashlpr.dll\", \"iasmigplugin.dll\", \"iasnap.dll\", \"iaspolcy.dll\", \"iasrad.dll\", \"iasrecst.dll\", \"iassam.dll\", \"iassdo.dll\", \"iassvcs.dll\", \"icfupgd.dll\", \"icm32.dll\", \"icmp.dll\", \"icmui.dll\", \"iconcodecservice.dll\", \"icsigd.dll\", \"icsvc.dll\", \"icsvcext.dll\", \"icu.dll\", \"icuin.dll\", \"icuuc.dll\", \"idctrls.dll\", \"idlisten.dll\", \"idndl.dll\", \"idstore.dll\", \"ieadvpack.dll\", \"ieapfltr.dll\", \"iedkcs32.dll\", \"ieframe.dll\", \"iemigplugin.dll\", \"iepeers.dll\", \"ieproxy.dll\", \"iernonce.dll\", \"iertutil.dll\", \"iesetup.dll\", \"iesysprep.dll\", \"ieui.dll\", \"ifmon.dll\", \"ifsutil.dll\", \"ifsutilx.dll\", \"igddiag.dll\", \"ihds.dll\", \"ikeext.dll\", \"imagehlp.dll\", \"imageres.dll\", \"imagesp1.dll\", \"imapi.dll\", \"imapi2.dll\", \"imapi2fs.dll\", \"imgutil.dll\", \"imm32.dll\", \"implatsetup.dll\", \"indexeddblegacy.dll\", \"inetcomm.dll\", \"inetmib1.dll\", \"inetpp.dll\", \"inetppui.dll\", \"inetres.dll\", \"inked.dll\", \"inkobjcore.dll\", \"inproclogger.dll\", \"input.dll\", \"inputcloudstore.dll\", \"inputcontroller.dll\", \"inputhost.dll\", \"inputservice.dll\", \"inputswitch.dll\", \"inseng.dll\", \"installservice.dll\", \"internetmail.dll\", \"internetmailcsp.dll\", \"invagent.dll\", \"iologmsg.dll\", \"iphlpapi.dll\", \"iphlpsvc.dll\", \"ipnathlp.dll\", \"ipnathlpclient.dll\", \"ippcommon.dll\", \"ippcommonproxy.dll\", \"iprtprio.dll\", \"iprtrmgr.dll\", \"ipsecsnp.dll\", \"ipsecsvc.dll\", \"ipsmsnap.dll\", \"ipxlatcfg.dll\", \"iri.dll\", \"iscsicpl.dll\", \"iscsidsc.dll\", \"iscsied.dll\", \"iscsiexe.dll\", \"iscsilog.dll\", \"iscsium.dll\", \"iscsiwmi.dll\", \"iscsiwmiv2.dll\", \"ism.dll\", \"itircl.dll\", \"itss.dll\", \"iuilp.dll\", \"iumbase.dll\", \"iumcrypt.dll\", \"iumdll.dll\", \"iumsdk.dll\", \"iyuv_32.dll\", \"joinproviderol.dll\", \"joinutil.dll\", \"jpmapcontrol.dll\", \"jpndecoder.dll\", \"jpninputrouter.dll\", \"jpnranker.dll\", \"jpnserviceds.dll\", \"jscript.dll\", \"jscript9.dll\", \"jscript9diag.dll\", \"jsproxy.dll\", \"kbd101.dll\", \"kbd101a.dll\", \"kbd101b.dll\", \"kbd101c.dll\", \"kbd103.dll\", \"kbd106.dll\", \"kbd106n.dll\", \"kbda1.dll\", \"kbda2.dll\", \"kbda3.dll\", \"kbdadlm.dll\", \"kbdal.dll\", \"kbdarme.dll\", \"kbdarmph.dll\", \"kbdarmty.dll\", \"kbdarmw.dll\", \"kbdax2.dll\", \"kbdaze.dll\", \"kbdazel.dll\", \"kbdazst.dll\", \"kbdbash.dll\", \"kbdbe.dll\", \"kbdbene.dll\", \"kbdbgph.dll\", \"kbdbgph1.dll\", \"kbdbhc.dll\", \"kbdblr.dll\", \"kbdbr.dll\", \"kbdbu.dll\", \"kbdbug.dll\", \"kbdbulg.dll\", \"kbdca.dll\", \"kbdcan.dll\", \"kbdcher.dll\", \"kbdcherp.dll\", \"kbdcr.dll\", \"kbdcz.dll\", \"kbdcz1.dll\", \"kbdcz2.dll\", \"kbdda.dll\", \"kbddiv1.dll\", \"kbddiv2.dll\", \"kbddv.dll\", \"kbddzo.dll\", \"kbdes.dll\", \"kbdest.dll\", \"kbdfa.dll\", \"kbdfar.dll\", \"kbdfc.dll\", \"kbdfi.dll\", \"kbdfi1.dll\", \"kbdfo.dll\", \"kbdfr.dll\", \"kbdfthrk.dll\", \"kbdgae.dll\", \"kbdgeo.dll\", \"kbdgeoer.dll\", \"kbdgeome.dll\", \"kbdgeooa.dll\", \"kbdgeoqw.dll\", \"kbdgkl.dll\", \"kbdgn.dll\", \"kbdgr.dll\", \"kbdgr1.dll\", \"kbdgrlnd.dll\", \"kbdgthc.dll\", \"kbdhau.dll\", \"kbdhaw.dll\", \"kbdhe.dll\", \"kbdhe220.dll\", \"kbdhe319.dll\", \"kbdheb.dll\", \"kbdhebl3.dll\", \"kbdhela2.dll\", \"kbdhela3.dll\", \"kbdhept.dll\", \"kbdhu.dll\", \"kbdhu1.dll\", \"kbdibm02.dll\", \"kbdibo.dll\", \"kbdic.dll\", \"kbdinasa.dll\", \"kbdinbe1.dll\", \"kbdinbe2.dll\", \"kbdinben.dll\", \"kbdindev.dll\", \"kbdinen.dll\", \"kbdinguj.dll\", \"kbdinhin.dll\", \"kbdinkan.dll\", \"kbdinmal.dll\", \"kbdinmar.dll\", \"kbdinori.dll\", \"kbdinpun.dll\", \"kbdintam.dll\", \"kbdintel.dll\", \"kbdinuk2.dll\", \"kbdir.dll\", \"kbdit.dll\", \"kbdit142.dll\", \"kbdiulat.dll\", \"kbdjav.dll\", \"kbdjpn.dll\", \"kbdkaz.dll\", \"kbdkhmr.dll\", \"kbdkni.dll\", \"kbdkor.dll\", \"kbdkurd.dll\", \"kbdkyr.dll\", \"kbdla.dll\", \"kbdlao.dll\", \"kbdlisub.dll\", \"kbdlisus.dll\", \"kbdlk41a.dll\", \"kbdlt.dll\", \"kbdlt1.dll\", \"kbdlt2.dll\", \"kbdlv.dll\", \"kbdlv1.dll\", \"kbdlvst.dll\", \"kbdmac.dll\", \"kbdmacst.dll\", \"kbdmaori.dll\", \"kbdmlt47.dll\", \"kbdmlt48.dll\", \"kbdmon.dll\", \"kbdmonmo.dll\", \"kbdmonst.dll\", \"kbdmyan.dll\", \"kbdne.dll\", \"kbdnec.dll\", \"kbdnec95.dll\", \"kbdnecat.dll\", \"kbdnecnt.dll\", \"kbdnepr.dll\", \"kbdnko.dll\", \"kbdno.dll\", \"kbdno1.dll\", \"kbdnso.dll\", \"kbdntl.dll\", \"kbdogham.dll\", \"kbdolch.dll\", \"kbdoldit.dll\", \"kbdosa.dll\", \"kbdosm.dll\", \"kbdpash.dll\", \"kbdphags.dll\", \"kbdpl.dll\", \"kbdpl1.dll\", \"kbdpo.dll\", \"kbdro.dll\", \"kbdropr.dll\", \"kbdrost.dll\", \"kbdru.dll\", \"kbdru1.dll\", \"kbdrum.dll\", \"kbdsf.dll\", \"kbdsg.dll\", \"kbdsl.dll\", \"kbdsl1.dll\", \"kbdsmsfi.dll\", \"kbdsmsno.dll\", \"kbdsn1.dll\", \"kbdsora.dll\", \"kbdsorex.dll\", \"kbdsors1.dll\", \"kbdsorst.dll\", \"kbdsp.dll\", \"kbdsw.dll\", \"kbdsw09.dll\", \"kbdsyr1.dll\", \"kbdsyr2.dll\", \"kbdtaile.dll\", \"kbdtajik.dll\", \"kbdtam99.dll\", \"kbdtat.dll\", \"kbdth0.dll\", \"kbdth1.dll\", \"kbdth2.dll\", \"kbdth3.dll\", \"kbdtifi.dll\", \"kbdtifi2.dll\", \"kbdtiprc.dll\", \"kbdtiprd.dll\", \"kbdtt102.dll\", \"kbdtuf.dll\", \"kbdtuq.dll\", \"kbdturme.dll\", \"kbdtzm.dll\", \"kbdughr.dll\", \"kbdughr1.dll\", \"kbduk.dll\", \"kbdukx.dll\", \"kbdur.dll\", \"kbdur1.dll\", \"kbdurdu.dll\", \"kbdus.dll\", \"kbdusa.dll\", \"kbdusl.dll\", \"kbdusr.dll\", \"kbdusx.dll\", \"kbduzb.dll\", \"kbdvntc.dll\", \"kbdwol.dll\", \"kbdyak.dll\", \"kbdyba.dll\", \"kbdycc.dll\", \"kbdycl.dll\", \"kd.dll\", \"kdcom.dll\", \"kdcpw.dll\", \"kdhvcom.dll\", \"kdnet.dll\", \"kdnet_uart16550.dll\", \"kdscli.dll\", \"kdstub.dll\", \"kdusb.dll\", \"kd_02_10df.dll\", \"kd_02_10ec.dll\", \"kd_02_1137.dll\", \"kd_02_14e4.dll\", \"kd_02_15b3.dll\", \"kd_02_1969.dll\", \"kd_02_19a2.dll\", \"kd_02_1af4.dll\", \"kd_02_8086.dll\", \"kd_07_1415.dll\", \"kd_0c_8086.dll\", \"kerbclientshared.dll\", \"kerberos.dll\", \"kernel32.dll\", \"kernelbase.dll\", \"keycredmgr.dll\", \"keyiso.dll\", \"keymgr.dll\", \"knobscore.dll\", \"knobscsp.dll\", \"ksuser.dll\", \"ktmw32.dll\", \"l2gpstore.dll\", \"l2nacp.dll\", \"l2sechc.dll\", \"laprxy.dll\", \"legacynetux.dll\", \"lfsvc.dll\", \"libcrypto.dll\", \"licensemanager.dll\", \"licensingcsp.dll\", \"licensingdiagspp.dll\", \"licensingwinrt.dll\", \"licmgr10.dll\", \"linkinfo.dll\", \"lltdapi.dll\", \"lltdres.dll\", \"lltdsvc.dll\", \"lmhsvc.dll\", \"loadperf.dll\", \"localsec.dll\", \"localspl.dll\", \"localui.dll\", \"locationapi.dll\", \"lockappbroker.dll\", \"lockcontroller.dll\", \"lockscreendata.dll\", \"loghours.dll\", \"logoncli.dll\", \"logoncontroller.dll\", \"lpasvc.dll\", \"lpk.dll\", \"lsasrv.dll\", \"lscshostpolicy.dll\", \"lsm.dll\", \"lsmproxy.dll\", \"lstelemetry.dll\", \"luainstall.dll\", \"luiapi.dll\", \"lz32.dll\", \"magnification.dll\", \"maintenanceui.dll\", \"manageci.dll\", \"mapconfiguration.dll\", \"mapcontrolcore.dll\", \"mapgeocoder.dll\", \"mapi32.dll\", \"mapistub.dll\", \"maprouter.dll\", \"mapsbtsvc.dll\", \"mapsbtsvcproxy.dll\", \"mapscsp.dll\", \"mapsstore.dll\", \"mapstoasttask.dll\", \"mapsupdatetask.dll\", \"mbaeapi.dll\", \"mbaeapipublic.dll\", \"mbaexmlparser.dll\", \"mbmediamanager.dll\", \"mbsmsapi.dll\", \"mbussdapi.dll\", \"mccsengineshared.dll\", \"mccspal.dll\", \"mciavi32.dll\", \"mcicda.dll\", \"mciqtz32.dll\", \"mciseq.dll\", \"mciwave.dll\", \"mcrecvsrc.dll\", \"mdmcommon.dll\", \"mdmdiagnostics.dll\", \"mdminst.dll\", \"mdmmigrator.dll\", \"mdmregistration.dll\", \"memorydiagnostic.dll\", \"messagingservice.dll\", \"mf.dll\", \"mf3216.dll\", \"mfaacenc.dll\", \"mfasfsrcsnk.dll\", \"mfaudiocnv.dll\", \"mfc42.dll\", \"mfc42u.dll\", \"mfcaptureengine.dll\", \"mfcore.dll\", \"mfcsubs.dll\", \"mfds.dll\", \"mfdvdec.dll\", \"mferror.dll\", \"mfh263enc.dll\", \"mfh264enc.dll\", \"mfksproxy.dll\", \"mfmediaengine.dll\", \"mfmjpegdec.dll\", \"mfmkvsrcsnk.dll\", \"mfmp4srcsnk.dll\", \"mfmpeg2srcsnk.dll\", \"mfnetcore.dll\", \"mfnetsrc.dll\", \"mfperfhelper.dll\", \"mfplat.dll\", \"mfplay.dll\", \"mfps.dll\", \"mfreadwrite.dll\", \"mfsensorgroup.dll\", \"mfsrcsnk.dll\", \"mfsvr.dll\", \"mftranscode.dll\", \"mfvdsp.dll\", \"mfvfw.dll\", \"mfwmaaec.dll\", \"mgmtapi.dll\", \"mi.dll\", \"mibincodec.dll\", \"midimap.dll\", \"migisol.dll\", \"miguiresource.dll\", \"mimefilt.dll\", \"mimofcodec.dll\", \"minstoreevents.dll\", \"miracastinputmgr.dll\", \"miracastreceiver.dll\", \"mirrordrvcompat.dll\", \"mispace.dll\", \"mitigationclient.dll\", \"miutils.dll\", \"mlang.dll\", \"mmcbase.dll\", \"mmcndmgr.dll\", \"mmcshext.dll\", \"mmdevapi.dll\", \"mmgaclient.dll\", \"mmgaproxystub.dll\", \"mmres.dll\", \"mobilenetworking.dll\", \"modemui.dll\", \"modernexecserver.dll\", \"moricons.dll\", \"moshost.dll\", \"moshostclient.dll\", \"moshostcore.dll\", \"mosstorage.dll\", \"mp3dmod.dll\", \"mp43decd.dll\", \"mp4sdecd.dll\", \"mpeval.dll\", \"mpg4decd.dll\", \"mpr.dll\", \"mprapi.dll\", \"mprddm.dll\", \"mprdim.dll\", \"mprext.dll\", \"mprmsg.dll\", \"mpssvc.dll\", \"mpunits.dll\", \"mrmcorer.dll\", \"mrmdeploy.dll\", \"mrmindexer.dll\", \"mrt100.dll\", \"mrt_map.dll\", \"msaatext.dll\", \"msac3enc.dll\", \"msacm32.dll\", \"msafd.dll\", \"msajapi.dll\", \"msalacdecoder.dll\", \"msalacencoder.dll\", \"msamrnbdecoder.dll\", \"msamrnbencoder.dll\", \"msamrnbsink.dll\", \"msamrnbsource.dll\", \"msasn1.dll\", \"msauddecmft.dll\", \"msaudite.dll\", \"msauserext.dll\", \"mscandui.dll\", \"mscat32.dll\", \"msclmd.dll\", \"mscms.dll\", \"mscoree.dll\", \"mscorier.dll\", \"mscories.dll\", \"msctf.dll\", \"msctfmonitor.dll\", \"msctfp.dll\", \"msctfui.dll\", \"msctfuimanager.dll\", \"msdadiag.dll\", \"msdart.dll\", \"msdelta.dll\", \"msdmo.dll\", \"msdrm.dll\", \"msdtckrm.dll\", \"msdtclog.dll\", \"msdtcprx.dll\", \"msdtcspoffln.dll\", \"msdtctm.dll\", \"msdtcuiu.dll\", \"msdtcvsp1res.dll\", \"msfeeds.dll\", \"msfeedsbs.dll\", \"msflacdecoder.dll\", \"msflacencoder.dll\", \"msftedit.dll\", \"msheif.dll\", \"mshtml.dll\", \"mshtmldac.dll\", \"mshtmled.dll\", \"mshtmler.dll\", \"msi.dll\", \"msicofire.dll\", \"msidcrl40.dll\", \"msident.dll\", \"msidle.dll\", \"msidntld.dll\", \"msieftp.dll\", \"msihnd.dll\", \"msiltcfg.dll\", \"msimg32.dll\", \"msimsg.dll\", \"msimtf.dll\", \"msisip.dll\", \"msiso.dll\", \"msiwer.dll\", \"mskeyprotcli.dll\", \"mskeyprotect.dll\", \"msls31.dll\", \"msmpeg2adec.dll\", \"msmpeg2enc.dll\", \"msmpeg2vdec.dll\", \"msobjs.dll\", \"msoert2.dll\", \"msopusdecoder.dll\", \"mspatcha.dll\", \"mspatchc.dll\", \"msphotography.dll\", \"msports.dll\", \"msprivs.dll\", \"msrahc.dll\", \"msrating.dll\", \"msrawimage.dll\", \"msrdc.dll\", \"msrdpwebaccess.dll\", \"msrle32.dll\", \"msscntrs.dll\", \"mssecuser.dll\", \"mssign32.dll\", \"mssip32.dll\", \"mssitlb.dll\", \"mssph.dll\", \"mssprxy.dll\", \"mssrch.dll\", \"mssvp.dll\", \"mstask.dll\", \"mstextprediction.dll\", \"mstscax.dll\", \"msutb.dll\", \"msv1_0.dll\", \"msvcirt.dll\", \"msvcp110_win.dll\", \"msvcp120_clr0400.dll\", \"msvcp140_clr0400.dll\", \"msvcp60.dll\", \"msvcp_win.dll\", \"msvcr100_clr0400.dll\", \"msvcr120_clr0400.dll\", \"msvcrt.dll\", \"msvfw32.dll\", \"msvidc32.dll\", \"msvidctl.dll\", \"msvideodsp.dll\", \"msvp9dec.dll\", \"msvproc.dll\", \"msvpxenc.dll\", \"mswb7.dll\", \"mswebp.dll\", \"mswmdm.dll\", \"mswsock.dll\", \"msxml3.dll\", \"msxml3r.dll\", \"msxml6.dll\", \"msxml6r.dll\", \"msyuv.dll\", \"mtcmodel.dll\", \"mtf.dll\", \"mtfappserviceds.dll\", \"mtfdecoder.dll\", \"mtffuzzyds.dll\", \"mtfserver.dll\", \"mtfspellcheckds.dll\", \"mtxclu.dll\", \"mtxdm.dll\", \"mtxex.dll\", \"mtxoci.dll\", \"muifontsetup.dll\", \"mycomput.dll\", \"mydocs.dll\", \"napcrypt.dll\", \"napinsp.dll\", \"naturalauth.dll\", \"naturallanguage6.dll\", \"navshutdown.dll\", \"ncaapi.dll\", \"ncasvc.dll\", \"ncbservice.dll\", \"ncdautosetup.dll\", \"ncdprop.dll\", \"nci.dll\", \"ncobjapi.dll\", \"ncrypt.dll\", \"ncryptprov.dll\", \"ncryptsslp.dll\", \"ncsi.dll\", \"ncuprov.dll\", \"nddeapi.dll\", \"ndfapi.dll\", \"ndfetw.dll\", \"ndfhcdiscovery.dll\", \"ndishc.dll\", \"ndproxystub.dll\", \"nduprov.dll\", \"negoexts.dll\", \"netapi32.dll\", \"netbios.dll\", \"netcenter.dll\", \"netcfgx.dll\", \"netcorehc.dll\", \"netdiagfx.dll\", \"netdriverinstall.dll\", \"netevent.dll\", \"netfxperf.dll\", \"neth.dll\", \"netid.dll\", \"netiohlp.dll\", \"netjoin.dll\", \"netlogon.dll\", \"netman.dll\", \"netmsg.dll\", \"netplwiz.dll\", \"netprofm.dll\", \"netprofmsvc.dll\", \"netprovfw.dll\", \"netprovisionsp.dll\", \"netsetupapi.dll\", \"netsetupengine.dll\", \"netsetupshim.dll\", \"netsetupsvc.dll\", \"netshell.dll\", \"nettrace.dll\", \"netutils.dll\", \"networkexplorer.dll\", \"networkhelper.dll\", \"networkicon.dll\", \"networkproxycsp.dll\", \"networkstatus.dll\", \"networkuxbroker.dll\", \"newdev.dll\", \"nfcradiomedia.dll\", \"ngccredprov.dll\", \"ngcctnr.dll\", \"ngcctnrsvc.dll\", \"ngcisoctnr.dll\", \"ngckeyenum.dll\", \"ngcksp.dll\", \"ngclocal.dll\", \"ngcpopkeysrv.dll\", \"ngcprocsp.dll\", \"ngcrecovery.dll\", \"ngcsvc.dll\", \"ngctasks.dll\", \"ninput.dll\", \"nlaapi.dll\", \"nlahc.dll\", \"nlasvc.dll\", \"nlhtml.dll\", \"nlmgp.dll\", \"nlmproxy.dll\", \"nlmsprep.dll\", \"nlsbres.dll\", \"nlsdata0000.dll\", \"nlsdata0009.dll\", \"nlsdl.dll\", \"nlslexicons0009.dll\", \"nmadirect.dll\", \"normaliz.dll\", \"npmproxy.dll\", \"npsm.dll\", \"nrpsrv.dll\", \"nshhttp.dll\", \"nshipsec.dll\", \"nshwfp.dll\", \"nsi.dll\", \"nsisvc.dll\", \"ntasn1.dll\", \"ntdll.dll\", \"ntdsapi.dll\", \"ntlanman.dll\", \"ntlanui2.dll\", \"ntlmshared.dll\", \"ntmarta.dll\", \"ntprint.dll\", \"ntshrui.dll\", \"ntvdm64.dll\", \"objsel.dll\", \"occache.dll\", \"ocsetapi.dll\", \"odbc32.dll\", \"odbcbcp.dll\", \"odbcconf.dll\", \"odbccp32.dll\", \"odbccr32.dll\", \"odbccu32.dll\", \"odbcint.dll\", \"odbctrac.dll\", \"oemlicense.dll\", \"offfilt.dll\", \"officecsp.dll\", \"offlinelsa.dll\", \"offlinesam.dll\", \"offreg.dll\", \"ole32.dll\", \"oleacc.dll\", \"oleacchooks.dll\", \"oleaccrc.dll\", \"oleaut32.dll\", \"oledlg.dll\", \"oleprn.dll\", \"omadmagent.dll\", \"omadmapi.dll\", \"onebackuphandler.dll\", \"onex.dll\", \"onexui.dll\", \"opcservices.dll\", \"opengl32.dll\", \"ortcengine.dll\", \"osbaseln.dll\", \"osksupport.dll\", \"osuninst.dll\", \"p2p.dll\", \"p2pgraph.dll\", \"p2pnetsh.dll\", \"p2psvc.dll\", \"packager.dll\", \"panmap.dll\", \"pautoenr.dll\", \"pcacli.dll\", \"pcadm.dll\", \"pcaevts.dll\", \"pcasvc.dll\", \"pcaui.dll\", \"pcpksp.dll\", \"pcsvdevice.dll\", \"pcwum.dll\", \"pcwutl.dll\", \"pdh.dll\", \"pdhui.dll\", \"peerdist.dll\", \"peerdistad.dll\", \"peerdistcleaner.dll\", \"peerdistsh.dll\", \"peerdistsvc.dll\", \"peopleapis.dll\", \"peopleband.dll\", \"perceptiondevice.dll\", \"perfctrs.dll\", \"perfdisk.dll\", \"perfnet.dll\", \"perfos.dll\", \"perfproc.dll\", \"perfts.dll\", \"phoneom.dll\", \"phoneproviders.dll\", \"phoneservice.dll\", \"phoneserviceres.dll\", \"phoneutil.dll\", \"phoneutilres.dll\", \"photowiz.dll\", \"pickerplatform.dll\", \"pid.dll\", \"pidgenx.dll\", \"pifmgr.dll\", \"pimstore.dll\", \"pkeyhelper.dll\", \"pktmonapi.dll\", \"pku2u.dll\", \"pla.dll\", \"playlistfolder.dll\", \"playsndsrv.dll\", \"playtodevice.dll\", \"playtomanager.dll\", \"playtomenu.dll\", \"playtoreceiver.dll\", \"ploptin.dll\", \"pmcsnap.dll\", \"pngfilt.dll\", \"pnidui.dll\", \"pnpclean.dll\", \"pnppolicy.dll\", \"pnpts.dll\", \"pnpui.dll\", \"pnpxassoc.dll\", \"pnpxassocprx.dll\", \"pnrpauto.dll\", \"pnrphc.dll\", \"pnrpnsp.dll\", \"pnrpsvc.dll\", \"policymanager.dll\", \"polstore.dll\", \"posetup.dll\", \"posyncservices.dll\", \"pots.dll\", \"powercpl.dll\", \"powrprof.dll\", \"ppcsnap.dll\", \"prauthproviders.dll\", \"prflbmsg.dll\", \"printui.dll\", \"printwsdahost.dll\", \"prm0009.dll\", \"prncache.dll\", \"prnfldr.dll\", \"prnntfy.dll\", \"prntvpt.dll\", \"profapi.dll\", \"profext.dll\", \"profprov.dll\", \"profsvc.dll\", \"profsvcext.dll\", \"propsys.dll\", \"provcore.dll\", \"provdatastore.dll\", \"provdiagnostics.dll\", \"provengine.dll\", \"provhandlers.dll\", \"provisioningcsp.dll\", \"provmigrate.dll\", \"provops.dll\", \"provplugineng.dll\", \"provsysprep.dll\", \"provthrd.dll\", \"proximitycommon.dll\", \"proximityservice.dll\", \"prvdmofcomp.dll\", \"psapi.dll\", \"pshed.dll\", \"psisdecd.dll\", \"psmsrv.dll\", \"pstask.dll\", \"pstorec.dll\", \"ptpprov.dll\", \"puiapi.dll\", \"puiobj.dll\", \"pushtoinstall.dll\", \"pwlauncher.dll\", \"pwrshplugin.dll\", \"pwsso.dll\", \"qasf.dll\", \"qcap.dll\", \"qdv.dll\", \"qdvd.dll\", \"qedit.dll\", \"qedwipes.dll\", \"qmgr.dll\", \"query.dll\", \"quiethours.dll\", \"qwave.dll\", \"racengn.dll\", \"racpldlg.dll\", \"radardt.dll\", \"radarrs.dll\", \"radcui.dll\", \"rasadhlp.dll\", \"rasapi32.dll\", \"rasauto.dll\", \"raschap.dll\", \"raschapext.dll\", \"rasctrs.dll\", \"rascustom.dll\", \"rasdiag.dll\", \"rasdlg.dll\", \"rasgcw.dll\", \"rasman.dll\", \"rasmans.dll\", \"rasmbmgr.dll\", \"rasmediamanager.dll\", \"rasmm.dll\", \"rasmontr.dll\", \"rasplap.dll\", \"rasppp.dll\", \"rastapi.dll\", \"rastls.dll\", \"rastlsext.dll\", \"rdbui.dll\", \"rdpbase.dll\", \"rdpcfgex.dll\", \"rdpcore.dll\", \"rdpcorets.dll\", \"rdpencom.dll\", \"rdpendp.dll\", \"rdpnano.dll\", \"rdpsaps.dll\", \"rdpserverbase.dll\", \"rdpsharercom.dll\", \"rdpudd.dll\", \"rdpviewerax.dll\", \"rdsappxhelper.dll\", \"rdsdwmdr.dll\", \"rdvvmtransport.dll\", \"rdxservice.dll\", \"rdxtaskfactory.dll\", \"reagent.dll\", \"reagenttask.dll\", \"recovery.dll\", \"regapi.dll\", \"regctrl.dll\", \"regidle.dll\", \"regsvc.dll\", \"reguwpapi.dll\", \"reinfo.dll\", \"remotepg.dll\", \"remotewipecsp.dll\", \"reportingcsp.dll\", \"resampledmo.dll\", \"resbparser.dll\", \"reseteng.dll\", \"resetengine.dll\", \"resetengonline.dll\", \"resourcemapper.dll\", \"resutils.dll\", \"rgb9rast.dll\", \"riched20.dll\", \"riched32.dll\", \"rjvmdmconfig.dll\", \"rmapi.dll\", \"rmclient.dll\", \"rnr20.dll\", \"roamingsecurity.dll\", \"rometadata.dll\", \"rotmgr.dll\", \"rpcepmap.dll\", \"rpchttp.dll\", \"rpcns4.dll\", \"rpcnsh.dll\", \"rpcrt4.dll\", \"rpcrtremote.dll\", \"rpcss.dll\", \"rsaenh.dll\", \"rshx32.dll\", \"rstrtmgr.dll\", \"rtffilt.dll\", \"rtm.dll\", \"rtmediaframe.dll\", \"rtmmvrortc.dll\", \"rtutils.dll\", \"rtworkq.dll\", \"rulebasedds.dll\", \"samcli.dll\", \"samlib.dll\", \"samsrv.dll\", \"sas.dll\", \"sbe.dll\", \"sbeio.dll\", \"sberes.dll\", \"sbservicetrigger.dll\", \"scansetting.dll\", \"scardbi.dll\", \"scarddlg.dll\", \"scardsvr.dll\", \"scavengeui.dll\", \"scdeviceenum.dll\", \"scecli.dll\", \"scesrv.dll\", \"schannel.dll\", \"schedcli.dll\", \"schedsvc.dll\", \"scksp.dll\", \"scripto.dll\", \"scrobj.dll\", \"scrptadm.dll\", \"scrrun.dll\", \"sdcpl.dll\", \"sdds.dll\", \"sdengin2.dll\", \"sdfhost.dll\", \"sdhcinst.dll\", \"sdiageng.dll\", \"sdiagprv.dll\", \"sdiagschd.dll\", \"sdohlp.dll\", \"sdrsvc.dll\", \"sdshext.dll\", \"searchfolder.dll\", \"sechost.dll\", \"seclogon.dll\", \"secproc.dll\", \"secproc_isv.dll\", \"secproc_ssp.dll\", \"secproc_ssp_isv.dll\", \"secur32.dll\", \"security.dll\", \"semgrps.dll\", \"semgrsvc.dll\", \"sendmail.dll\", \"sens.dll\", \"sensapi.dll\", \"sensorsapi.dll\", \"sensorscpl.dll\", \"sensorservice.dll\", \"sensorsnativeapi.dll\", \"sensorsutilsv2.dll\", \"sensrsvc.dll\", \"serialui.dll\", \"servicinguapi.dll\", \"serwvdrv.dll\", \"sessenv.dll\", \"setbcdlocale.dll\", \"settingmonitor.dll\", \"settingsync.dll\", \"settingsynccore.dll\", \"setupapi.dll\", \"setupcl.dll\", \"setupcln.dll\", \"setupetw.dll\", \"sfc.dll\", \"sfc_os.dll\", \"sgrmenclave.dll\", \"shacct.dll\", \"shacctprofile.dll\", \"sharedpccsp.dll\", \"sharedrealitysvc.dll\", \"sharehost.dll\", \"sharemediacpl.dll\", \"shcore.dll\", \"shdocvw.dll\", \"shell32.dll\", \"shellstyle.dll\", \"shfolder.dll\", \"shgina.dll\", \"shimeng.dll\", \"shimgvw.dll\", \"shlwapi.dll\", \"shpafact.dll\", \"shsetup.dll\", \"shsvcs.dll\", \"shunimpl.dll\", \"shutdownext.dll\", \"shutdownux.dll\", \"shwebsvc.dll\", \"signdrv.dll\", \"simauth.dll\", \"simcfg.dll\", \"skci.dll\", \"slc.dll\", \"slcext.dll\", \"slwga.dll\", \"smartscreenps.dll\", \"smbhelperclass.dll\", \"smbwmiv2.dll\", \"smiengine.dll\", \"smphost.dll\", \"smsroutersvc.dll\", \"sndvolsso.dll\", \"snmpapi.dll\", \"socialapis.dll\", \"softkbd.dll\", \"softpub.dll\", \"sortwindows61.dll\", \"sortwindows62.dll\", \"spacebridge.dll\", \"spacecontrol.dll\", \"spatializerapo.dll\", \"spatialstore.dll\", \"spbcd.dll\", \"speechpal.dll\", \"spfileq.dll\", \"spinf.dll\", \"spmpm.dll\", \"spnet.dll\", \"spoolss.dll\", \"spopk.dll\", \"spp.dll\", \"sppc.dll\", \"sppcext.dll\", \"sppcomapi.dll\", \"sppcommdlg.dll\", \"sppinst.dll\", \"sppnp.dll\", \"sppobjs.dll\", \"sppwinob.dll\", \"sppwmi.dll\", \"spwinsat.dll\", \"spwizeng.dll\", \"spwizimg.dll\", \"spwizres.dll\", \"spwmp.dll\", \"sqlsrv32.dll\", \"sqmapi.dll\", \"srchadmin.dll\", \"srclient.dll\", \"srcore.dll\", \"srevents.dll\", \"srh.dll\", \"srhelper.dll\", \"srm.dll\", \"srmclient.dll\", \"srmlib.dll\", \"srmscan.dll\", \"srmshell.dll\", \"srmstormod.dll\", \"srmtrace.dll\", \"srm_ps.dll\", \"srpapi.dll\", \"srrstr.dll\", \"srumapi.dll\", \"srumsvc.dll\", \"srvcli.dll\", \"srvsvc.dll\", \"srwmi.dll\", \"sscore.dll\", \"sscoreext.dll\", \"ssdm.dll\", \"ssdpapi.dll\", \"ssdpsrv.dll\", \"sspicli.dll\", \"sspisrv.dll\", \"ssshim.dll\", \"sstpsvc.dll\", \"starttiledata.dll\", \"startupscan.dll\", \"stclient.dll\", \"sti.dll\", \"sti_ci.dll\", \"stobject.dll\", \"storageusage.dll\", \"storagewmi.dll\", \"storewuauth.dll\", \"storprop.dll\", \"storsvc.dll\", \"streamci.dll\", \"structuredquery.dll\", \"sud.dll\", \"svf.dll\", \"svsvc.dll\", \"swprv.dll\", \"sxproxy.dll\", \"sxs.dll\", \"sxshared.dll\", \"sxssrv.dll\", \"sxsstore.dll\", \"synccenter.dll\", \"synccontroller.dll\", \"synchostps.dll\", \"syncproxy.dll\", \"syncreg.dll\", \"syncres.dll\", \"syncsettings.dll\", \"syncutil.dll\", \"sysclass.dll\", \"sysfxui.dll\", \"sysmain.dll\", \"sysntfy.dll\", \"syssetup.dll\", \"systemcpl.dll\", \"t2embed.dll\", \"tabbtn.dll\", \"tabbtnex.dll\", \"tabsvc.dll\", \"tapi3.dll\", \"tapi32.dll\", \"tapilua.dll\", \"tapimigplugin.dll\", \"tapiperf.dll\", \"tapisrv.dll\", \"tapisysprep.dll\", \"tapiui.dll\", \"taskapis.dll\", \"taskbarcpl.dll\", \"taskcomp.dll\", \"taskschd.dll\", \"taskschdps.dll\", \"tbauth.dll\", \"tbs.dll\", \"tcbloader.dll\", \"tcpipcfg.dll\", \"tcpmib.dll\", \"tcpmon.dll\", \"tcpmonui.dll\", \"tdh.dll\", \"tdlmigration.dll\", \"tellib.dll\", \"termmgr.dll\", \"termsrv.dll\", \"tetheringclient.dll\", \"tetheringmgr.dll\", \"tetheringservice.dll\", \"tetheringstation.dll\", \"textshaping.dll\", \"themecpl.dll\", \"themeservice.dll\", \"themeui.dll\", \"threadpoolwinrt.dll\", \"thumbcache.dll\", \"timebrokerclient.dll\", \"timebrokerserver.dll\", \"timesync.dll\", \"timesynctask.dll\", \"tlscsp.dll\", \"tokenbinding.dll\", \"tokenbroker.dll\", \"tokenbrokerui.dll\", \"tpmcertresources.dll\", \"tpmcompc.dll\", \"tpmtasks.dll\", \"tpmvsc.dll\", \"tquery.dll\", \"traffic.dll\", \"transportdsa.dll\", \"trie.dll\", \"trkwks.dll\", \"tsbyuv.dll\", \"tscfgwmi.dll\", \"tserrredir.dll\", \"tsf3gip.dll\", \"tsgqec.dll\", \"tsmf.dll\", \"tspkg.dll\", \"tspubwmi.dll\", \"tssessionux.dll\", \"tssrvlic.dll\", \"tsworkspace.dll\", \"ttdloader.dll\", \"ttdplm.dll\", \"ttdrecord.dll\", \"ttdrecordcpu.dll\", \"ttlsauth.dll\", \"ttlscfg.dll\", \"ttlsext.dll\", \"tvratings.dll\", \"twext.dll\", \"twinapi.dll\", \"twinui.dll\", \"txflog.dll\", \"txfw32.dll\", \"tzautoupdate.dll\", \"tzres.dll\", \"tzsyncres.dll\", \"ubpm.dll\", \"ucmhc.dll\", \"ucrtbase.dll\", \"ucrtbase_clr0400.dll\", \"ucrtbase_enclave.dll\", \"udhisapi.dll\", \"udwm.dll\", \"ueficsp.dll\", \"uexfat.dll\", \"ufat.dll\", \"uiamanager.dll\", \"uianimation.dll\", \"uiautomationcore.dll\", \"uicom.dll\", \"uireng.dll\", \"uiribbon.dll\", \"uiribbonres.dll\", \"ulib.dll\", \"umb.dll\", \"umdmxfrm.dll\", \"umpdc.dll\", \"umpnpmgr.dll\", \"umpo-overrides.dll\", \"umpo.dll\", \"umpoext.dll\", \"umpowmi.dll\", \"umrdp.dll\", \"unattend.dll\", \"unenrollhook.dll\", \"unimdmat.dll\", \"uniplat.dll\", \"unistore.dll\", \"untfs.dll\", \"updateagent.dll\", \"updatecsp.dll\", \"updatepolicy.dll\", \"upnp.dll\", \"upnphost.dll\", \"upshared.dll\", \"urefs.dll\", \"urefsv1.dll\", \"ureg.dll\", \"url.dll\", \"urlmon.dll\", \"usbcapi.dll\", \"usbceip.dll\", \"usbmon.dll\", \"usbperf.dll\", \"usbpmapi.dll\", \"usbtask.dll\", \"usbui.dll\", \"user32.dll\", \"usercpl.dll\", \"userdataservice.dll\", \"userdatatimeutil.dll\", \"userenv.dll\", \"userinitext.dll\", \"usermgr.dll\", \"usermgrcli.dll\", \"usermgrproxy.dll\", \"usoapi.dll\", \"usocoreps.dll\", \"usosvc.dll\", \"usp10.dll\", \"ustprov.dll\", \"utcutil.dll\", \"utildll.dll\", \"uudf.dll\", \"uvcmodel.dll\", \"uwfcfgmgmt.dll\", \"uwfcsp.dll\", \"uwfservicingapi.dll\", \"uxinit.dll\", \"uxlib.dll\", \"uxlibres.dll\", \"uxtheme.dll\", \"vac.dll\", \"van.dll\", \"vault.dll\", \"vaultcds.dll\", \"vaultcli.dll\", \"vaultroaming.dll\", \"vaultsvc.dll\", \"vbsapi.dll\", \"vbscript.dll\", \"vbssysprep.dll\", \"vcardparser.dll\", \"vdsbas.dll\", \"vdsdyn.dll\", \"vdsutil.dll\", \"vdsvd.dll\", \"vds_ps.dll\", \"verifier.dll\", \"version.dll\", \"vertdll.dll\", \"vfuprov.dll\", \"vfwwdm32.dll\", \"vhfum.dll\", \"vid.dll\", \"videohandlers.dll\", \"vidreszr.dll\", \"virtdisk.dll\", \"vmbuspipe.dll\", \"vmdevicehost.dll\", \"vmictimeprovider.dll\", \"vmrdvcore.dll\", \"voiprt.dll\", \"vpnike.dll\", \"vpnikeapi.dll\", \"vpnsohdesktop.dll\", \"vpnv2csp.dll\", \"vscmgrps.dll\", \"vssapi.dll\", \"vsstrace.dll\", \"vss_ps.dll\", \"w32time.dll\", \"w32topl.dll\", \"waasassessment.dll\", \"waasmediccapsule.dll\", \"waasmedicps.dll\", \"waasmedicsvc.dll\", \"wabsyncprovider.dll\", \"walletproxy.dll\", \"walletservice.dll\", \"wavemsp.dll\", \"wbemcomn.dll\", \"wbiosrvc.dll\", \"wci.dll\", \"wcimage.dll\", \"wcmapi.dll\", \"wcmcsp.dll\", \"wcmsvc.dll\", \"wcnapi.dll\", \"wcncsvc.dll\", \"wcneapauthproxy.dll\", \"wcneappeerproxy.dll\", \"wcnnetsh.dll\", \"wcnwiz.dll\", \"wc_storage.dll\", \"wdc.dll\", \"wdi.dll\", \"wdigest.dll\", \"wdscore.dll\", \"webauthn.dll\", \"webcamui.dll\", \"webcheck.dll\", \"webclnt.dll\", \"webio.dll\", \"webservices.dll\", \"websocket.dll\", \"wecapi.dll\", \"wecsvc.dll\", \"wephostsvc.dll\", \"wer.dll\", \"werconcpl.dll\", \"wercplsupport.dll\", \"werenc.dll\", \"weretw.dll\", \"wersvc.dll\", \"werui.dll\", \"wevtapi.dll\", \"wevtfwd.dll\", \"wevtsvc.dll\", \"wfapigp.dll\", \"wfdprov.dll\", \"wfdsconmgr.dll\", \"wfdsconmgrsvc.dll\", \"wfhc.dll\", \"whealogr.dll\", \"whhelper.dll\", \"wiaaut.dll\", \"wiadefui.dll\", \"wiadss.dll\", \"wiarpc.dll\", \"wiascanprofiles.dll\", \"wiaservc.dll\", \"wiashext.dll\", \"wiatrace.dll\", \"wificloudstore.dll\", \"wificonfigsp.dll\", \"wifidisplay.dll\", \"wimgapi.dll\", \"win32spl.dll\", \"win32u.dll\", \"winbio.dll\", \"winbiodatamodel.dll\", \"winbioext.dll\", \"winbrand.dll\", \"wincorlib.dll\", \"wincredprovider.dll\", \"wincredui.dll\", \"windowmanagement.dll\", \"windowscodecs.dll\", \"windowscodecsext.dll\", \"windowscodecsraw.dll\", \"windowsiotcsp.dll\", \"windowslivelogin.dll\", \"winethc.dll\", \"winhttp.dll\", \"winhttpcom.dll\", \"winhvemulation.dll\", \"winhvplatform.dll\", \"wininet.dll\", \"wininetlui.dll\", \"wininitext.dll\", \"winipcfile.dll\", \"winipcsecproc.dll\", \"winipsec.dll\", \"winlangdb.dll\", \"winlogonext.dll\", \"winmde.dll\", \"winml.dll\", \"winmm.dll\", \"winmmbase.dll\", \"winmsipc.dll\", \"winnlsres.dll\", \"winnsi.dll\", \"winreagent.dll\", \"winrnr.dll\", \"winrscmd.dll\", \"winrsmgr.dll\", \"winrssrv.dll\", \"winrttracing.dll\", \"winsatapi.dll\", \"winscard.dll\", \"winsetupui.dll\", \"winshfhc.dll\", \"winsku.dll\", \"winsockhc.dll\", \"winsqlite3.dll\", \"winsrpc.dll\", \"winsrv.dll\", \"winsrvext.dll\", \"winsta.dll\", \"winsync.dll\", \"winsyncmetastore.dll\", \"winsyncproviders.dll\", \"wintrust.dll\", \"wintypes.dll\", \"winusb.dll\", \"wirednetworkcsp.dll\", \"wisp.dll\", \"wkscli.dll\", \"wkspbrokerax.dll\", \"wksprtps.dll\", \"wkssvc.dll\", \"wlanapi.dll\", \"wlancfg.dll\", \"wlanconn.dll\", \"wlandlg.dll\", \"wlangpui.dll\", \"wlanhc.dll\", \"wlanhlp.dll\", \"wlanmediamanager.dll\", \"wlanmm.dll\", \"wlanmsm.dll\", \"wlanpref.dll\", \"wlanradiomanager.dll\", \"wlansec.dll\", \"wlansvc.dll\", \"wlansvcpal.dll\", \"wlanui.dll\", \"wlanutil.dll\", \"wldap32.dll\", \"wldp.dll\", \"wlgpclnt.dll\", \"wlidcli.dll\", \"wlidcredprov.dll\", \"wlidfdp.dll\", \"wlidnsp.dll\", \"wlidprov.dll\", \"wlidres.dll\", \"wlidsvc.dll\", \"wmadmod.dll\", \"wmadmoe.dll\", \"wmalfxgfxdsp.dll\", \"wmasf.dll\", \"wmcodecdspps.dll\", \"wmdmlog.dll\", \"wmdmps.dll\", \"wmdrmsdk.dll\", \"wmerror.dll\", \"wmi.dll\", \"wmiclnt.dll\", \"wmicmiplugin.dll\", \"wmidcom.dll\", \"wmidx.dll\", \"wmiprop.dll\", \"wmitomi.dll\", \"wmnetmgr.dll\", \"wmp.dll\", \"wmpdui.dll\", \"wmpdxm.dll\", \"wmpeffects.dll\", \"wmphoto.dll\", \"wmploc.dll\", \"wmpps.dll\", \"wmpshell.dll\", \"wmsgapi.dll\", \"wmspdmod.dll\", \"wmspdmoe.dll\", \"wmvcore.dll\", \"wmvdecod.dll\", \"wmvdspa.dll\", \"wmvencod.dll\", \"wmvsdecd.dll\", \"wmvsencd.dll\", \"wmvxencd.dll\", \"woftasks.dll\", \"wofutil.dll\", \"wordbreakers.dll\", \"workfoldersgpext.dll\", \"workfoldersres.dll\", \"workfoldersshell.dll\", \"workfolderssvc.dll\", \"wosc.dll\", \"wow64.dll\", \"wow64cpu.dll\", \"wow64win.dll\", \"wpbcreds.dll\", \"wpc.dll\", \"wpcapi.dll\", \"wpcdesktopmonsvc.dll\", \"wpcproxystubs.dll\", \"wpcrefreshtask.dll\", \"wpcwebfilter.dll\", \"wpdbusenum.dll\", \"wpdshext.dll\", \"wpdshserviceobj.dll\", \"wpdsp.dll\", \"wpd_ci.dll\", \"wpnapps.dll\", \"wpnclient.dll\", \"wpncore.dll\", \"wpninprc.dll\", \"wpnprv.dll\", \"wpnservice.dll\", \"wpnsruprov.dll\", \"wpnuserservice.dll\", \"wpportinglibrary.dll\", \"wpprecorderum.dll\", \"wptaskscheduler.dll\", \"wpx.dll\", \"ws2help.dll\", \"ws2_32.dll\", \"wscapi.dll\", \"wscinterop.dll\", \"wscisvif.dll\", \"wsclient.dll\", \"wscproxystub.dll\", \"wscsvc.dll\", \"wsdapi.dll\", \"wsdchngr.dll\", \"wsdprintproxy.dll\", \"wsdproviderutil.dll\", \"wsdscanproxy.dll\", \"wsecedit.dll\", \"wsepno.dll\", \"wshbth.dll\", \"wshcon.dll\", \"wshelper.dll\", \"wshext.dll\", \"wshhyperv.dll\", \"wship6.dll\", \"wshqos.dll\", \"wshrm.dll\", \"wshtcpip.dll\", \"wshunix.dll\", \"wslapi.dll\", \"wsmagent.dll\", \"wsmauto.dll\", \"wsmplpxy.dll\", \"wsmres.dll\", \"wsmsvc.dll\", \"wsmwmipl.dll\", \"wsnmp32.dll\", \"wsock32.dll\", \"wsplib.dll\", \"wsp_fs.dll\", \"wsp_health.dll\", \"wsp_sr.dll\", \"wtsapi32.dll\", \"wuapi.dll\", \"wuaueng.dll\", \"wuceffects.dll\", \"wudfcoinstaller.dll\", \"wudfplatform.dll\", \"wudfsmcclassext.dll\", \"wudfx.dll\", \"wudfx02000.dll\", \"wudriver.dll\", \"wups.dll\", \"wups2.dll\", \"wuuhext.dll\", \"wuuhosdeployment.dll\", \"wvc.dll\", \"wwaapi.dll\", \"wwaext.dll\", \"wwanapi.dll\", \"wwancfg.dll\", \"wwanhc.dll\", \"wwanprotdim.dll\", \"wwanradiomanager.dll\", \"wwansvc.dll\", \"wwapi.dll\", \"xamltilerender.dll\", \"xaudio2_8.dll\", \"xaudio2_9.dll\", \"xblauthmanager.dll\", \"xblgamesave.dll\", \"xblgamesaveext.dll\", \"xblgamesaveproxy.dll\", \"xboxgipsvc.dll\", \"xboxgipsynthetic.dll\", \"xboxnetapisvc.dll\", \"xinput1_4.dll\", \"xinput9_1_0.dll\", \"xinputuap.dll\", \"xmlfilter.dll\", \"xmllite.dll\", \"xmlprovi.dll\", \"xolehlp.dll\", \"xpsgdiconverter.dll\", \"xpsprint.dll\", \"xpspushlayer.dll\", \"xpsrasterservice.dll\", \"xpsservices.dll\", \"xwizards.dll\", \"xwreg.dll\", \"xwtpdui.dll\", \"xwtpw32.dll\", \"zipcontainer.dll\", \"zipfldr.dll\", \"bootsvc.dll\", \"halextintcpsedma.dll\", \"icsvcvss.dll\", \"ieproxydesktop.dll\", \"lsaadt.dll\", \"nlansp_c.dll\", \"nrtapi.dll\", \"opencl.dll\", \"pfclient.dll\", \"pnpdiag.dll\", \"prxyqry.dll\", \"rdpnanotransport.dll\", \"servicingcommon.dll\", \"sortwindows63.dll\", \"sstpcfg.dll\", \"tdhres.dll\", \"umpodev.dll\", \"utcapi.dll\", \"windlp.dll\", \"wow64base.dll\", \"wow64con.dll\", \"blbuires.dll\", \"bpainst.dll\", \"cbclient.dll\", \"certadm.dll\", \"certocm.dll\", \"certpick.dll\", \"csdeployres.dll\", \"dsdeployres.dll\", \"eapa3hst.dll\", \"eapacfg.dll\", \"eapahost.dll\", \"elsext.dll\", \"encdump.dll\", \"escmigplugin.dll\", \"fsclient.dll\", \"fsdeployres.dll\", \"fssminst.dll\", \"fssmres.dll\", \"fssprov.dll\", \"ipamapi.dll\", \"kpssvc.dll\", \"lbfoadminlib.dll\", \"mintdh.dll\", \"mmci.dll\", \"mmcico.dll\", \"mprsnap.dll\", \"mstsmhst.dll\", \"mstsmmc.dll\", \"muxinst.dll\", \"personax.dll\", \"rassfm.dll\", \"rasuser.dll\", \"rdmsinst.dll\", \"rdmsres.dll\", \"rtrfiltr.dll\", \"sacsvr.dll\", \"scrdenrl.dll\", \"sdclient.dll\", \"sharedstartmodel.dll\", \"smsrouter.dll\", \"spwizimg_svr.dll\", \"sqlcecompact40.dll\", \"sqlceoledb40.dll\", \"sqlceqp40.dll\", \"sqlcese40.dll\", \"srvmgrinst.dll\", \"svrmgrnc.dll\", \"tapisnap.dll\", \"tlsbrand.dll\", \"tsec.dll\", \"tsprop.dll\", \"tspubiconhelper.dll\", \"tssdjet.dll\", \"tsuserex.dll\", \"ualapi.dll\", \"ualsvc.dll\", \"umcres.dll\", \"updatehandlers.dll\", \"usocore.dll\", \"vssui.dll\", \"wsbappres.dll\", \"wsbonline.dll\", \"wsmselpl.dll\", \"wsmselrr.dll\", \"xpsfilt.dll\", \"xpsshhdr.dll\"\n ) and\n not (\n (\n dll.name : \"icuuc.dll\" and dll.code_signature.subject_name in (\n \"Valve\", \"Valve Corp.\", \"Avanquest Software (7270356 Canada Inc)\", \"Adobe Inc.\"\n ) and dll.code_signature.trusted == true\n ) or\n (\n dll.name : (\"timeSync.dll\", \"appInfo.dll\") and dll.code_signature.subject_name in (\n \"VMware Inc.\", \"VMware, Inc.\"\n ) and dll.code_signature.trusted == true\n ) or\n (\n dll.name : \"libcrypto.dll\" and dll.code_signature.subject_name in (\n \"NoMachine S.a.r.l.\", \"Bitdefender SRL\", \"Oculus VR, LLC\"\n ) and dll.code_signature.trusted == true\n ) or\n (\n dll.name : \"ucrtbase.dll\" and dll.code_signature.subject_name in (\n \"Proofpoint, Inc.\", \"Rapid7 LLC\", \"Eclipse.org Foundation, Inc.\", \"Amazon.com Services LLC\", \"Windows Phone\"\n ) and dll.code_signature.trusted == true\n ) or\n (dll.name : \"ICMP.dll\" and dll.code_signature.subject_name == \"Paessler AG\" and dll.code_signature.trusted == true) or\n (dll.name : \"kerberos.dll\" and dll.code_signature.subject_name == \"Bitdefender SRL\" and dll.code_signature.trusted == true) or\n (dll.name : \"dbghelp.dll\" and dll.code_signature.trusted == true) or\n (dll.name : \"DirectML.dll\" and dll.code_signature.subject_name == \"Adobe Inc.\" and dll.code_signature.trusted == true) or\n (\n dll.path : (\n \"?:\\\\Windows\\\\SystemApps\\\\*\\\\dxgi.dll\",\n \"?:\\\\Windows\\\\SystemApps\\\\*\\\\wincorlib.dll\",\n \"?:\\\\Windows\\\\dxgi.dll\"\n )\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "System Binary Copied and/or Moved to Suspicious Directory", - "description": "This rule monitors for the copying or moving of a system binary to a suspicious directory. Adversaries may copy/move and rename system binaries to evade detection. Copying a system binary to a different location should not occur often, so if it does, the activity should be investigated.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1564", - "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/" - }, - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.003", - "name": "Rename System Utilities", - "reference": "https://attack.mitre.org/techniques/T1036/003/" - } - ] - } - ] - } - ], - "id": "6cb99ab8-4d41-4400-ab41-f617c9033b2d", - "rule_id": "fda1d332-5e08-4f27-8a9b-8c802e3292a6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from Elastic Defend.\n\n### Elastic Defend Integration Setup\nElastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows\nthe Elastic Agent to monitor events on your host and send data to the Elastic Security app.\n\n#### Prerequisite Requirements:\n- Fleet is required for Elastic Defend.\n- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).\n\n#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:\n- Go to the Kibana home page and click Add integrations.\n- In the query bar, search for Elastic Defend and select the integration to see more details about it.\n- Click Add Elastic Defend.\n- Configure the integration name and optionally add a description.\n- Select the type of environment you want to protect, either Traditional Endpoints or Cloud Workloads.\n- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).\n- We suggest to select \"Complete EDR (Endpoint Detection and Response)\" as a configuration setting, that provides \"All events; all preventions\"\n- Enter a name for the agent policy in New agent policy name. If other agent policies already exist, you can click the Existing hosts tab and select an existing policy instead.\nFor more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).\n- Click Save and Continue.\n- To complete the integration, select Add Elastic Agent to your hosts and continue to the next section to install the Elastic Agent on your hosts.\nFor more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).\n\n", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.name in (\"cp\", \"mv\") and process.args : (\n // Shells\n \"/bin/*sh\", \"/usr/bin/*sh\", \n\n // Interpreters\n \"/bin/python*\", \"/usr/bin/python*\", \"/bin/php*\", \"/usr/bin/php*\", \"/bin/ruby*\", \"/usr/bin/ruby*\", \"/bin/perl*\",\n \"/usr/bin/perl*\", \"/bin/lua*\", \"/usr/bin/lua*\", \"/bin/java*\", \"/usr/bin/java*\", \n\n // Compilers\n \"/bin/gcc*\", \"/usr/bin/gcc*\", \"/bin/g++*\", \"/usr/bin/g++*\", \"/bin/cc\", \"/usr/bin/cc\",\n\n // Suspicious utilities\n \"/bin/nc\", \"/usr/bin/nc\", \"/bin/ncat\", \"/usr/bin/ncat\", \"/bin/netcat\", \"/usr/bin/netcat\", \"/bin/nc.openbsd\",\n \"/usr/bin/nc.openbsd\", \"/bin/*awk\", \"/usr/bin/*awk\", \"/bin/socat\", \"/usr/bin/socat\", \"/bin/openssl\",\n \"/usr/bin/openssl\", \"/bin/telnet\", \"/usr/bin/telnet\", \"/bin/mkfifo\", \"/usr/bin/mkfifo\", \"/bin/mknod\",\n \"/usr/bin/mknod\", \"/bin/ping*\", \"/usr/bin/ping*\", \"/bin/nmap\", \"/usr/bin/nmap\",\n\n // System utilities\n \"/bin/ls\", \"/usr/bin/ls\", \"/bin/cat\", \"/usr/bin/cat\", \"/bin/sudo\", \"/usr/bin/sudo\", \"/bin/curl\", \"/usr/bin/curl\",\n \"/bin/wget\", \"/usr/bin/wget\", \"/bin/tmux\", \"/usr/bin/tmux\", \"/bin/screen\", \"/usr/bin/screen\", \"/bin/ssh\",\n \"/usr/bin/ssh\", \"/bin/ftp\", \"/usr/bin/ftp\"\n ) and not process.parent.name in (\"dracut-install\", \"apticron\", \"generate-from-dir\", \"platform-python\")]\n [file where host.os.type == \"linux\" and event.action == \"creation\" and file.path : (\n \"/dev/shm/*\", \"/run/shm/*\", \"/tmp/*\", \"/var/tmp/*\", \"/run/*\", \"/var/run/*\", \"/var/www/*\", \"/proc/*/fd/*\"\n )]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "PowerShell Script with Password Policy Discovery Capabilities", - "description": "Identifies the use of Cmdlets and methods related to remote execution activities using WinRM. Attackers can abuse WinRM to perform lateral movement using built-in tools.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Tactic: Execution", - "Data Source: PowerShell Logs", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1201", - "name": "Password Policy Discovery", - "reference": "https://attack.mitre.org/techniques/T1201/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "08257b25-bb97-4dae-b282-2496a3038a6a", - "rule_id": "fe25d5bc-01fa-494a-95ff-535c29cc4c96", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category: \"process\" and host.os.type:windows and\n(\n powershell.file.script_block_text: (\n \"Get-ADDefaultDomainPasswordPolicy\" or\n \"Get-ADFineGrainedPasswordPolicy\" or\n \"Get-ADUserResultantPasswordPolicy\" or\n \"Get-DomainPolicy\" or\n \"Get-GPPPassword\" or\n \"Get-PassPol\"\n )\n or\n powershell.file.script_block_text: (\n (\"defaultNamingContext\" or \"ActiveDirectory.DirectoryContext\" or \"ActiveDirectory.DirectorySearcher\") and\n (\n (\n \".MinLengthPassword\" or\n \".MinPasswordAge\" or\n \".MaxPasswordAge\"\n ) or\n (\n \"minPwdAge\" or\n \"maxPwdAge\" or\n \"minPwdLength\"\n ) or\n (\n \"msDS-PasswordSettings\"\n )\n )\n )\n) and not powershell.file.script_block_text : (\n \"sentinelbreakpoints\" and \"Set-PSBreakpoint\" and \"PowerSploitIndicators\"\n )\n and not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "Potential Masquerading as Business App Installer", - "description": "Identifies executables with names resembling legitimate business applications but lacking signatures from the original developer. Attackers may trick users into downloading malicious executables that masquerade as legitimate applications via malicious ads, forum posts, and tutorials, effectively gaining initial access.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 2, - "tags": [ - "Domain: Endpoint", - "Data Source: Elastic Defend", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Initial Access", - "Tactic: Execution", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.rapid7.com/blog/post/2023/08/31/fake-update-utilizes-new-idat-loader-to-execute-stealc-and-lumma-infostealers" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - }, - { - "id": "T1036.005", - "name": "Match Legitimate Name or Location", - "reference": "https://attack.mitre.org/techniques/T1036/005/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1189", - "name": "Drive-by Compromise", - "reference": "https://attack.mitre.org/techniques/T1189/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1204", - "name": "User Execution", - "reference": "https://attack.mitre.org/techniques/T1204/", - "subtechnique": [ - { - "id": "T1204.002", - "name": "Malicious File", - "reference": "https://attack.mitre.org/techniques/T1204/002/" - } - ] - } - ] - } - ], - "id": "fd29937f-9b29-402d-8dc7-db09351b6eac", - "rule_id": "feafdc51-c575-4ed2-89dd-8e20badc2d6c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and\n event.type == \"start\" and process.executable : \"?:\\\\Users\\\\*\\\\Downloads\\\\*\" and\n not process.code_signature.status : (\"errorCode_endpoint*\", \"errorUntrustedRoot\", \"errorChaining\") and\n (\n /* Slack */\n (process.name : \"*slack*.exe\" and not\n (process.code_signature.subject_name in (\n \"Slack Technologies, Inc.\",\n \"Slack Technologies, LLC\"\n ) and process.code_signature.trusted == true)\n ) or\n\n /* WebEx */\n (process.name : \"*webex*.exe\" and not\n (process.code_signature.subject_name in (\"Cisco WebEx LLC\", \"Cisco Systems, Inc.\") and process.code_signature.trusted == true)\n ) or\n\n /* Teams */\n (process.name : \"teams*.exe\" and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Discord */\n (process.name : \"*discord*.exe\" and not\n (process.code_signature.subject_name == \"Discord Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* WhatsApp */\n (process.name : \"*whatsapp*.exe\" and not\n (process.code_signature.subject_name in (\n \"WhatsApp LLC\",\n \"WhatsApp, Inc\",\n \"24803D75-212C-471A-BC57-9EF86AB91435\"\n ) and process.code_signature.trusted == true)\n ) or\n\n /* Zoom */\n (process.name : (\"*zoom*installer*.exe\", \"*zoom*setup*.exe\", \"zoom.exe\") and not\n (process.code_signature.subject_name == \"Zoom Video Communications, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Outlook */\n (process.name : \"*outlook*.exe\" and not\n (\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true) or\n (\n process.name: \"MSOutlookHelp-PST-Viewer.exe\" and process.code_signature.subject_name == \"Aryson Technologies Pvt. Ltd\" and\n process.code_signature.trusted == true\n )\n )\n ) or\n\n /* Thunderbird */\n (process.name : \"*thunderbird*.exe\" and not\n (process.code_signature.subject_name == \"Mozilla Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Grammarly */\n (process.name : \"*grammarly*.exe\" and not\n (process.code_signature.subject_name == \"Grammarly, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Dropbox */\n (process.name : \"*dropbox*.exe\" and not\n (process.code_signature.subject_name == \"Dropbox, Inc\" and process.code_signature.trusted == true)\n ) or\n\n /* Tableau */\n (process.name : \"*tableau*.exe\" and not\n (process.code_signature.subject_name == \"Tableau Software LLC\" and process.code_signature.trusted == true)\n ) or\n\n /* Google Drive */\n (process.name : \"*googledrive*.exe\" and not\n (process.code_signature.subject_name == \"Google LLC\" and process.code_signature.trusted == true)\n ) or\n\n /* MSOffice */\n (process.name : \"*office*setup*.exe\" and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Okta */\n (process.name : \"*okta*.exe\" and not\n (process.code_signature.subject_name == \"Okta, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* OneDrive */\n (process.name : \"*onedrive*.exe\" and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Chrome */\n (process.name : \"*chrome*.exe\" and not\n (process.code_signature.subject_name in (\"Google LLC\", \"Google Inc\") and process.code_signature.trusted == true)\n ) or\n\n /* Firefox */\n (process.name : \"*firefox*.exe\" and not\n (process.code_signature.subject_name == \"Mozilla Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Edge */\n (process.name : (\"*microsoftedge*.exe\", \"*msedge*.exe\") and not\n (process.code_signature.subject_name == \"Microsoft Corporation\" and process.code_signature.trusted == true)\n ) or\n\n /* Brave */\n (process.name : \"*brave*.exe\" and not\n (process.code_signature.subject_name == \"Brave Software, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* GoogleCloud Related Tools */\n (process.name : \"*GoogleCloud*.exe\" and not\n (process.code_signature.subject_name == \"Google LLC\" and process.code_signature.trusted == true)\n ) or\n\n /* Github Related Tools */\n (process.name : \"*github*.exe\" and not\n (process.code_signature.subject_name == \"GitHub, Inc.\" and process.code_signature.trusted == true)\n ) or\n\n /* Notion */\n (process.name : \"*notion*.exe\" and not\n (process.code_signature.subject_name == \"Notion Labs, Inc.\" and process.code_signature.trusted == true)\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "MS Office Macro Security Registry Modifications", - "description": "Microsoft Office Products offer options for users and developers to control the security settings for running and using Macros. Adversaries may abuse these security settings to modify the default behavior of the Office Application to trust future macros and/or disable security warnings, which could increase their chances of establishing persistence.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Triage and analysis\n\n### Investigating MS Office Macro Security Registry Modifications\n\nMacros are small programs that are used to automate repetitive tasks in Microsoft Office applications. Historically, macros have been used for a variety of reasons -- from automating part of a job, to building entire processes and data flows. Macros are written in Visual Basic for Applications (VBA) and are saved as part of Microsoft Office files.\n\nMacros are often created for legitimate reasons, but they can also be written by attackers to gain access, harm a system, or bypass other security controls such as application allow listing. In fact, exploitation from malicious macros is one of the top ways that organizations are compromised today. These attacks are often conducted through phishing or spear phishing campaigns.\n\nAttackers can convince victims to modify Microsoft Office security settings, so their macros are trusted by default and no warnings are displayed when they are executed. These settings include:\n\n- *Trust access to the VBA project object model* - When enabled, Microsoft Office will trust all macros and run any code without showing a security warning or requiring user permission.\n- *VbaWarnings* - When set to 1, Microsoft Office will trust all macros and run any code without showing a security warning or requiring user permission.\n\nThis rule looks for registry changes affecting the conditions above.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Contact the user and check if the change was done manually.\n- Verify whether malicious macros were executed after the registry change.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Retrieve recently executed Office documents and determine if they are malicious:\n - Use a private sandboxed malware analysis system to perform analysis.\n - Observe and collect information about the following activities:\n - Attempts to contact external domains and addresses.\n - File and registry access, modification, and creation activities.\n - Service creation and launch activities.\n - Scheduled task creation.\n - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.\n - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.\n\n### False positive analysis\n\n- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Reset the registry key value.\n- Isolate the involved host to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Explore using GPOs to manage security settings for Microsoft Office macros.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).", - "version": 105, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Resources: Investigation Guide", - "Data Source: Elastic Endgame" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1204", - "name": "User Execution", - "reference": "https://attack.mitre.org/techniques/T1204/", - "subtechnique": [ - { - "id": "T1204.002", - "name": "Malicious File", - "reference": "https://attack.mitre.org/techniques/T1204/002/" - } - ] - } - ] - } - ], - "id": "ae455dff-c06f-4bd4-af89-464b427710e1", - "rule_id": "feeed87c-5e95-4339-aef1-47fd79bcfbe3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path : (\n \"HKU\\\\S-1-5-21-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\AccessVBOM\",\n \"HKU\\\\S-1-5-21-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\VbaWarnings\",\n \"HKU\\\\S-1-12-1-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\AccessVBOM\",\n \"HKU\\\\S-1-12-1-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\VbaWarnings\",\n \"\\\\REGISTRY\\\\USER\\\\S-1-5-21-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\AccessVBOM\",\n \"\\\\REGISTRY\\\\USER\\\\S-1-5-21-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\VbaWarnings\",\n \"\\\\REGISTRY\\\\USER\\\\S-1-12-1-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\AccessVBOM\",\n \"\\\\REGISTRY\\\\USER\\\\S-1-12-1-*\\\\SOFTWARE\\\\Microsoft\\\\Office\\\\*\\\\Security\\\\VbaWarnings\"\n ) and\n registry.data.strings : (\"0x00000001\", \"1\") and\n process.name : (\"cscript.exe\", \"wscript.exe\", \"mshta.exe\", \"mshta.exe\", \"winword.exe\", \"excel.exe\")\n", - "language": "eql", - "index": [ - "winlogbeat-*", - "logs-windows.*", - "endgame-*" - ] - }, - { - "name": "Microsoft 365 Exchange Transport Rule Creation", - "description": "Identifies a transport rule creation in Microsoft 365. As a best practice, Exchange Online mail transport rules should not be set to forward email to domains outside of your organization. An adversary may create transport rules to exfiltrate data.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 102, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "A new transport rule may be created by a system or network administrator. Verify that the configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://docs.microsoft.com/en-us/powershell/module/exchange/new-transportrule?view=exchange-ps", - "https://docs.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1537", - "name": "Transfer Data to Cloud Account", - "reference": "https://attack.mitre.org/techniques/T1537/" - } - ] - } - ], - "id": "2dbecfe2-6d16-4f29-b439-d06a7fe89dc8", - "rule_id": "ff4dd44a-0ac6-44c4-8609-3f81bc820f02", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:\"New-TransportRule\" and event.outcome:success\n", - "language": "kuery" - }, - { - "name": "GCP Firewall Rule Deletion", - "description": "Identifies when a firewall rule is deleted in Google Cloud Platform (GCP) for Virtual Private Cloud (VPC) or App Engine. These firewall rules can be configured to allow or deny connections to or from virtual machine (VM) instances or specific applications. An adversary may delete a firewall rule in order to weaken their target's security controls.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 104, - "tags": [ - "Domain: Cloud", - "Data Source: GCP", - "Data Source: Google Cloud Platform", - "Use Case: Configuration Audit", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Firewall rules may be deleted by system administrators. Verify that the firewall configuration change was expected. Exceptions can be added to this rule to filter expected behavior." - ], - "references": [ - "https://cloud.google.com/vpc/docs/firewalls", - "https://cloud.google.com/appengine/docs/standard/python/understanding-firewalls" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/" - } - ] - } - ], - "id": "e3d92e31-66f5-4dd6-9f1e-83bb03dda3ca", - "rule_id": "ff9b571e-61d6-4f6c-9561-eb4cca3bafe1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "gcp", - "version": "^2.0.0", - "integration": "audit" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "query", - "index": [ - "filebeat-*", - "logs-gcp*" - ], - "query": "event.dataset:gcp.audit and event.action:(*.compute.firewalls.delete or google.appengine.*.Firewall.Delete*Rule)\n", - "language": "kuery" - }, - { - "name": "Potential Network Scan Executed From Host", - "description": "This threshold rule monitors for the rapid execution of unix utilities that are capable of conducting network scans. Adversaries may leverage built-in tools such as ping, netcat or socat to execute ping sweeps across the network while attempting to evade detection or due to the lack of network mapping tools available on the compromised host.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1046", - "name": "Network Service Discovery", - "reference": "https://attack.mitre.org/techniques/T1046/" - } - ] - } - ], - "id": "8910dae5-6594-47fb-9c8a-121099a2f8d2", - "rule_id": "03c23d45-d3cb-4ad4-ab5d-b361ffe8724a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "threshold", - "query": "host.os.type:linux and event.action:exec and event.type:start and \nprocess.name:(ping or nping or hping or hping2 or hping3 or nc or ncat or netcat or socat)\n", - "threshold": { - "field": [ - "host.id", - "process.parent.entity_id", - "process.executable" - ], - "value": 1, - "cardinality": [ - { - "field": "process.args", - "value": 100 - } - ] - }, - "index": [ - "logs-endpoint.events.*" - ], - "language": "kuery" - }, - { - "name": "Tainted Kernel Module Load", - "description": "This rule monitors the syslog log file for messages related to instances of a tainted kernel module load. Rootkits often leverage kernel modules as their main defense evasion technique. Detecting tainted kernel module loads is crucial for ensuring system security and integrity, as malicious or unauthorized modules can compromise the kernel and lead to system vulnerabilities or unauthorized access.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.006", - "name": "Kernel Modules and Extensions", - "reference": "https://attack.mitre.org/techniques/T1547/006/" - } - ] - } - ] - } - ], - "id": "8d07d8be-e998-4cbf-b1dc-c19cff936ff3", - "rule_id": "05cad2fb-200c-407f-b472-02ea8c9e5e4a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "system", - "version": "^1.6.4" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "message", - "type": "match_only_text", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "\nThis rule requires data coming in from one of the following integrations:\n- Auditbeat\n- Filebeat\n\n### Auditbeat Setup\nAuditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.\n\n#### The following steps should be executed in order to add the Auditbeat for Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).\n- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).\n- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).\n- For complete Setup and Run Auditbeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).\n\n### Filebeat Setup\nFilebeat is a lightweight shipper for forwarding and centralizing log data. Installed as an agent on your servers, Filebeat monitors the log files or locations that you specify, collects log events, and forwards them either to Elasticsearch or Logstash for indexing.\n\n#### The following steps should be executed in order to add the Filebeat for the Linux System:\n- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.\n- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/setup-repositories.html).\n- To run Filebeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html).\n- To run Filebeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/running-on-kubernetes.html).\n- For quick start information for Filebeat refer to the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/8.11/filebeat-installation-configuration.html).\n- For complete Setup and Run Filebeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/setting-up-and-running.html).\n\n#### Rule Specific Setup Note\n- This rule requires the Filebeat System Module to be enabled.\n- The system module collects and parses logs created by the system logging service of common Unix/Linux based distributions.\n- To run the system module of Filebeat on Linux follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-system.html).\n\n", - "type": "query", - "index": [ - "logs-system.auth-*" - ], - "query": "host.os.type:linux and event.dataset:\"system.syslog\" and process.name:kernel and \nmessage:\"module verification failed: signature and/or required key missing - tainting kernel\"\n", - "language": "kuery" - }, - { - "name": "Unusual Remote File Size", - "description": "A machine learning job has detected an unusually high file size shared by a remote host indicating potential lateral movement activity. One of the primary goals of attackers after gaining access to a network is to locate and exfiltrate valuable information. Instead of multiple small transfers that can raise alarms, attackers might choose to bundle data into a single large file transfer.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-90m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "75e82511-6992-44c4-8b64-f947611efb5a", - "rule_id": "0678bc9c-b71a-433b-87e6-2f664b6b3131", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_high_file_size_remote_file_transfer" - }, - { - "name": "GitHub Protected Branch Settings Changed", - "description": "This rule detects setting modifications for protected branches of a GitHub repository. Branch protection rules can be used to enforce certain workflows or requirements before a contributor can push changes to a branch in your repository. Changes to these protected branch settings should be investigated and verified as legitimate activity. Unauthorized changes could be used to lower your organization's security posture and leave you exposed for future attacks.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Cloud", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Github" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1562", - "name": "Impair Defenses", - "reference": "https://attack.mitre.org/techniques/T1562/", - "subtechnique": [ - { - "id": "T1562.001", - "name": "Disable or Modify Tools", - "reference": "https://attack.mitre.org/techniques/T1562/001/" - } - ] - } - ] - } - ], - "id": "3612ff77-f216-45a7-81ef-c5207bd7cae8", - "rule_id": "07639887-da3a-4fbf-9532-8ce748ff8c50", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "github", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "github.category", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "configuration where event.dataset == \"github.audit\" \n and github.category == \"protected_branch\" and event.type == \"change\" \n", - "language": "eql", - "index": [ - "logs-github.audit-*" - ] - }, - { - "name": "Processes with Trailing Spaces", - "description": "Identify instances where adversaries include trailing space characters to mimic regular files, disguising their activity to evade default file handling mechanisms.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.006", - "name": "Space after Filename", - "reference": "https://attack.mitre.org/techniques/T1036/006/" - } - ] - } - ] - } - ], - "id": "4e92eed2-1569-4198-b797-84be0e572058", - "rule_id": "0c093569-dff9-42b6-87b1-0242d9f7d9b4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type in (\"start\", \"process_started\") and process.name : \"* \"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Netcat Listener Established via rlwrap", - "description": "Monitors for the execution of a netcat listener via rlwrap. rlwrap is a 'readline wrapper', a small utility that uses the GNU Readline library to allow the editing of keyboard input for any command. This utility can be used in conjunction with netcat to gain a more stable reverse shell.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Netcat is a dual-use tool that can be used for benign or malicious activity. Netcat is included in some Linux distributions so its presence is not necessarily suspicious. Some normal use of this program, while uncommon, may originate from scripts, automation tools, and frameworks." - ], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "0d59aa15-32d7-45a1-8962-516ac3da43c4", - "rule_id": "0f56369f-eb3d-459c-a00b-87c2bf7bdfc5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"rlwrap\" and process.args in (\n \"nc\", \"ncat\", \"netcat\", \"nc.openbsd\", \"socat\"\n) and process.args : \"*l*\" and process.args_count >= 4\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Windows Process Cluster Spawned by a User", - "description": "A machine learning job combination has detected a set of one or more suspicious Windows processes with unusually high scores for malicious probability. These process(es) have been classified as malicious in several ways. The process(es) were predicted to be malicious by the ProblemChild supervised ML model. If the anomaly contains a cluster of suspicious processes, each process has the same user name, and the aggregate score of the event cluster was calculated to be unusually high by an unsupervised ML model. Such a cluster often contains suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Living off the Land Attack Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/problemchild", - "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - } - ], - "id": "9c507a01-33ae-4337-9530-c04e7ec092ab", - "rule_id": "1224da6c-0326-4b4f-8454-68cdc5ae542b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "problemchild", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "problem_child_high_sum_by_user" - }, - { - "name": "Machine Learning Detected a Suspicious Windows Event Predicted to be Malicious Activity", - "description": "A supervised machine learning model (ProblemChild) has identified a suspicious Windows process event with high probability of it being malicious activity. Alternatively, the model's blocklist identified the event as being malicious.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "OS: Windows", - "Data Source: Elastic Endgame", - "Use Case: Living off the Land Attack Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-10m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/problemchild", - "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.004", - "name": "Masquerade Task or Service", - "reference": "https://attack.mitre.org/techniques/T1036/004/" - } - ] - } - ] - } - ], - "id": "f3df8e9c-6909-48bc-a5c7-9a50ca2536ff", - "rule_id": "13e908b9-7bf0-4235-abc9-b5deb500d0ad", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "problemchild", - "version": "^2.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "blocklist_label", - "type": "unknown", - "ecs": false - }, - { - "name": "problemchild.prediction", - "type": "unknown", - "ecs": false - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "eql", - "query": "process where (problemchild.prediction == 1 or blocklist_label == 1) and not process.args : (\"*C:\\\\WINDOWS\\\\temp\\\\nessus_*.txt*\", \"*C:\\\\WINDOWS\\\\temp\\\\nessus_*.tmp*\")\n", - "language": "eql", - "index": [ - "endgame-*", - "logs-endpoint.events.process-*", - "winlogbeat-*" - ] - }, - { - "name": "Execution from a Removable Media with Network Connection", - "description": "Identifies process execution from a removable media and by an unusual process. Adversaries may move onto systems, possibly those on disconnected or air-gapped networks, by copying malware to removable media and taking advantage of Autorun features when the media is inserted into a system and executes.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1091", - "name": "Replication Through Removable Media", - "reference": "https://attack.mitre.org/techniques/T1091/" - } - ] - } - ], - "id": "9f330d67-fc42-46cc-9797-78f6e2b3837f", - "rule_id": "1542fa53-955e-4330-8e4d-b2d812adeb5f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.device.bus_type", - "type": "unknown", - "ecs": false - }, - { - "name": "process.Ext.device.product_id", - "type": "unknown", - "ecs": false - }, - { - "name": "process.code_signature.exists", - "type": "boolean", - "ecs": true - }, - { - "name": "process.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.entity_id with maxspan=5m\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n \n /* Direct Exec from USB */\n (process.Ext.device.bus_type : \"usb\" or process.Ext.device.product_id : \"USB *\") and\n (process.code_signature.trusted == false or process.code_signature.exists == false) and \n \n not process.code_signature.status : (\"errorExpired\", \"errorCode_endpoint*\")]\n [network where host.os.type == \"windows\" and event.action == \"connection_attempted\"]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Spike in Number of Connections Made to a Destination IP", - "description": "A machine learning job has detected a high count of source IPs establishing an RDP connection with a single destination IP. Attackers might use multiple compromised systems to attack a target to ensure redundancy in case a source IP gets detected and blocked.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-12h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "897e5842-a352-40d5-876f-0bfb4a5e2f2c", - "rule_id": "18a5dd9a-e3fa-4996-99b1-ae533b8f27fc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_high_rdp_distinct_count_source_ip_for_destination" - }, - { - "name": "Spike in Number of Processes in an RDP Session", - "description": "A machine learning job has detected unusually high number of processes started in a single RDP session. Executing a large number of processes remotely on other machines can be an indicator of lateral movement activity.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-12h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "a36c7a05-958c-4f74-9450-754294abafff", - "rule_id": "19e9daf3-f5c5-4bc2-a9af-6b1e97098f03", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_high_sum_rdp_number_of_processes" - }, - { - "name": "Potential Process Injection from Malicious Document", - "description": "Identifies child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, Excel) with unusual process arguments and path. This behavior is often observed during exploitation of Office applications or from documents with malicious macros.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Privilege Escalation", - "Tactic: Initial Access", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1055", - "name": "Process Injection", - "reference": "https://attack.mitre.org/techniques/T1055/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - } - ] - } - ] - } - ], - "id": "cbde5758-35b7-4dcc-ac01-468656a15f3a", - "rule_id": "1c5a04ae-d034-41bf-b0d8-96439b5cc774", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.action == \"start\" and\n process.parent.name : (\"excel.exe\", \"powerpnt.exe\", \"winword.exe\") and\n process.args_count == 1 and\n process.executable : (\n \"?:\\\\Windows\\\\SysWOW64\\\\*.exe\", \"?:\\\\Windows\\\\system32\\\\*.exe\"\n ) and\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\*\" and\n process.code_signature.trusted == true and not process.code_signature.subject_name : \"Microsoft *\") and\n not process.executable : (\n \"?:\\\\Windows\\\\Sys*\\\\Taskmgr.exe\",\n \"?:\\\\Windows\\\\Sys*\\\\ctfmon.exe\",\n \"?:\\\\Windows\\\\System32\\\\notepad.exe\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "New GitHub App Installed", - "description": "This rule detects when a new GitHub App has been installed in your organization account. GitHub Apps extend GitHub's functionality both within and outside of GitHub. When an app is installed it is granted permissions to read or modify your repository and organization data. Only trusted apps should be installed and any newly installed apps should be investigated to verify their legitimacy. Unauthorized app installation could lower your organization's security posture and leave you exposed for future attacks.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Cloud", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Github" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1072", - "name": "Software Deployment Tools", - "reference": "https://attack.mitre.org/techniques/T1072/" - } - ] - } - ], - "id": "57f777dd-35d7-4b7c-bff3-78f6fa2907ea", - "rule_id": "1ca62f14-4787-4913-b7af-df11745a49da", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "github", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "configuration where event.dataset == \"github.audit\" and event.action == \"integration_installation.create\"\n", - "language": "eql", - "index": [ - "logs-github.audit-*" - ] - }, - { - "name": "Potential Linux Hack Tool Launched", - "description": "Monitors for the execution of different processes that might be used by attackers for malicious intent. An alert from this rule should be investigated further, as hack tools are commonly used by blue teamers and system administrators as well.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [] - } - ], - "id": "15eb6f2d-dc0d-45d9-9a16-01bcef88bd7a", - "rule_id": "1df1152b-610a-4f48-9d7a-504f6ee5d9da", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and event.type == \"start\" and\nprocess.name in (\n // exploitation frameworks\n \"crackmapexec\", \"msfconsole\", \"msfvenom\", \"sliver-client\", \"sliver-server\", \"havoc\",\n // network scanners (nmap left out to reduce noise)\n \"zenmap\", \"nuclei\", \"netdiscover\", \"legion\",\n // web enumeration\n \"gobuster\", \"dirbuster\", \"dirb\", \"wfuzz\", \"ffuf\", \"whatweb\", \"eyewitness\",\n // web vulnerability scanning\n \"wpscan\", \"joomscan\", \"droopescan\", \"nikto\", \n // exploitation tools\n \"sqlmap\", \"commix\", \"yersinia\",\n // cracking and brute forcing\n \"john\", \"hashcat\", \"hydra\", \"ncrack\", \"cewl\", \"fcrackzip\", \"rainbowcrack\",\n // host and network\n \"linenum.sh\", \"linpeas.sh\", \"pspy32\", \"pspy32s\", \"pspy64\", \"pspy64s\", \"binwalk\", \"evil-winrm\"\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Creation of SettingContent-ms Files", - "description": "Identifies the suspicious creation of SettingContents-ms files, which have been used in attacks to achieve code execution while evading defenses.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://posts.specterops.io/the-tale-of-settingcontent-ms-files-f1ea253e4d39" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1204", - "name": "User Execution", - "reference": "https://attack.mitre.org/techniques/T1204/", - "subtechnique": [ - { - "id": "T1204.002", - "name": "Malicious File", - "reference": "https://attack.mitre.org/techniques/T1204/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - } - ] - } - ] - } - ], - "id": "4c77a952-05da-45d6-b0c6-39f5119726a3", - "rule_id": "1e6363a6-3af5-41d4-b7ea-d475389c0ceb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n file.extension : \"settingcontent-ms\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual Process Execution on WBEM Path", - "description": "Identifies unusual processes running from the WBEM path, uncommon outside WMI-related Windows processes.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - } - ], - "id": "314e6406-67b1-47a6-a2eb-bb8ae85ddedc", - "rule_id": "1f460f12-a3cf-4105-9ebb-f788cc63f365", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.executable : (\"?:\\\\Windows\\\\System32\\\\wbem\\\\*\", \"?:\\\\Windows\\\\SysWow64\\\\wbem\\\\*\") and\n not process.name : (\n \"mofcomp.exe\",\n \"scrcons.exe\",\n \"unsecapp.exe\",\n \"wbemtest.exe\",\n \"winmgmt.exe\",\n \"wmiadap.exe\",\n \"wmiapsrv.exe\",\n \"wmic.exe\",\n \"wmiprvse.exe\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Werfault ReflectDebugger Persistence", - "description": "Identifies the registration of a Werfault Debugger. Attackers may abuse this mechanism to execute malicious payloads every time the utility is executed with the \"-pr\" parameter.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "366ba690-9918-48d0-bf9b-d1fbde7dad24", - "rule_id": "205b52c4-9c28-4af4-8979-935f3278d61a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\Software\\\\Microsoft\\\\Windows\\\\Windows Error Reporting\\\\Hangs\\\\ReflectDebugger\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\Windows\\\\Windows Error Reporting\\\\Hangs\\\\ReflectDebugger\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Mofcomp Activity", - "description": "Managed Object Format (MOF) files can be compiled locally or remotely through mofcomp.exe. Attackers may leverage MOF files to build their own namespaces and classes into the Windows Management Instrumentation (WMI) repository, or establish persistence using WMI Event Subscription.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.003", - "name": "Windows Management Instrumentation Event Subscription", - "reference": "https://attack.mitre.org/techniques/T1546/003/" - } - ] - } - ] - } - ], - "id": "d4e6670b-25c6-4e9b-8b8f-ebbe172d247c", - "rule_id": "210d4430-b371-470e-b879-80b7182aa75e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"mofcomp.exe\" and process.args : \"*.mof\" and\n not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Remote File Creation on a Sensitive Directory", - "description": "Discovery of files created by a remote host on sensitive directories and folders. Remote file creation in these directories could indicate a malicious binary or script trying to compromise the system.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "Use Case: Lateral Movement Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-10m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/es/blog/remote-desktop-protocol-connections-elastic-security" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "6c2c9fb2-5db1-4cc2-916c-64823e6c2a88", - "rule_id": "2377946d-0f01-4957-8812-6878985f515d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where (event.action == \"creation\" or event.action == \"modification\") and\nprocess.name:(\"System\", \"scp\", \"sshd\", \"smbd\", \"vsftpd\", \"sftp-server\") and not\nuser.name:(\"SYSTEM\", \"root\") and\n(file.path : (\"C*\\\\Users\\\\*\\\\AppData\\\\Roaming*\", \"C*\\\\Program*Files\\\\*\",\n \"C*\\\\Windows\\\\*\", \"C*\\\\Windows\\\\System\\\\*\",\n \"C*\\\\Windows\\\\System32\\\\*\", \"/etc/*\", \"/tmp*\",\n \"/var/tmp*\", \"/home/*/.*\", \"/home/.*\", \"/usr/bin/*\",\n \"/sbin/*\", \"/bin/*\", \"/usr/lib/*\", \"/usr/sbin/*\",\n \"/usr/share/*\", \"/usr/local/*\", \"/var/lib/dpkg/*\",\n \"/lib/systemd/*\"\n )\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "New GitHub Owner Added", - "description": "Detects when a new member is added to a GitHub organization as an owner. This role provides admin level privileges. Any new owner roles should be investigated to determine it's validity. Unauthorized owner roles could indicate compromise within your organization and provide unlimited access to data and settings.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Cloud", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Github" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1136", - "name": "Create Account", - "reference": "https://attack.mitre.org/techniques/T1136/", - "subtechnique": [ - { - "id": "T1136.003", - "name": "Cloud Account", - "reference": "https://attack.mitre.org/techniques/T1136/003/" - } - ] - } - ] - } - ], - "id": "d89596d9-2948-46a4-8c82-dd25629fe25f", - "rule_id": "24401eca-ad0b-4ff9-9431-487a8e183af9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "github", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "github.permission", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "iam where event.dataset == \"github.audit\" and event.action == \"org.add_member\" and github.permission == \"admin\"\n", - "language": "eql", - "index": [ - "logs-github.audit-*" - ] - }, - { - "name": "Unusual Discovery Signal Alert with Unusual Process Command Line", - "description": "This rule leverages alert data from various Discovery building block rules to alert on signals with unusual unique host.id, user.id and process.command_line entries.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: Higher-Order Rule" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [] - } - ], - "id": "7ae0ee59-1544-4e3e-bd1d-41dd11218c03", - "rule_id": "29ef5686-9b93-433e-91b5-683911094698", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "kibana.alert.rule.rule_id", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type:windows and event.kind:signal and kibana.alert.rule.rule_id:(\n \"d68e95ad-1c82-4074-a12a-125fe10ac8ba\" or \"7b8bfc26-81d2-435e-965c-d722ee397ef1\" or\n \"0635c542-1b96-4335-9b47-126582d2c19a\" or \"6ea55c81-e2ba-42f2-a134-bccf857ba922\" or\n \"e0881d20-54ac-457f-8733-fe0bc5d44c55\" or \"06568a02-af29-4f20-929c-f3af281e41aa\" or\n \"c4e9ed3e-55a2-4309-a012-bc3c78dad10a\" or \"51176ed2-2d90-49f2-9f3d-17196428b169\"\n)\n", - "new_terms_fields": [ - "host.id", - "user.id", - "process.command_line" - ], - "history_window_start": "now-14d", - "index": [ - ".alerts-security.*" - ], - "language": "kuery" - }, - { - "name": "Potential Linux SSH X11 Forwarding", - "description": "This rule monitors for X11 forwarding via SSH. X11 forwarding is a feature that allows users to run graphical applications on a remote server and display the application's graphical user interface on their local machine. Attackers can abuse X11 forwarding for tunneling their GUI-based tools, pivot through compromised systems, and create covert communication channels, enabling lateral movement and facilitating remote control of systems within a network.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://book.hacktricks.xyz/generic-methodologies-and-resources/tunneling-and-port-forwarding" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - } - ], - "id": "a9cb84ee-cc6d-4662-8d3d-d4e9b04b9334", - "rule_id": "29f0cf93-d17c-4b12-b4f3-a433800539fa", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and\nprocess.name in (\"ssh\", \"sshd\") and process.args in (\"-X\", \"-Y\") and process.args_count >= 3 and \nprocess.parent.name in (\"bash\", \"dash\", \"ash\", \"sh\", \"tcsh\", \"csh\", \"zsh\", \"ksh\", \"fish\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential SSH-IT SSH Worm Downloaded", - "description": "Identifies processes that are capable of downloading files with command line arguments containing URLs to SSH-IT's autonomous SSH worm. This worm intercepts outgoing SSH connections every time a user uses ssh.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend", - "Data Source: Elastic Endgame" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.thc.org/ssh-it/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.004", - "name": "SSH", - "reference": "https://attack.mitre.org/techniques/T1021/004/" - } - ] - }, - { - "id": "T1563", - "name": "Remote Service Session Hijacking", - "reference": "https://attack.mitre.org/techniques/T1563/", - "subtechnique": [ - { - "id": "T1563.001", - "name": "SSH Hijacking", - "reference": "https://attack.mitre.org/techniques/T1563/001/" - } - ] - } - ] - } - ], - "id": "3050cf6f-1822-46fd-a9c3-e0fab2bcfbb3", - "rule_id": "2ddc468e-b39b-4f5b-9825-f3dcb0e998ea", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name in (\"curl\", \"wget\") and process.args : (\n \"https://thc.org/ssh-it/x\", \"http://nossl.segfault.net/ssh-it-deploy.sh\", \"https://gsocket.io/x\",\n \"https://thc.org/ssh-it/bs\", \"http://nossl.segfault.net/bs\"\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Accessing Outlook Data Files", - "description": "Identifies commands containing references to Outlook data files extensions, which can potentially indicate the search, access, or modification of these files.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1114", - "name": "Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/", - "subtechnique": [ - { - "id": "T1114.001", - "name": "Local Email Collection", - "reference": "https://attack.mitre.org/techniques/T1114/001/" - } - ] - } - ] - } - ], - "id": "f51d7477-2977-4349-a739-7a489e916534", - "rule_id": "2e311539-cd88-4a85-a301-04f38795007c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.args : (\"*.ost\", \"*.pst\") and\n not process.name : \"outlook.exe\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Malicious Remote File Creation", - "description": "Malicious remote file creation, which can be an indicator of lateral movement activity.", - "risk_score": 99, - "severity": "critical", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "Use Case: Lateral Movement Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-10m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/es/blog/remote-desktop-protocol-connections-elastic-security" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "db724362-4a8b-4b2e-ae31-6cd06278437d", - "rule_id": "301571f3-b316-4969-8dd0-7917410030d3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.name\n[file where event.action == \"creation\" and process.name : (\"System\", \"scp\", \"sshd\", \"smbd\", \"vsftpd\", \"sftp-server\")]\n[file where event.category == \"malware\" or event.category == \"intrusion_detection\"\nand process.name:(\"System\", \"scp\", \"sshd\", \"smbd\", \"vsftpd\", \"sftp-server\")]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Modification of Dynamic Linker Preload Shared Object Inside A Container", - "description": "This rule detects the creation or modification of the dynamic linker preload shared object (ld.so.preload) inside a container. The Linux dynamic linker is used to load libraries needed by a program at runtime. Adversaries may hijack the dynamic linker by modifying the /etc/ld.so.preload file to point to malicious libraries. This behavior can be used to grant unauthorized access to system resources and has been used to evade detection of malicious processes in container environments.", - "risk_score": 73, - "severity": "high", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://unit42.paloaltonetworks.com/hildegard-malware-teamtnt/", - "https://www.anomali.com/blog/rocke-evolves-its-arsenal-with-a-new-malware-family-written-in-golang/", - "https://sysdig.com/blog/threat-detection-aws-cloud-containers/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1574", - "name": "Hijack Execution Flow", - "reference": "https://attack.mitre.org/techniques/T1574/", - "subtechnique": [ - { - "id": "T1574.006", - "name": "Dynamic Linker Hijacking", - "reference": "https://attack.mitre.org/techniques/T1574/006/" - } - ] - } - ] - } - ], - "id": "1623d66c-f553-4673-855a-5c9851b79ffe", - "rule_id": "342f834b-21a6-41bf-878c-87d116eba3ee", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "event.module", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where event.module== \"cloud_defend\" and event.type != \"deletion\" and file.path== \"/etc/ld.so.preload\"\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "GitHub Repository Deleted", - "description": "This rule detects when a GitHub repository is deleted within your organization. Repositories are a critical component used within an organization to manage work, collaborate with others and release products to the public. Any delete action against a repository should be investigated to determine it's validity. Unauthorized deletion of organization repositories could cause irreversible loss of intellectual property and indicate compromise within your organization.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Cloud", - "Use Case: Threat Detection", - "Tactic: Impact", - "Data Source: Github" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1485", - "name": "Data Destruction", - "reference": "https://attack.mitre.org/techniques/T1485/" - } - ] - } - ], - "id": "41d19ceb-785e-457e-ab17-fb9ae35ca062", - "rule_id": "345889c4-23a8-4bc0-b7ca-756bd17ce83b", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.module", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "configuration where event.module == \"github\" and event.action == \"repo.destroy\"\n", - "language": "eql", - "index": [ - "logs-github.audit-*" - ] - }, - { - "name": "Spike in Bytes Sent to an External Device", - "description": "A machine learning job has detected high bytes of data written to an external device. In a typical operational setting, there is usually a predictable pattern or a certain range of data that is written to external devices. An unusually large amount of data being written is anomalous and can signal illicit data copying or transfer activities.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Data Exfiltration Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-2h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/ded" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1052", - "name": "Exfiltration Over Physical Medium", - "reference": "https://attack.mitre.org/techniques/T1052/" - } - ] - } - ], - "id": "d7b5017e-d324-4f96-acf9-f52f9794bf86", - "rule_id": "35a3b253-eea8-46f0-abd3-68bdd47e6e3d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "ded", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "ded_high_bytes_written_to_external_device" - }, - { - "name": "High Mean of Process Arguments in an RDP Session", - "description": "A machine learning job has detected unusually high number of process arguments in an RDP session. Executing sophisticated attacks such as lateral movement can involve the use of complex commands, obfuscation mechanisms, redirection and piping, which in turn increases the number of arguments in a command.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-12h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "82a81395-45cd-4e4b-8eda-22709eda0f97", - "rule_id": "36c48a0c-c63a-4cbc-aee1-8cac87db31a9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_high_mean_rdp_process_args" - }, - { - "name": "Downloaded Shortcut Files", - "description": "Identifies .lnk shortcut file downloaded from outside the local network. These shortcut files are commonly used in phishing campaigns.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1204", - "name": "User Execution", - "reference": "https://attack.mitre.org/techniques/T1204/", - "subtechnique": [ - { - "id": "T1204.002", - "name": "Malicious File", - "reference": "https://attack.mitre.org/techniques/T1204/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - }, - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - } - ], - "id": "7907aa12-7a21-42b8-8f9b-100e6769d128", - "rule_id": "39157d52-4035-44a8-9d1a-6f8c5f580a07", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.windows.zone_identifier", - "type": "unknown", - "ecs": false - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and file.extension == \"lnk\" and file.Ext.windows.zone_identifier > 1\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Spike in Number of Connections Made from a Source IP", - "description": "A machine learning job has detected a high count of destination IPs establishing an RDP connection with a single source IP. Once an attacker has gained access to one system, they might attempt to access more in the network in search of valuable assets, data, or further access points.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-12h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "6f6a79b4-70c2-444e-a859-54fadaa2c339", - "rule_id": "3e0561b5-3fac-4461-84cc-19163b9aaa61", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_high_rdp_distinct_count_destination_ip_for_source" - }, - { - "name": "Potential Remote File Execution via MSIEXEC", - "description": "Identifies the execution of the built-in Windows Installer, msiexec.exe, to install a remote package. Adversaries may abuse msiexec.exe to launch local or network accessible MSI files.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.007", - "name": "Msiexec", - "reference": "https://attack.mitre.org/techniques/T1218/007/" - } - ] - } - ] - } - ], - "id": "03a4816a-f24a-46cf-b7d3-f937a80fd11d", - "rule_id": "3e441bdb-596c-44fd-8628-2cfdf4516ada", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.Ext.token.integrity_level_name", - "type": "unknown", - "ecs": false - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.subject_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=1m\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.name : \"msiexec.exe\" and process.args : \"/V\"] by process.entity_id\n [network where host.os.type == \"windows\" and process.name : \"msiexec.exe\" and\n event.action == \"connection_attempted\"] by process.entity_id\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.parent.name : \"msiexec.exe\" and user.id : (\"S-1-5-21-*\", \"S-1-5-12-1-*\") and\n not process.executable : (\"?:\\\\Windows\\\\SysWOW64\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\msiexec.exe\",\n \"?:\\\\Windows\\\\System32\\\\srtasks.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\srtasks.exe\",\n \"?:\\\\Windows\\\\System32\\\\taskkill.exe\",\n \"?:\\\\Windows\\\\Installer\\\\MSI*.tmp\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\ie4uinit.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\ie4uinit.exe\",\n \"?:\\\\Windows\\\\System32\\\\sc.exe\",\n \"?:\\\\Windows\\\\system32\\\\Wbem\\\\mofcomp.exe\",\n \"?:\\\\Windows\\\\twain_32\\\\fjscan32\\\\SOP\\\\crtdmprc.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\taskkill.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\schtasks.exe\",\n \"?:\\\\Windows\\\\system32\\\\schtasks.exe\",\n \"?:\\\\Windows\\\\System32\\\\sdbinst.exe\") and\n not (process.code_signature.subject_name == \"Citrix Systems, Inc.\" and process.code_signature.trusted == true) and\n not (process.name : (\"regsvr32.exe\", \"powershell.exe\", \"rundll32.exe\", \"wscript.exe\") and\n process.Ext.token.integrity_level_name == \"high\" and\n process.args : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\")) and\n not (process.executable : (\"?:\\\\Program Files\\\\*.exe\", \"?:\\\\Program Files (x86)\\\\*.exe\") and process.code_signature.trusted == true) and\n not (process.name : \"rundll32.exe\" and process.args : \"printui.dll,PrintUIEntry\")\n ] by process.parent.entity_id\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual Time or Day for an RDP Session", - "description": "A machine learning job has detected an RDP session started at an usual time or weekday. An RDP session at an unusual time could be followed by other suspicious activities, so catching this is a good first step in detecting a larger attack.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-12h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "7abe07e5-9e9d-49a1-87af-ad1aaa762d97", - "rule_id": "3f4e2dba-828a-452a-af35-fe29c5e78969", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_unusual_time_weekday_rdp_session_start" - }, - { - "name": "Unusual Process Spawned by a User", - "description": "A machine learning job has detected a suspicious Windows process. This process has been classified as malicious in two ways. It was predicted to be malicious by the ProblemChild supervised ML model, and it was found to be suspicious given that its user context is unusual and does not commonly manifest malicious activity,by an unsupervised ML model. Such a process may be an instance of suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Living off the Land Attack Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/problemchild", - "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - } - ], - "id": "53f1fe64-3f33-4235-8729-db4495058ca4", - "rule_id": "40155ee4-1e6a-4e4d-a63b-e8ba16980cfb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "problemchild", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "problem_child_rare_process_by_user" - }, - { - "name": "Unix Socket Connection", - "description": "This rule monitors for inter-process communication via Unix sockets. Adversaries may attempt to communicate with local Unix sockets to enumerate application details, find vulnerabilities/configuration mistakes and potentially escalate privileges or set up malicious communication channels via Unix sockets for inter-process communication to attempt to evade detection.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1559", - "name": "Inter-Process Communication", - "reference": "https://attack.mitre.org/techniques/T1559/" - } - ] - } - ], - "id": "148096a0-4959-4762-be60-e414e79c7a80", - "rule_id": "41284ba3-ed1a-4598-bfba-a97f75d9aba2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and (\n (process.name in (\"nc\", \"ncat\", \"netcat\", \"nc.openbsd\") and \n process.args == \"-U\" and process.args : (\"/usr/local/*\", \"/run/*\", \"/var/run/*\")) or\n (process.name == \"socat\" and \n process.args == \"-\" and process.args : (\"UNIX-CLIENT:/usr/local/*\", \"UNIX-CLIENT:/run/*\", \"UNIX-CLIENT:/var/run/*\"))\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Microsoft 365 Mail Access by ClientAppId", - "description": "Identifies when a Microsoft 365 Mailbox is accessed by a ClientAppId that was observed for the fist time during the last 10 days.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Domain: Cloud", - "Data Source: Microsoft 365", - "Use Case: Configuration Audit", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-30m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "User using a new mail client." - ], - "references": [ - "https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-193a" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1078", - "name": "Valid Accounts", - "reference": "https://attack.mitre.org/techniques/T1078/" - } - ] - } - ], - "id": "c00f6575-c2c6-44d3-addf-cae5acbc84f2", - "rule_id": "48819484-9826-4083-9eba-1da74cd0eaf2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "o365", - "version": "^1.3.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "event.outcome", - "type": "keyword", - "ecs": true - }, - { - "name": "event.provider", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.", - "type": "new_terms", - "query": "event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:MailItemsAccessed and event.outcome:success\n", - "new_terms_fields": [ - "o365.audit.ClientAppId", - "user.id" - ], - "history_window_start": "now-10d", - "index": [ - "filebeat-*", - "logs-o365*" - ], - "language": "kuery" - }, - { - "name": "Remote XSL Script Execution via COM", - "description": "Identifies the execution of a hosted XSL script using the Microsoft.XMLDOM COM interface via Microsoft Office processes. This behavior may indicate adversarial activity to execute malicious JScript or VBScript on the system.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Initial Access", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1220", - "name": "XSL Script Processing", - "reference": "https://attack.mitre.org/techniques/T1220/" - } - ] - } - ], - "id": "0bfd73bc-d6a6-4851-9af1-2da06da8aeec", - "rule_id": "48f657ee-de4f-477c-aa99-ed88ee7af97a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=1m\n [library where host.os.type == \"windows\" and dll.name : \"msxml3.dll\" and\n process.name : (\"winword.exe\", \"excel.exe\", \"powerpnt.exe\", \"mspub.exe\")] by process.entity_id\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.parent.name : (\"winword.exe\", \"excel.exe\", \"powerpnt.exe\", \"mspub.exe\") and \n not process.executable :\n (\"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWoW64\\\\WerFault.exe\",\n \"?:\\\\windows\\\\splwow64.exe\",\n \"?:\\\\Windows\\\\System32\\\\conhost.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*exe\")] by process.parent.entity_id\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Cross Site Scripting (XSS)", - "description": "Cross-Site Scripting (XSS) is a type of attack in which malicious scripts are injected into trusted websites. In XSS attacks, an attacker uses a benign web application to send malicious code, generally in the form of a browser-side script. This detection rule identifies the potential malicious executions of such browser-side scripts.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Data Source: APM", - "Use Case: Threat Detection", - "Tactic: Initial Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/payloadbox/xss-payload-list" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1189", - "name": "Drive-by Compromise", - "reference": "https://attack.mitre.org/techniques/T1189/" - } - ] - } - ], - "id": "61e61892-a796-4d66-8af2-674210ed63ad", - "rule_id": "4aa58ac6-4dc0-4d18-b713-f58bf8bd015c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "apm", - "version": "^8.0.0" - } - ], - "required_fields": [ - { - "name": "processor.name", - "type": "unknown", - "ecs": false - }, - { - "name": "url.fragment", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "any where processor.name == \"transaction\" and\nurl.fragment : (\"\", \"\", \"*onerror=*\", \"*javascript*alert*\", \"*eval*(*)*\", \"*onclick=*\",\n\"*alert(document.cookie)*\", \"*alert(document.domain)*\",\"*onresize=*\",\"*onload=*\",\"*onmouseover=*\")\n", - "language": "eql", - "index": [ - "apm-*-transaction*", - "traces-apm*" - ] - }, - { - "name": "ProxyChains Activity", - "description": "This rule monitors for the execution of the ProxyChains utility. ProxyChains is a command-line tool that enables the routing of network connections through intermediary proxies, enhancing anonymity and enabling access to restricted resources. Attackers can exploit the ProxyChains utility to hide their true source IP address, evade detection, and perform malicious activities through a chain of proxy servers, potentially masking their identity and intentions.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1572", - "name": "Protocol Tunneling", - "reference": "https://attack.mitre.org/techniques/T1572/" - } - ] - } - ], - "id": "ada39d3f-937a-495a-919a-95794d04c12d", - "rule_id": "4b868f1f-15ff-4ba3-8c11-d5a7a6356d37", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and process.name == \"proxychains\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual Process Writing Data to an External Device", - "description": "A machine learning job has detected a rare process writing data to an external device. Malicious actors often use benign-looking processes to mask their data exfiltration activities. The discovery of such a process that has no legitimate reason to write data to external devices can indicate exfiltration.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Data Exfiltration Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-2h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/ded" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1052", - "name": "Exfiltration Over Physical Medium", - "reference": "https://attack.mitre.org/techniques/T1052/" - } - ] - } - ], - "id": "9fa045a3-7c26-45d9-be0f-4b5cec44a418", - "rule_id": "4b95ecea-7225-4690-9938-2a2c0bad9c99", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "ded", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "ded_rare_process_writing_to_external_device" - }, - { - "name": "Hidden Files and Directories via Hidden Flag", - "description": "Identify activity related where adversaries can add the 'hidden' flag to files to hide them from the user in an attempt to evade detection.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1564", - "name": "Hide Artifacts", - "reference": "https://attack.mitre.org/techniques/T1564/", - "subtechnique": [ - { - "id": "T1564.001", - "name": "Hidden Files and Directories", - "reference": "https://attack.mitre.org/techniques/T1564/001/" - } - ] - } - ] - } - ], - "id": "0cb34fa1-f928-4903-a4c9-8ec4540a924a", - "rule_id": "5124e65f-df97-4471-8dcb-8e3953b3ea97", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where event.type : \"creation\" and process.name : \"chflags\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Execution via Microsoft DotNet ClickOnce Host", - "description": "Identifies the execution of DotNet ClickOnce installer via Dfsvc.exe trampoline. Adversaries may take advantage of ClickOnce to proxy execution of malicious payloads via trusted Microsoft processes.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/" - }, - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.011", - "name": "Rundll32", - "reference": "https://attack.mitre.org/techniques/T1218/011/" - } - ] - } - ] - } - ], - "id": "154dc351-e06c-442c-8720-7c399999a138", - "rule_id": "5297b7f1-bccd-4611-93fa-ea342a01ff84", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by user.id with maxspan=5s\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.name : \"rundll32.exe\" and process.command_line : (\"*dfshim*ShOpenVerbApplication*\", \"*dfshim*#*\")]\n [network where host.os.type == \"windows\" and process.name : \"dfsvc.exe\"]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Windows Installer with Suspicious Properties", - "description": "Identifies the execution of an installer from an archive or with suspicious properties. Adversaries may abuse msiexec.exe to launch local or network accessible MSI files in an attempt to bypass application whitelisting.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://lolbas-project.github.io/lolbas/Binaries/Msiexec/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.007", - "name": "Msiexec", - "reference": "https://attack.mitre.org/techniques/T1218/007/" - } - ] - } - ] - } - ], - "id": "c176a7cf-cfc7-493b-916a-a9f32401d6bd", - "rule_id": "55f07d1b-25bc-4a0f-aa0c-05323c1319d0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.value", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=1m\n [registry where host.os.type == \"windows\" and process.name : \"msiexec.exe\" and\n (\n (registry.value : \"InstallSource\" and\n registry.data.strings : (\"?:\\\\Users\\\\*\\\\Temp\\\\Temp?_*.zip\\\\*\",\n \"?:\\\\Users\\\\*\\\\*.7z\\\\*\",\n \"?:\\\\Users\\\\*\\\\*.rar\\\\*\")) or\n\n (registry.value : (\"DisplayName\", \"ProductName\") and registry.data.strings : \"SetupTest\")\n )]\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.parent.name : \"msiexec.exe\" and\n not process.name : \"msiexec.exe\" and\n not (process.executable : (\"?:\\\\Program Files (x86)\\\\*.exe\", \"?:\\\\Program Files\\\\*.exe\") and process.code_signature.trusted == true)]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual Process Spawned by a Host", - "description": "A machine learning job has detected a suspicious Windows process. This process has been classified as suspicious in two ways. It was predicted to be suspicious by the ProblemChild supervised ML model, and it was found to be an unusual process, on a host that does not commonly manifest malicious activity. Such a process may be an instance of suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Living off the Land Attack Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/problemchild", - "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "c4353ad1-b61e-4b91-b850-18b7efa02584", - "rule_id": "56004189-4e69-4a39-b4a9-195329d226e9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "problemchild", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "problem_child_rare_process_by_host" - }, - { - "name": "Linux Secret Dumping via GDB", - "description": "This rule monitors for potential memory dumping through gdb. Attackers may leverage memory dumping techniques to attempt secret extraction from privileged processes. Tools that display this behavior include \"truffleproc\" and \"bash-memory-dump\". This behavior should not happen by default, and should be investigated thoroughly.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/controlplaneio/truffleproc", - "https://github.com/hajzer/bash-memory-dump" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.007", - "name": "Proc Filesystem", - "reference": "https://attack.mitre.org/techniques/T1003/007/" - } - ] - } - ] - } - ], - "id": "7ff77712-2838-4dc6-aef1-9e373a1cf156", - "rule_id": "66c058f3-99f4-4d18-952b-43348f2577a0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"gdb\" and process.args in (\"--pid\", \"-p\") and \n/* Covered by d4ff2f53-c802-4d2e-9fb9-9ecc08356c3f */\nprocess.args != \"1\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Execution via MSIEXEC", - "description": "Identifies suspicious execution of the built-in Windows Installer, msiexec.exe, to install a package from usual paths or parent process. Adversaries may abuse msiexec.exe to launch malicious local MSI files.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://lolbas-project.github.io/lolbas/Binaries/Msiexec/", - "https://www.guardicore.com/labs/purple-fox-rootkit-now-propagates-as-a-worm/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.007", - "name": "Msiexec", - "reference": "https://attack.mitre.org/techniques/T1218/007/" - } - ] - } - ] - } - ], - "id": "1ccc8ebd-f38b-4c66-9147-afece7d8b082", - "rule_id": "708c9d92-22a3-4fe0-b6b9-1f861c55502d", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.parent.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.parent.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.working_directory", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.action == \"start\" and\n process.name : \"msiexec.exe\" and user.id : (\"S-1-5-21*\", \"S-1-12-*\") and process.parent.executable != null and\n (\n (process.args : \"/i\" and process.args : (\"/q\", \"/quiet\") and process.args_count == 4 and\n process.args : (\"?:\\\\Users\\\\*\", \"?:\\\\ProgramData\\\\*\") and\n not process.parent.executable : (\"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Windows\\\\explorer.exe\",\n \"?:\\\\Users\\\\*\\\\Desktop\\\\*\",\n \"?:\\\\Users\\\\*\\\\Downloads\\\\*\",\n \"?:\\\\programdata\\\\*\")) or\n\n (process.args_count == 1 and not process.parent.executable : (\"?:\\\\Windows\\\\explorer.exe\", \"?:\\\\Windows\\\\SysWOW64\\\\explorer.exe\")) or\n\n (process.args : \"/i\" and process.args : (\"/q\", \"/quiet\") and process.args_count == 4 and\n (process.parent.args : \"Schedule\" or process.parent.name : \"wmiprvse.exe\" or\n process.parent.executable : \"?:\\\\Users\\\\*\\\\AppData\\\\*\" or\n (process.parent.name : (\"powershell.exe\", \"cmd.exe\") and length(process.parent.command_line) >= 200))) or\n\n (process.args : \"/i\" and process.args : (\"/q\", \"/quiet\") and process.args_count == 4 and\n process.working_directory : \"?:\\\\\" and process.parent.name : (\"cmd.exe\", \"powershell.exe\"))\n ) and\n\n /* noisy pattern */\n not (process.parent.executable : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\*\" and process.parent.args_count >= 2 and\n process.args : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\*\\\\*.msi\") and\n\n not process.args : (\"?:\\\\Program Files (x86)\\\\*\", \"?:\\\\Program Files\\\\*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual Discovery Signal Alert with Unusual Process Executable", - "description": "This rule leverages alert data from various Discovery building block rules to alert on signals with unusual unique host.id, user.id and process.executable entries.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: Higher-Order Rule" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [] - } - ], - "id": "c5afa337-009c-439c-ade3-ea3caaf498a8", - "rule_id": "72ed9140-fe9d-4a34-a026-75b50e484b17", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "kibana.alert.rule.rule_id", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type:windows and event.kind:signal and kibana.alert.rule.rule_id:\"1d72d014-e2ab-4707-b056-9b96abe7b511\"\n", - "new_terms_fields": [ - "host.id", - "user.id", - "process.executable" - ], - "history_window_start": "now-14d", - "index": [ - ".alerts-security.*" - ], - "language": "kuery" - }, - { - "name": "Service Disabled via Registry Modification", - "description": "Identifies attempts to modify services start settings using processes other than services.exe. Attackers may attempt to modify security and monitoring services to avoid detection or delay response.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0040", - "name": "Impact", - "reference": "https://attack.mitre.org/tactics/TA0040/" - }, - "technique": [ - { - "id": "T1489", - "name": "Service Stop", - "reference": "https://attack.mitre.org/techniques/T1489/" - } - ] - } - ], - "id": "87adbb7a-a76a-47dd-897a-d4274e914bb0", - "rule_id": "75dcb176-a575-4e33-a020-4a52aaa1b593", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.data.strings", - "type": "wildcard", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\Start\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\Start\"\n ) and registry.data.strings : (\"3\", \"4\") and\n not \n (\n process.name : \"services.exe\" and user.id : \"S-1-5-18\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "File Compressed or Archived into Common Format", - "description": "Detects files being compressed or archived into common formats. This is a common technique used to obfuscate files to evade detection or to staging data for exfiltration.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Data Source: Elastic Defend", - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "OS: Windows", - "Tactic: Collection", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://en.wikipedia.org/wiki/List_of_file_signatures" - ], - "max_signals": 1000, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1560", - "name": "Archive Collected Data", - "reference": "https://attack.mitre.org/techniques/T1560/", - "subtechnique": [ - { - "id": "T1560.001", - "name": "Archive via Utility", - "reference": "https://attack.mitre.org/techniques/T1560/001/" - } - ] - }, - { - "id": "T1074", - "name": "Data Staged", - "reference": "https://attack.mitre.org/techniques/T1074/", - "subtechnique": [ - { - "id": "T1074.001", - "name": "Local Data Staging", - "reference": "https://attack.mitre.org/techniques/T1074/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1132", - "name": "Data Encoding", - "reference": "https://attack.mitre.org/techniques/T1132/", - "subtechnique": [ - { - "id": "T1132.001", - "name": "Standard Encoding", - "reference": "https://attack.mitre.org/techniques/T1132/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1027", - "name": "Obfuscated Files or Information", - "reference": "https://attack.mitre.org/techniques/T1027/" - } - ] - } - ], - "id": "776ebffc-ef68-4758-9308-46a80b05cfeb", - "rule_id": "79124edf-30a8-4d48-95c4-11522cad94b1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.header_bytes", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "file where event.type in (\"creation\", \"change\") and\n file.Ext.header_bytes : (\n /* compression formats */\n \"1F9D*\", /* tar zip, tar.z (Lempel-Ziv-Welch algorithm) */\n \"1FA0*\", /* tar zip, tar.z (LZH algorithm) */\n \"425A68*\", /* Bzip2 */\n \"524E4301*\", /* Rob Northen Compression */\n \"524E4302*\", /* Rob Northen Compression */\n \"4C5A4950*\", /* LZIP */\n \"504B0*\", /* ZIP */\n \"526172211A07*\", /* RAR compressed */\n \"44434D0150413330*\", /* Windows Update Binary Delta Compression file */\n \"50413330*\", /* Windows Update Binary Delta Compression file */\n \"377ABCAF271C*\", /* 7-Zip */\n \"1F8B*\", /* GZIP */\n \"FD377A585A00*\", /* XZ, tar.xz */\n \"7801*\",\t /* zlib: No Compression (no preset dictionary) */\n \"785E*\",\t /* zlib: Best speed (no preset dictionary) */\n \"789C*\",\t /* zlib: Default Compression (no preset dictionary) */\n \"78DA*\", \t /* zlib: Best Compression (no preset dictionary) */\n \"7820*\",\t /* zlib: No Compression (with preset dictionary) */\n \"787D*\",\t /* zlib: Best speed (with preset dictionary) */\n \"78BB*\",\t /* zlib: Default Compression (with preset dictionary) */\n \"78F9*\",\t /* zlib: Best Compression (with preset dictionary) */\n \"62767832*\", /* LZFSE */\n \"28B52FFD*\", /* Zstandard, zst */\n \"5253564B44415441*\", /* QuickZip rs compressed archive */\n \"2A2A4143452A2A*\", /* ACE */\n\n /* archive formats */\n \"2D686C302D*\", /* lzh */\n \"2D686C352D*\", /* lzh */\n \"303730373037*\", /* cpio */\n \"78617221*\", /* xar */\n \"4F4152*\", /* oar */\n \"49536328*\" /* cab archive */\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Troubleshooting Pack Cabinet Execution", - "description": "Identifies the execution of the Microsoft Diagnostic Wizard to open a diagcab file from a suspicious path and with an unusual parent process. This may indicate an attempt to execute malicious Troubleshooting Pack Cabinet files.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://irsl.medium.com/the-trouble-with-microsofts-troubleshooters-6e32fc80b8bd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "8207a41a-2c5e-4a35-9334-574a4fd61f6b", - "rule_id": "808291d3-e918-4a3a-86cd-73052a0c9bdc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.action == \"start\" and\n (process.name : \"msdt.exe\" or process.pe.original_file_name == \"msdt.exe\") and process.args : \"/cab\" and\n process.parent.name : (\n \"firefox.exe\", \"chrome.exe\", \"msedge.exe\", \"explorer.exe\", \"brave.exe\", \"whale.exe\", \"browser.exe\",\n \"dragon.exe\", \"vivaldi.exe\", \"opera.exe\", \"iexplore\", \"firefox.exe\", \"waterfox.exe\", \"iexplore.exe\",\n \"winrar.exe\", \"winrar.exe\", \"7zFM.exe\", \"outlook.exe\", \"winword.exe\", \"excel.exe\"\n ) and\n process.args : (\n \"?:\\\\Users\\\\*\",\n \"\\\\\\\\*\",\n \"http*\",\n \"ftp://*\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual Remote File Extension", - "description": "An anomaly detection job has detected a remote file transfer with a rare extension, which could indicate potential lateral movement activity on the host.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-90m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "f20564b4-906a-4dc5-9a36-033b9a4ab863", - "rule_id": "814d96c7-2068-42aa-ba8e-fe0ddd565e2e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_rare_file_extension_remote_transfer" - }, - { - "name": "Microsoft Exchange Transport Agent Install Script", - "description": "Identifies the use of Cmdlets and methods related to Microsoft Exchange Transport Agents install. Adversaries may leverage malicious Microsoft Exchange Transport Agents to execute tasks in response to adversary-defined criteria, establishing persistence.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "## Setup", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: PowerShell Logs", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1505", - "name": "Server Software Component", - "reference": "https://attack.mitre.org/techniques/T1505/", - "subtechnique": [ - { - "id": "T1505.002", - "name": "Transport Agent", - "reference": "https://attack.mitre.org/techniques/T1505/002/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "8196148f-93d1-49d7-be8e-0dd5d3db2d89", - "rule_id": "846fe13f-6772-4c83-bd39-9d16d4ad1a81", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\nSteps to implement the logging policy via registry:\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category: \"process\" and host.os.type:windows and\n powershell.file.script_block_text : (\n (\n \"Install-TransportAgent\" or\n \"Enable-TransportAgent\"\n )\n ) and not user.id : \"S-1-5-18\"\n", - "language": "kuery" - }, - { - "name": "Potential Upgrade of Non-interactive Shell", - "description": "Identifies when a non-interactive terminal (tty) is being upgraded to a fully interactive shell. Attackers may upgrade a simple reverse shell to a fully interactive tty after obtaining initial access to a host, in order to obtain a more stable connection.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.004", - "name": "Unix Shell", - "reference": "https://attack.mitre.org/techniques/T1059/004/" - } - ] - } - ] - } - ], - "id": "9f472eb3-77c0-4ee7-9242-9298ada321b1", - "rule_id": "84d1f8db-207f-45ab-a578-921d91c23eb2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args_count", - "type": "long", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action in (\"exec\", \"exec_event\") and event.type == \"start\" and (\n (process.name == \"stty\" and process.args == \"raw\" and process.args == \"-echo\" and process.args_count >= 3) or\n (process.name == \"script\" and process.args in (\"-qc\", \"-c\") and process.args == \"/dev/null\" and \n process.args_count == 4)\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "File with Suspicious Extension Downloaded", - "description": "Identifies unusual files downloaded from outside the local network that have the potential to be abused for code execution.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://x.com/Laughing_Mantis/status/1518766501385318406", - "https://wikileaks.org/ciav7p1/cms/page_13763375.html" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - }, - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - } - ], - "id": "63e49e0e-cf58-4844-8a80-a3c341ae4f6c", - "rule_id": "8d366588-cbd6-43ba-95b4-0971c3f906e5", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.windows.zone_identifier", - "type": "unknown", - "ecs": false - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n file.extension : (\n \"appinstaller\", \"application\", \"appx\", \"appxbundle\", \"cpl\", \"diagcab\", \"diagpkg\", \"diagcfg\", \"manifest\",\n \"msix\", \"pif\", \"search-ms\", \"searchConnector-ms\", \"settingcontent-ms\", \"symlink\", \"theme\", \"themepack\" \n ) and file.Ext.windows.zone_identifier > 1 and\n not\n (\n file.extension : \"msix\" and file.path : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\WinGet\\\\Microsoft.Winget.Source*\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Outgoing RDP Connection by Unusual Process", - "description": "Adversaries may attempt to connect to a remote system over Windows Remote Desktop Protocol (RDP) to achieve lateral movement. Adversaries may avoid using the Microsoft Terminal Services Client (mstsc.exe) binary to establish an RDP connection to evade detection.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Lateral Movement", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1021", - "name": "Remote Services", - "reference": "https://attack.mitre.org/techniques/T1021/", - "subtechnique": [ - { - "id": "T1021.001", - "name": "Remote Desktop Protocol", - "reference": "https://attack.mitre.org/techniques/T1021/001/" - } - ] - } - ] - } - ], - "id": "5b397d1a-9a8c-4c7a-8bcd-47250f0af0e6", - "rule_id": "8e39f54e-910b-4adb-a87e-494fbba5fb65", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.ip", - "type": "ip", - "ecs": true - }, - { - "name": "destination.port", - "type": "long", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "network where host.os.type == \"windows\" and\n event.action == \"connection_attempted\" and destination.port == 3389 and\n not process.executable : \"?:\\\\Windows\\\\System32\\\\mstsc.exe\" and\n destination.ip != \"::1\" and destination.ip != \"127.0.0.1\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Bitsadmin Activity", - "description": "Windows Background Intelligent Transfer Service (BITS) is a low-bandwidth, asynchronous file transfer mechanism. Adversaries may abuse BITS to persist, download, execute, and even clean up after running malicious code.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Command and Control", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1197", - "name": "BITS Jobs", - "reference": "https://attack.mitre.org/techniques/T1197/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1197", - "name": "BITS Jobs", - "reference": "https://attack.mitre.org/techniques/T1197/" - } - ] - } - ], - "id": "da549e1e-fb7a-4196-9454-24264cf2f7a1", - "rule_id": "8eec4df1-4b4b-4502-b6c3-c788714604c9", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n (\n (process.name : \"bitsadmin.exe\" and process.args : (\n \"*Transfer*\", \"*Create*\", \"AddFile\", \"*SetNotifyFlags*\", \"*SetNotifyCmdLine*\",\n \"*SetMinRetryDelay*\", \"*SetCustomHeaders*\", \"*Resume*\")\n ) or\n (process.name : \"powershell.exe\" and process.args : (\n \"*Start-BitsTransfer*\", \"*Add-BitsFile*\",\n \"*Resume-BitsTransfer*\", \"*Set-BitsTransfer*\", \"*BITS.Manager*\")\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "InstallUtil Activity", - "description": "InstallUtil is a command-line utility that allows for installation and uninstallation of resources by executing specific installer components specified in .NET binaries. Adversaries may use InstallUtil to proxy the execution of code through a trusted Windows utility.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.004", - "name": "InstallUtil", - "reference": "https://attack.mitre.org/techniques/T1218/004/" - } - ] - } - ] - } - ], - "id": "7ffa53fa-f00d-40db-b84b-ab7884e3f438", - "rule_id": "90babaa8-5216-4568-992d-d4a01a105d98", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"installutil.exe\" and not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Creation of Kernel Module", - "description": "Identifies activity related to loading kernel modules on Linux via creation of new ko files in the LKM directory.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.006", - "name": "Kernel Modules and Extensions", - "reference": "https://attack.mitre.org/techniques/T1547/006/" - } - ] - } - ] - } - ], - "id": "961a760e-1529-4906-9e26-92f7301594b1", - "rule_id": "947827c6-9ed6-4dec-903e-c856c86e72f3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where event.type in (\"change\", \"creation\") and host.os.type == \"linux\" and\nfile.path : \"/lib/modules/*\" and file.name : \"*.ko\"\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "Indirect Command Execution via Forfiles/Pcalua", - "description": "Identifies indirect command execution via Program Compatibility Assistant (pcalua.exe) or forfiles.exe.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1202", - "name": "Indirect Command Execution", - "reference": "https://attack.mitre.org/techniques/T1202/" - } - ] - } - ], - "id": "0a528122-7f9e-4bcc-b66d-e8d22cc89866", - "rule_id": "98843d35-645e-4e66-9d6a-5049acd96ce1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.parent.name : (\"pcalua.exe\", \"forfiles.exe\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Machine Learning Detected a Suspicious Windows Event with a High Malicious Probability Score", - "description": "A supervised machine learning model (ProblemChild) has identified a suspicious Windows process event with high probability of it being malicious activity. Alternatively, the model's blocklist identified the event as being malicious.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "OS: Windows", - "Data Source: Elastic Endgame", - "Use Case: Living off the Land Attack Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-10m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/problemchild", - "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.004", - "name": "Masquerade Task or Service", - "reference": "https://attack.mitre.org/techniques/T1036/004/" - } - ] - } - ] - } - ], - "id": "afdb8333-977b-4c3b-847c-96fae1c39fd9", - "rule_id": "994e40aa-8c85-43de-825e-15f665375ee8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "problemchild", - "version": "^2.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "blocklist_label", - "type": "unknown", - "ecs": false - }, - { - "name": "problemchild.prediction", - "type": "unknown", - "ecs": false - }, - { - "name": "problemchild.prediction_probability", - "type": "unknown", - "ecs": false - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - } - ], - "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "eql", - "query": "process where ((problemchild.prediction == 1 and problemchild.prediction_probability > 0.98) or\nblocklist_label == 1) and not process.args : (\"*C:\\\\WINDOWS\\\\temp\\\\nessus_*.txt*\", \"*C:\\\\WINDOWS\\\\temp\\\\nessus_*.tmp*\")\n", - "language": "eql", - "index": [ - "endgame-*", - "logs-endpoint.events.process-*", - "winlogbeat-*" - ] - }, - { - "name": "Unsigned BITS Service Client Process", - "description": "Identifies an unsigned Windows Background Intelligent Transfer Service (BITS) client process. Attackers may abuse BITS functionality to download or upload data using the BITS service.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://web.archive.org/web/20230531215706/https://blog.menasec.net/2021/05/hunting-for-suspicious-usage-of.html", - "https://www.elastic.co/blog/hunting-for-persistence-using-elastic-security-part-2" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1197", - "name": "BITS Jobs", - "reference": "https://attack.mitre.org/techniques/T1197/" - }, - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - } - ] - } - ] - } - ], - "id": "605a4b26-6364-48d0-9000-d47875fb993b", - "rule_id": "9a3884d0-282d-45ea-86ce-b9c81100f026", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "library where dll.name : \"Bitsproxy.dll\" and process.executable != null and\nnot process.code_signature.trusted == true\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "GitHub Owner Role Granted To User", - "description": "This rule detects when a member is granted the organization owner role of a GitHub organization. This role provides admin level privileges. Any new owner role should be investigated to determine its validity. Unauthorized owner roles could indicate compromise within your organization and provide unlimited access to data and settings.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Cloud", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Github" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1098", - "name": "Account Manipulation", - "reference": "https://attack.mitre.org/techniques/T1098/", - "subtechnique": [ - { - "id": "T1098.003", - "name": "Additional Cloud Roles", - "reference": "https://attack.mitre.org/techniques/T1098/003/" - } - ] - } - ] - } - ], - "id": "6b084809-9c1d-42d2-8f59-f00210939ed6", - "rule_id": "9b343b62-d173-4cfd-bd8b-e6379f964ca4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "github", - "version": "^1.0.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.dataset", - "type": "keyword", - "ecs": true - }, - { - "name": "github.permission", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "eql", - "query": "iam where event.dataset == \"github.audit\" and event.action == \"org.update_member\" and github.permission == \"admin\"\n", - "language": "eql", - "index": [ - "logs-github.audit-*" - ] - }, - { - "name": "Potential Privilege Escalation via Python cap_setuid", - "description": "This detection rule monitors for the execution of a system command with setuid or setgid capabilities via Python, followed by a uid or gid change to the root user. This sequence of events may indicate successful privilege escalation. Setuid (Set User ID) and setgid (Set Group ID) are Unix-like OS features that enable processes to run with elevated privileges, based on the file owner or group. Threat actors can exploit these attributes to escalate privileges to the privileges that are set on the binary that is being executed.", - "risk_score": 47, - "severity": "medium", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1068", - "name": "Exploitation for Privilege Escalation", - "reference": "https://attack.mitre.org/techniques/T1068/" - }, - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.001", - "name": "Setuid and Setgid", - "reference": "https://attack.mitre.org/techniques/T1548/001/" - } - ] - } - ] - } - ], - "id": "434623e1-a5e6-41a3-b075-47a1105044af", - "rule_id": "a0ddb77b-0318-41f0-91e4-8c1b5528834f", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "group.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=1s\n [process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \n process.args : \"import os;os.set?id(0);os.system(*)\" and process.args : \"*python*\" and user.id != \"0\"]\n [process where host.os.type == \"linux\" and event.action in (\"uid_change\", \"gid_change\") and event.type == \"change\" and \n (user.id == \"0\" or group.id == \"0\")]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "High Mean of RDP Session Duration", - "description": "A machine learning job has detected unusually high mean of RDP session duration. Long RDP sessions can be used to evade detection mechanisms via session persistence, and might be used to perform tasks such as lateral movement, that might require uninterrupted access to a compromised machine.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-12h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "915a2906-e431-4fb2-8d23-e471fc13dcb4", - "rule_id": "a74c60cb-70ee-4629-a127-608ead14ebf1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_high_mean_rdp_session_duration" - }, - { - "name": "Potential Malicious File Downloaded from Google Drive", - "description": "Identifies potential malicious file download and execution from Google Drive. The rule checks for download activity from Google Drive URL, followed by the creation of files commonly leveraged by or for malware. This could indicate an attempt to run malicious scripts, executables or payloads.", - "risk_score": 73, - "severity": "high", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: Windows", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Command and Control" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [ - "Approved third-party applications that use Google Drive download URLs.", - "Legitimate publicly shared files from Google Drive." - ], - "references": [ - "https://intelligence.abnormalsecurity.com/blog/google-drive-matanbuchus-malware" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1105", - "name": "Ingress Tool Transfer", - "reference": "https://attack.mitre.org/techniques/T1105/" - } - ] - } - ], - "id": "9eaccf00-6a06-40e4-87c2-8283439ca7aa", - "rule_id": "a8afdce2-0ec1-11ee-b843-f661ea17fbcd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "destination.as.organization.name", - "type": "keyword", - "ecs": true - }, - { - "name": "dns.question.name", - "type": "keyword", - "ecs": true - }, - { - "name": "dns.question.type", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by host.id, process.entity_id with maxspan=30s\n[any where\n\n /* Look for processes started or libraries loaded from untrusted or unsigned Windows, Linux or macOS binaries */\n (event.action in (\"exec\", \"fork\", \"start\", \"load\")) or\n\n /* Look for Google Drive download URL with AV flag skipping */\n (process.args : \"*drive.google.com*\" and process.args : \"*export=download*\" and process.args : \"*confirm=no_antivirus*\")\n]\n\n[network where\n /* Look for DNS requests for Google Drive */\n (dns.question.name : \"drive.google.com\" and dns.question.type : \"A\") or\n\n /* Look for connection attempts to address that resolves to Google */\n (destination.as.organization.name : \"GOOGLE\" and event.action == \"connection_attempted\")\n\n /* NOTE: Add LoLBins if tuning is required\n process.name : (\n \"cmd.exe\", \"bitsadmin.exe\", \"certutil.exe\", \"esentutl.exe\", \"wmic.exe\", \"PowerShell.exe\",\n \"homedrive.exe\",\"regsvr32.exe\", \"mshta.exe\", \"rundll32.exe\", \"cscript.exe\", \"wscript.exe\",\n \"curl\", \"wget\", \"scp\", \"ftp\", \"python\", \"perl\", \"ruby\"))] */\n]\n\n/* Identify the creation of files following Google Drive connection with extensions commonly used for executables or libraries */\n[file where event.action == \"creation\" and file.extension : (\n \"exe\", \"dll\", \"scr\", \"jar\", \"pif\", \"app\", \"dmg\", \"pkg\", \"elf\", \"so\", \"bin\", \"deb\", \"rpm\",\"sh\",\"hta\",\"lnk\"\n )\n]\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint*" - ] - }, - { - "name": "High Variance in RDP Session Duration", - "description": "A machine learning job has detected unusually high variance of RDP session duration. Long RDP sessions can be used to evade detection mechanisms via session persistence, and might be used to perform tasks such as lateral movement, that might require uninterrupted access to a compromised machine.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-12h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "a4e7770c-624b-408b-aae9-27ebbe899ea3", - "rule_id": "a8d35ca0-ad8d-48a9-9f6c-553622dca61a", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_high_var_rdp_session_duration" - }, - { - "name": "Netsh Helper DLL", - "description": "Identifies the addition of a Netsh Helper DLL, netsh.exe supports the addition of these DLLs to extend its functionality. Attackers may abuse this mechanism to execute malicious payloads every time the utility is executed, which can be done by administrators or a scheduled task.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.007", - "name": "Netsh Helper DLL", - "reference": "https://attack.mitre.org/techniques/T1546/007/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - } - ], - "id": "7900e16c-a55e-440e-812c-bcc9b456a1eb", - "rule_id": "b0638186-4f12-48ac-83d2-47e686d08e82", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\Software\\\\Microsoft\\\\netsh\\\\*\",\n \"\\\\REGISTRY\\\\MACHINE\\\\Software\\\\Microsoft\\\\netsh\\\\*\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Discovery of Domain Groups", - "description": "Identifies the execution of Linux built-in commands related to account or group enumeration. Adversaries may use account and group information to orient themselves before deciding how to act.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [ - { - "id": "T1069", - "name": "Permission Groups Discovery", - "reference": "https://attack.mitre.org/techniques/T1069/" - } - ] - } - ], - "id": "5a92e362-ba56-45b9-80fc-5690051de0f2", - "rule_id": "b92d5eae-70bb-4b66-be27-f98ba9d0ccdc", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type : (\"start\", \"process_started\") and host.os.type == \"linux\" and\n ( process.name : (\"ldapsearch\", \"dscacheutil\") or\n (process.name : \"dscl\" and process.args : \"*-list*\")\n )\n", - "language": "eql", - "index": [ - "auditbeat-*", - "logs-endpoint.events.*" - ] - }, - { - "name": "File and Directory Permissions Modification", - "description": "Identifies the change of permissions/ownership of files/folders through built-in Windows utilities. Threat actors may require permission modification of files/folders to change, modify or delete them.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1222", - "name": "File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/", - "subtechnique": [ - { - "id": "T1222.001", - "name": "Windows File and Directory Permissions Modification", - "reference": "https://attack.mitre.org/techniques/T1222/001/" - } - ] - } - ] - } - ], - "id": "9e547a8d-cecb-4940-97d1-ba4ef539d611", - "rule_id": "bc9e4f5a-e263-4213-a2ac-1edf9b417ada", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and host.os.type == \"windows\" and\n(\n ((process.name: \"icacls.exe\" or process.pe.original_file_name == \"iCACLS.EXE\") and process.args: (\"*:F\", \"/reset\", \"/setowner\", \"*grant*\")) or\n ((process.name: \"cacls.exe\" or process.pe.original_file_name == \"CACLS.EXE\") and process.args: (\"/g\", \"*:f\")) or\n ((process.name: \"takeown.exe\" or process.pe.original_file_name == \"takeown.exe\") and process.args: (\"/F\")) or\n ((process.name: \"attrib.exe\" or process.pe.original_file_name== \"ATTRIB.EXE\") and process.args: \"-r\")\n) and not user.id : \"S-1-5-18\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Machine Learning Detected DGA activity using a known SUNBURST DNS domain", - "description": "A supervised machine learning model has identified a DNS question name that used by the SUNBURST malware and is predicted to be the result of a Domain Generation Algorithm.", - "risk_score": 99, - "severity": "critical", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Domain: Network", - "Domain: Endpoint", - "Data Source: Elastic Defend", - "Use Case: Domain Generation Algorithm Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Command and Control" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-10m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/dga" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1568", - "name": "Dynamic Resolution", - "reference": "https://attack.mitre.org/techniques/T1568/", - "subtechnique": [ - { - "id": "T1568.002", - "name": "Domain Generation Algorithms", - "reference": "https://attack.mitre.org/techniques/T1568/002/" - } - ] - } - ] - } - ], - "id": "e3064b33-060a-4d56-8d25-7cb35395630e", - "rule_id": "bcaa15ce-2d41-44d7-a322-918f9db77766", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "dga", - "version": "^2.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "dns.question.registered_domain", - "type": "keyword", - "ecs": true - }, - { - "name": "ml_is_dga.malicious_prediction", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Domain Generation Algorithm (DGA) integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "query", - "index": [ - "logs-endpoint.events.*", - "logs-network_traffic.*" - ], - "query": "ml_is_dga.malicious_prediction:1 and dns.question.registered_domain:avsvmcloud.com\n", - "language": "kuery" - }, - { - "name": "Potential Defense Evasion via CMSTP.exe", - "description": "The Microsoft Connection Manager Profile Installer (CMSTP.exe) is a command-line program to install Connection Manager service profiles, which accept installation information file (INF) files. Adversaries may abuse CMSTP to proxy the execution of malicious code by supplying INF files that contain malicious commands.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://attack.mitre.org/techniques/T1218/003/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.003", - "name": "CMSTP", - "reference": "https://attack.mitre.org/techniques/T1218/003/" - } - ] - } - ] - } - ], - "id": "1986d4cc-047c-4646-b85a-ce33e3c0b918", - "rule_id": "bd3d058d-5405-4cee-b890-337f09366ba2", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"cmstp.exe\" and process.args == \"/s\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Windows Process Cluster Spawned by a Host", - "description": "A machine learning job combination has detected a set of one or more suspicious Windows processes with unusually high scores for malicious probability. These process(es) have been classified as malicious in several ways. The process(es) were predicted to be malicious by the ProblemChild supervised ML model. If the anomaly contains a cluster of suspicious processes, each process has the same host name, and the aggregate score of the event cluster was calculated to be unusually high by an unsupervised ML model. Such a cluster often contains suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Living off the Land Attack Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/problemchild", - "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - } - ], - "id": "64540d13-8ae3-4c5b-aa1d-0d1913ceebf0", - "rule_id": "bdfebe11-e169-42e3-b344-c5d2015533d3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "problemchild", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "problem_child_high_sum_by_host" - }, - { - "name": "Unusual Remote File Directory", - "description": "An anomaly detection job has detected a remote file transfer on an unusual directory indicating a potential lateral movement activity on the host. Many Security solutions monitor well-known directories for suspicious activities, so attackers might use less common directories to bypass monitoring.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-90m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "36f85ab8-5b94-47d5-b27a-8f47398e5d31", - "rule_id": "be4c5aed-90f5-4221-8bd5-7ab3a4334751", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_rare_file_path_remote_transfer" - }, - { - "name": "Potential Data Exfiltration Activity to an Unusual Region", - "description": "A machine learning job has detected data exfiltration to a particular geo-location (by region name). Data transfers to geo-locations that are outside the normal traffic patterns of an organization could indicate exfiltration over command and control channels.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Data Exfiltration Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-6h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/ded" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1041", - "name": "Exfiltration Over C2 Channel", - "reference": "https://attack.mitre.org/techniques/T1041/" - } - ] - } - ], - "id": "22ed8d49-c712-4e49-bfbc-3eeca1845d7b", - "rule_id": "bfba5158-1fd6-4937-a205-77d96213b341", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "ded", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "ded_high_sent_bytes_destination_region_name" - }, - { - "name": "Memory Dump File with Unusual Extension", - "description": "Identifies the creation of a memory dump file with an unusual extension, which can indicate an attempt to disguise a memory dump as another file type to bypass security defenses.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.008", - "name": "Masquerade File Type", - "reference": "https://attack.mitre.org/techniques/T1036/008/" - } - ] - } - ] - } - ], - "id": "9a4b53fa-1712-44bd-b137-0ab493947180", - "rule_id": "c0b9dc99-c696-4779-b086-0d37dc2b3778", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.header_bytes", - "type": "unknown", - "ecs": false - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n\n /* MDMP header */\n file.Ext.header_bytes : \"4d444d50*\" and\n not file.extension : (\"dmp\", \"mdmp\", \"hdmp\", \"edmp\", \"full\", \"tdref\", \"cg\", \"tmp\", \"dat\") and\n not \n (\n process.executable : \"?:\\\\Program Files\\\\Endgame\\\\esensor.exe\" and\n process.code_signature.trusted == true and length(file.extension) == 0\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Attempted Private Key Access", - "description": "Attackers may try to access private keys, e.g. ssh, in order to gain further authenticated access to the environment.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.004", - "name": "Private Keys", - "reference": "https://attack.mitre.org/techniques/T1552/004/" - } - ] - } - ] - } - ], - "id": "15808ca8-19ec-4bb8-ad35-d0c8ba4e95fe", - "rule_id": "c55badd3-3e61-4292-836f-56209dc8a601", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.args : (\"*.pem*\", \"*.id_rsa*\") and\n not process.executable : (\n \"?:\\\\ProgramData\\\\Logishrd\\\\LogiOptions\\\\Software\\\\*\\\\LogiLuUpdater.exe\",\n \"?:\\\\Program Files\\\\Logi\\\\LogiBolt\\\\LogiBoltUpdater.exe\",\n \"?:\\\\Windows\\\\system32\\\\icacls.exe\",\n \"?:\\\\Program Files\\\\Splunk\\\\bin\\\\openssl.exe\",\n \"?:\\\\Program Files\\\\Elastic\\\\Agent\\\\data\\\\*\\\\components\\\\osqueryd.exe\",\n \"?:\\\\Windows\\\\System32\\\\OpenSSH\\\\*\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Service Path Modification via sc.exe", - "description": "Identifies attempts to modify a service path setting using sc.exe. Attackers may attempt to modify existing services for persistence or privilege escalation.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - } - ], - "id": "30a15bcf-0ac6-4101-843e-5fc4a420dbc4", - "rule_id": "c5677997-f75b-4cda-b830-a75920514096", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type == \"start\" and\n process.name : \"sc.exe\" and process.args : \"*binPath*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Potential Data Exfiltration Activity to an Unusual IP Address", - "description": "A machine learning job has detected data exfiltration to a particular geo-location (by IP address). Data transfers to geo-locations that are outside the normal traffic patterns of an organization could indicate exfiltration over command and control channels.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Data Exfiltration Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-6h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/ded" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1041", - "name": "Exfiltration Over C2 Channel", - "reference": "https://attack.mitre.org/techniques/T1041/" - } - ] - } - ], - "id": "de813576-c028-44e3-8db7-a5915e94901b", - "rule_id": "cc653d77-ddd2-45b1-9197-c75ad19df66c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "ded", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "ded_high_sent_bytes_destination_ip" - }, - { - "name": "Downloaded URL Files", - "description": "Identifies .url shortcut files downloaded from outside the local network. These shortcut files are commonly used in phishing campaigns.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1204", - "name": "User Execution", - "reference": "https://attack.mitre.org/techniques/T1204/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0001", - "name": "Initial Access", - "reference": "https://attack.mitre.org/tactics/TA0001/" - }, - "technique": [ - { - "id": "T1566", - "name": "Phishing", - "reference": "https://attack.mitre.org/techniques/T1566/", - "subtechnique": [ - { - "id": "T1566.001", - "name": "Spearphishing Attachment", - "reference": "https://attack.mitre.org/techniques/T1566/001/" - }, - { - "id": "T1566.002", - "name": "Spearphishing Link", - "reference": "https://attack.mitre.org/techniques/T1566/002/" - } - ] - } - ] - } - ], - "id": "9df50635-1d58-4f5d-9766-ac45c4278e19", - "rule_id": "cd82e3d6-1346-4afd-8f22-38388bbf34cb", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.windows.zone_identifier", - "type": "unknown", - "ecs": false - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and file.extension == \"url\"\n and file.Ext.windows.zone_identifier > 1 and not process.name : \"explorer.exe\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Unusual Discovery Activity by User", - "description": "This rule leverages alert data from various Discovery building block rules to alert on signals with unusual unique host.id and user.id entries.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Discovery", - "Rule Type: Higher-Order Rule" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0007", - "name": "Discovery", - "reference": "https://attack.mitre.org/tactics/TA0007/" - }, - "technique": [] - } - ], - "id": "6d042959-8cee-457b-8110-fa2a7c92909c", - "rule_id": "cf575427-0839-4c69-a9e6-99fde02606f3", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [], - "required_fields": [ - { - "name": "event.kind", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "kibana.alert.rule.rule_id", - "type": "unknown", - "ecs": false - } - ], - "setup": "", - "type": "new_terms", - "query": "host.os.type:windows and event.kind:signal and kibana.alert.rule.rule_id:(\n \"d68e95ad-1c82-4074-a12a-125fe10ac8ba\" or \"7b8bfc26-81d2-435e-965c-d722ee397ef1\" or\n \"0635c542-1b96-4335-9b47-126582d2c19a\" or \"6ea55c81-e2ba-42f2-a134-bccf857ba922\" or\n \"e0881d20-54ac-457f-8733-fe0bc5d44c55\" or \"06568a02-af29-4f20-929c-f3af281e41aa\" or\n \"c4e9ed3e-55a2-4309-a012-bc3c78dad10a\" or \"51176ed2-2d90-49f2-9f3d-17196428b169\" or\n \"1d72d014-e2ab-4707-b056-9b96abe7b511\"\n)\n", - "new_terms_fields": [ - "host.id", - "user.id" - ], - "history_window_start": "now-14d", - "index": [ - ".alerts-security.*" - ], - "language": "kuery" - }, - { - "name": "Trap Signals Execution", - "description": "Identify activity related where adversaries can include a trap command which then allows programs and shells to specify commands that will be executed upon receiving interrupt signals.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "OS: macOS", - "Use Case: Threat Detection", - "Tactic: Privilege Escalation", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1546", - "name": "Event Triggered Execution", - "reference": "https://attack.mitre.org/techniques/T1546/", - "subtechnique": [ - { - "id": "T1546.005", - "name": "Trap", - "reference": "https://attack.mitre.org/techniques/T1546/005/" - } - ] - } - ] - } - ], - "id": "5dcd52d7-66b5-4841-a7e9-da9265ae9e81", - "rule_id": "cf6995ec-32a9-4b2d-9340-f8e61acf3f4e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.type : (\"start\", \"process_started\") and process.name : \"trap\" and process.args : \"SIG*\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Archive File with Unusual Extension", - "description": "Identifies the creation of an archive file with an unusual extension. Attackers may attempt to evade detection by masquerading files using the file extension values used by image, audio, or document file types.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.008", - "name": "Masquerade File Type", - "reference": "https://attack.mitre.org/techniques/T1036/008/" - } - ] - } - ] - } - ], - "id": "ec2710fa-6c4f-4065-b9ab-98bb12e783d8", - "rule_id": "cffbaf47-9391-4e09-a83c-1f27d7474826", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.header_bytes", - "type": "unknown", - "ecs": false - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.action != \"deletion\" and\n\n /* common archive file headers - Rar, 7z, GZIP, MSCF, XZ, ZIP */\n file.Ext.header_bytes : (\"52617221*\", \"377ABCAF271C*\", \"1F8B*\", \"4d534346*\", \"FD377A585A00*\", \"504B0304*\", \"504B0708*\") and\n\n (\n /* common image file extensions */\n file.extension : (\"jpg\", \"jpeg\", \"emf\", \"tiff\", \"gif\", \"png\", \"bmp\", \"ico\", \"fpx\", \"eps\", \"inf\") or\n\n /* common audio and video file extensions */\n file.extension : (\"mp3\", \"wav\", \"avi\", \"mpeg\", \"flv\", \"wma\", \"wmv\", \"mov\", \"mp4\", \"3gp\") or\n\n /* common document file extensions */\n (file.extension : (\"doc\", \"docx\", \"rtf\", \"ppt\", \"pptx\", \"xls\", \"xlsx\") and\n\n /* exclude ZIP file header values for OPENXML documents */\n not file.Ext.header_bytes : (\"504B0304*\", \"504B0708*\"))\n ) and\n\n not (process.executable : \"?:\\\\Windows\\\\System32\\\\inetsrv\\\\w3wp.exe\" and file.path : \"?:\\\\inetpub\\\\temp\\\\IIS Temporary Compressed Files\\\\*\")\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "AWS Credentials Searched For Inside A Container", - "description": "This rule detects the use of system search utilities like grep and find to search for AWS credentials inside a container. Unauthorized access to these sensitive files could lead to further compromise of the container environment or facilitate a container breakout to the underlying cloud environment.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Data Source: Elastic Defend for Containers", - "Domain: Container", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Credential Access" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-6m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://sysdig.com/blog/threat-detection-aws-cloud-containers/" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1552", - "name": "Unsecured Credentials", - "reference": "https://attack.mitre.org/techniques/T1552/", - "subtechnique": [ - { - "id": "T1552.001", - "name": "Credentials In Files", - "reference": "https://attack.mitre.org/techniques/T1552/001/" - } - ] - } - ] - } - ], - "id": "c55cafd5-673d-405d-be14-6a1e01d0128f", - "rule_id": "d0b0f3ed-0b37-44bf-adee-e8cb7de92767", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "cloud_defend", - "version": "^1.0.5" - } - ], - "required_fields": [ - { - "name": "event.module", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where event.module == \"cloud_defend\" and \n event.type == \"start\" and\n \n/*account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg*/\n(process.name : (\"grep\", \"egrep\", \"fgrep\", \"find\", \"locate\", \"mlocate\") or process.args : (\"grep\", \"egrep\", \"fgrep\", \"find\", \"locate\", \"mlocate\")) and \nprocess.args : (\"*aws_access_key_id*\", \"*aws_secret_access_key*\", \"*aws_session_token*\", \"*accesskeyid*\", \"*secretaccesskey*\", \"*access_key*\", \"*.aws/credentials*\")\n", - "language": "eql", - "index": [ - "logs-cloud_defend*" - ] - }, - { - "name": "WMI WBEMTEST Utility Execution", - "description": "Adversaries may abuse the WMI diagnostic tool, wbemtest.exe, to enumerate WMI object instances or invoke methods against local or remote endpoints.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1047", - "name": "Windows Management Instrumentation", - "reference": "https://attack.mitre.org/techniques/T1047/" - } - ] - } - ], - "id": "7b27db74-10bf-4616-bf8d-bd48354df628", - "rule_id": "d3551433-782f-4e22-bbea-c816af2d41c6", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : \"wbemtest.exe\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Machine Learning Detected a DNS Request With a High DGA Probability Score", - "description": "A supervised machine learning model has identified a DNS question name with a high probability of sourcing from a Domain Generation Algorithm (DGA), which could indicate command and control network activity.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Domain: Network", - "Domain: Endpoint", - "Data Source: Elastic Defend", - "Use Case: Domain Generation Algorithm Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Command and Control" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-10m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/dga" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1568", - "name": "Dynamic Resolution", - "reference": "https://attack.mitre.org/techniques/T1568/", - "subtechnique": [ - { - "id": "T1568.002", - "name": "Domain Generation Algorithms", - "reference": "https://attack.mitre.org/techniques/T1568/002/" - } - ] - } - ] - } - ], - "id": "de3d8273-cec6-4904-95c1-3a25dcd820bd", - "rule_id": "da7f5803-1cd4-42fd-a890-0173ae80ac69", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "dga", - "version": "^2.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "ml_is_dga.malicious_probability", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Domain Generation Algorithm (DGA) integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "query", - "index": [ - "logs-endpoint.events.*", - "logs-network_traffic.*" - ], - "query": "ml_is_dga.malicious_probability > 0.98\n", - "language": "kuery" - }, - { - "name": "Delayed Execution via Ping", - "description": "Identifies the execution of commonly abused Windows utilities via a delayed Ping execution. This behavior is often observed during malware installation and is consistent with an attacker attempting to evade detection.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Execution", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.005", - "name": "Visual Basic", - "reference": "https://attack.mitre.org/techniques/T1059/005/" - }, - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1497", - "name": "Virtualization/Sandbox Evasion", - "reference": "https://attack.mitre.org/techniques/T1497/", - "subtechnique": [ - { - "id": "T1497.003", - "name": "Time Based Evasion", - "reference": "https://attack.mitre.org/techniques/T1497/003/" - } - ] - }, - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/", - "subtechnique": [ - { - "id": "T1218.003", - "name": "CMSTP", - "reference": "https://attack.mitre.org/techniques/T1218/003/" - }, - { - "id": "T1218.004", - "name": "InstallUtil", - "reference": "https://attack.mitre.org/techniques/T1218/004/" - }, - { - "id": "T1218.005", - "name": "Mshta", - "reference": "https://attack.mitre.org/techniques/T1218/005/" - }, - { - "id": "T1218.009", - "name": "Regsvcs/Regasm", - "reference": "https://attack.mitre.org/techniques/T1218/009/" - }, - { - "id": "T1218.010", - "name": "Regsvr32", - "reference": "https://attack.mitre.org/techniques/T1218/010/" - }, - { - "id": "T1218.011", - "name": "Rundll32", - "reference": "https://attack.mitre.org/techniques/T1218/011/" - } - ] - }, - { - "id": "T1216", - "name": "System Script Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1216/" - }, - { - "id": "T1220", - "name": "XSL Script Processing", - "reference": "https://attack.mitre.org/techniques/T1220/" - } - ] - } - ], - "id": "f35c4305-39fc-465b-8a0c-fb1b981d1951", - "rule_id": "e00b8d49-632f-4dc6-94a5-76153a481915", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pe.original_file_name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.working_directory", - "type": "keyword", - "ecs": true - }, - { - "name": "user.id", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence by process.parent.entity_id with maxspan=1m\n [process where host.os.type == \"windows\" and event.action == \"start\" and process.name : \"ping.exe\" and\n process.args : \"-n\" and process.parent.name : \"cmd.exe\" and not user.id : \"S-1-5-18\"]\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.parent.name : \"cmd.exe\" and\n (\n process.name : (\n \"rundll32.exe\", \"powershell.exe\",\n \"mshta.exe\", \"msbuild.exe\",\n \"certutil.exe\", \"regsvr32.exe\",\n \"powershell.exe\", \"cscript.exe\",\n \"wscript.exe\", \"wmic.exe\",\n \"installutil.exe\", \"msxsl.exe\",\n \"Microsoft.Workflow.Compiler.exe\",\n \"ieexec.exe\", \"iexpress.exe\",\n \"RegAsm.exe\", \"installutil.exe\",\n \"RegSvcs.exe\", \"RegAsm.exe\"\n ) or\n (process.executable : \"?:\\\\Users\\\\*\\\\AppData\\\\*.exe\" and not process.code_signature.trusted == true)\n ) and\n\n not process.args : (\"?:\\\\Program Files\\\\*\", \"?:\\\\Program Files (x86)\\\\*\") and\n not (process.name : (\"openssl.exe\", \"httpcfg.exe\", \"certutil.exe\") and process.parent.command_line : \"*ScreenConnectConfigurator.cmd*\") and\n not (process.pe.original_file_name : \"DPInst.exe\" and process.command_line : \"driver\\\\DPInst_x64 /f \") and\n not (process.name : \"powershell.exe\" and process.args : \"Write-Host ======*\") and\n not (process.name : \"wscript.exe\" and process.args : \"launchquiet_args.vbs\" and process.parent.args : \"?:\\\\Windows\\\\TempInst\\\\7z*\") and\n not (process.name : \"regsvr32.exe\" and process.args : (\"?:\\\\windows\\\\syswow64\\\\msxml?.dll\", \"msxml?.dll\", \"?:\\\\Windows\\\\SysWOW64\\\\mschrt20.ocx\")) and \n not (process.name : \"wscript.exe\" and\n process.working_directory :\n (\"?:\\\\Windows\\\\TempInst\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\BackupBootstrapper\\\\Logs\\\\\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\QBTools\\\\\"))\n ]\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potentially Suspicious Process Started via tmux or screen", - "description": "This rule monitors for the execution of suspicious commands via screen and tmux. When launching a command and detaching directly, the commands will be executed in the background via its parent process. Attackers may leverage screen or tmux to execute commands while attempting to evade detection.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1218", - "name": "System Binary Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1218/" - } - ] - } - ], - "id": "796fa4bb-6d75-4f27-b6ce-58bfa4205ec9", - "rule_id": "e0cc3807-e108-483c-bf66-5a4fbe0d7e89", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.parent.name in (\"screen\", \"tmux\") and process.name : (\n \"nmap\", \"nc\", \"ncat\", \"netcat\", \"socat\", \"nc.openbsd\", \"ngrok\", \"ping\", \"java\", \"python*\", \"php*\", \"perl\", \"ruby\",\n \"lua*\", \"openssl\", \"telnet\", \"awk\", \"wget\", \"curl\", \"whoami\", \"id\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential Data Exfiltration Activity to an Unusual ISO Code", - "description": "A machine learning job has detected data exfiltration to a particular geo-location (by region name). Data transfers to geo-locations that are outside the normal traffic patterns of an organization could indicate exfiltration over command and control channels.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Data Exfiltration Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-6h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/ded" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1041", - "name": "Exfiltration Over C2 Channel", - "reference": "https://attack.mitre.org/techniques/T1041/" - } - ] - } - ], - "id": "b1df930f-386d-44d6-be3d-eb3e0e99ecd9", - "rule_id": "e1db8899-97c1-4851-8993-3a3265353601", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "ded", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "ded_high_sent_bytes_destination_geo_country_iso_code" - }, - { - "name": "Potential Credential Access via Memory Dump File Creation", - "description": "Identifies the creation or modification of a medium size memory dump file which can indicate an attempt to access credentials from a process memory.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/", - "subtechnique": [ - { - "id": "T1003.001", - "name": "LSASS Memory", - "reference": "https://attack.mitre.org/techniques/T1003/001/" - } - ] - } - ] - } - ], - "id": "689f0cfc-e040-421c-ab9a-c3eded7ca71f", - "rule_id": "e707a7be-cc52-41ac-8ab3-d34b38c20005", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.header_bytes", - "type": "unknown", - "ecs": false - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "file.size", - "type": "long", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.trusted", - "type": "boolean", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type == \"creation\" and\n\n /* MDMP header */\n file.Ext.header_bytes : \"4d444d50*\" and file.size >= 30000 and\n not\n\n (\n (\n process.executable : (\n \"?:\\\\Windows\\\\System32\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\WerFault.exe\",\n \"?:\\\\Windows\\\\System32\\\\Wermgr.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\Wermgr.exe\",\n \"?:\\\\Windows\\\\System32\\\\WerFaultSecure.exe\",\n \"?:\\\\Windows\\\\System32\\\\WUDFHost.exe\",\n \"?:\\\\Windows\\\\System32\\\\Taskmgr.exe\",\n \"?:\\\\Windows\\\\SysWOW64\\\\Taskmgr.exe\",\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\SystemApps\\\\*.exe\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Zoom\\\\bin\\\\zCrashReport64.exe\"\n ) and process.code_signature.trusted == true\n ) or\n (\n file.path : (\n \"?:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\WER\\\\*\",\n \"?:\\\\ProgramData\\\\Microsoft\\\\WDF\\\\*\",\n \"?:\\\\ProgramData\\\\Alteryx\\\\ErrorLogs\\\\*\",\n \"?:\\\\ProgramData\\\\Goodix\\\\*\",\n \"?:\\\\Windows\\\\system32\\\\config\\\\systemprofile\\\\AppData\\\\Local\\\\CrashDumps\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Zoom\\\\logs\\\\zoomcrash*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\*\\\\Crashpad\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\*\\\\crashpaddb\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\*\\\\HungReports\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\*\\\\CrashDumps\\\\*\",\n \"?:\\\\Users\\\\*\\\\AppData\\\\*\\\\NativeCrashReporting\\\\*\"\n ) and (process.code_signature.trusted == true or process.executable == null)\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Spike in Bytes Sent to an External Device via Airdrop", - "description": "A machine learning job has detected high bytes of data written to an external device via Airdrop. In a typical operational setting, there is usually a predictable pattern or a certain range of data that is written to external devices. An unusually large amount of data being written is anomalous and can signal illicit data copying or transfer activities.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Data Exfiltration Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-2h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/ded" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1011", - "name": "Exfiltration Over Other Network Medium", - "reference": "https://attack.mitre.org/techniques/T1011/" - } - ] - } - ], - "id": "b63dfbcc-5b6e-4f3c-a3f4-14c1de65d4aa", - "rule_id": "e92c99b6-c547-4bb6-b244-2f27394bc849", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "ded", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "ded_high_bytes_written_to_external_device_airdrop" - }, - { - "name": "Spike in Remote File Transfers", - "description": "A machine learning job has detected an abnormal volume of remote files shared on the host indicating potential lateral movement activity. One of the primary goals of attackers after gaining access to a network is to locate and exfiltrate valuable information. Attackers might perform multiple small transfers to match normal egress activity in the network, to evade detection.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Lateral Movement Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Lateral Movement" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-90m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/lmd" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0008", - "name": "Lateral Movement", - "reference": "https://attack.mitre.org/tactics/TA0008/" - }, - "technique": [ - { - "id": "T1210", - "name": "Exploitation of Remote Services", - "reference": "https://attack.mitre.org/techniques/T1210/" - } - ] - } - ], - "id": "41a45493-eb49-4010-bd8f-41aaeecd510e", - "rule_id": "e9b0902b-c515-413b-b80b-a8dcebc81a66", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "lmd", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Lateral Movement Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "lmd_high_count_remote_file_transfer" - }, - { - "name": "Unusual Process Spawned by a Parent Process", - "description": "A machine learning job has detected a suspicious Windows process. This process has been classified as malicious in two ways. It was predicted to be malicious by the ProblemChild supervised ML model, and it was found to be an unusual child process name, for the parent process, by an unsupervised ML model. Such a process may be an instance of suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Living off the Land Attack Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/problemchild", - "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - } - ], - "id": "9ad03ccc-7663-41f5-b3ed-b8edc89bd9de", - "rule_id": "ea09ff26-3902-4c53-bb8e-24b7a5d029dd", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "problemchild", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "problem_child_rare_process_by_parent" - }, - { - "name": "PowerShell Script with Webcam Video Capture Capabilities", - "description": "Detects PowerShell scripts that can be used to record webcam video. Attackers can capture this information to extort or spy on victims.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Collection", - "Data Source: PowerShell Logs", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/EmpireProject/Empire/blob/master/lib/modules/powershell/collection/WebcamRecorder.py" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0009", - "name": "Collection", - "reference": "https://attack.mitre.org/tactics/TA0009/" - }, - "technique": [ - { - "id": "T1125", - "name": "Video Capture", - "reference": "https://attack.mitre.org/techniques/T1125/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "49000a6c-7ef3-4207-b6f7-f6fa2882e686", - "rule_id": "eb44611f-62a8-4036-a5ef-587098be6c43", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"NewFrameEventHandler\" or\n \"VideoCaptureDevice\" or\n \"DirectX.Capture.Filters\" or\n \"VideoCompressors\" or\n \"Start-WebcamRecorder\" or\n (\n (\"capCreateCaptureWindowA\" or\n \"capCreateCaptureWindow\" or\n \"capGetDriverDescription\") and\n (\"avicap32.dll\" or \"avicap32\")\n )\n )\n", - "language": "kuery" - }, - { - "name": "Executable File with Unusual Extension", - "description": "Identifies the creation or modification of an executable file with an unexpected file extension. Attackers may attempt to evade detection by masquerading files using the file extension values used by image, audio, or document file types.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.008", - "name": "Masquerade File Type", - "reference": "https://attack.mitre.org/techniques/T1036/008/" - } - ] - } - ] - } - ], - "id": "2ac8763c-fce6-4fe4-8c25-9c4db446a4d2", - "rule_id": "ecd4857b-5bac-455e-a7c9-a88b66e56a9e", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.Ext.header_bytes", - "type": "unknown", - "ecs": false - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.pid", - "type": "long", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.action != \"deletion\" and\n\n /* MZ header or its common base64 equivalent TVqQ */\n file.Ext.header_bytes : (\"4d5a*\", \"54567151*\") and\n\n (\n /* common image file extensions */\n file.extension : (\"jpg\", \"jpeg\", \"emf\", \"tiff\", \"gif\", \"png\", \"bmp\", \"fpx\", \"eps\", \"svg\", \"inf\") or\n\n /* common audio and video file extensions */\n file.extension : (\"mp3\", \"wav\", \"avi\", \"mpeg\", \"flv\", \"wma\", \"wmv\", \"mov\", \"mp4\", \"3gp\") or\n\n /* common document file extensions */\n file.extension : (\"txt\", \"pdf\", \"doc\", \"docx\", \"rtf\", \"ppt\", \"pptx\", \"xls\", \"xlsx\", \"hwp\", \"html\")\n ) and\n not process.pid == 4 and\n not process.executable : \"?:\\\\Program Files (x86)\\\\Trend Micro\\\\Client Server Security Agent\\\\Ntrtscan.exe\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Shortcut File Written or Modified on Startup Folder", - "description": "Identifies shortcut files written to or modified in the startup folder. Adversaries may use this technique to maintain persistence.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1547", - "name": "Boot or Logon Autostart Execution", - "reference": "https://attack.mitre.org/techniques/T1547/", - "subtechnique": [ - { - "id": "T1547.001", - "name": "Registry Run Keys / Startup Folder", - "reference": "https://attack.mitre.org/techniques/T1547/001/" - }, - { - "id": "T1547.009", - "name": "Shortcut Modification", - "reference": "https://attack.mitre.org/techniques/T1547/009/" - } - ] - } - ] - } - ], - "id": "7ca3d158-0d5e-4579-9ea2-a7d9704e53f9", - "rule_id": "ee53d67a-5f0c-423c-a53c-8084ae562b5c", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "file.extension", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where host.os.type == \"windows\" and event.type != \"deletion\" and file.extension == \"lnk\" and\n file.path : (\n \"C:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup\\\\*\",\n \"C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\StartUp\\\\*\"\n ) and\n not (\n (process.name : \"ONENOTE.EXE\" and process.code_signature.status: \"trusted\" and file.name : \"Send to OneNote.lnk\") or\n (process.name: \"OktaVerifySetup.exe\" and process.code_signature.status: \"trusted\" and file.name : \"Okta Verify.lnk\")\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Potential Data Exfiltration Activity to an Unusual Destination Port", - "description": "A machine learning job has detected data exfiltration to a particular destination port. Data transfer patterns that are outside the normal traffic patterns of an organization could indicate exfiltration over command and control channels.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Data Exfiltration Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Exfiltration" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-6h", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/ded" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0010", - "name": "Exfiltration", - "reference": "https://attack.mitre.org/tactics/TA0010/" - }, - "technique": [ - { - "id": "T1041", - "name": "Exfiltration Over C2 Channel", - "reference": "https://attack.mitre.org/techniques/T1041/" - } - ] - } - ], - "id": "20772cac-2102-4499-8f9b-c93322c36ff6", - "rule_id": "ef8cc01c-fc49-4954-a175-98569c646740", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "ded", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Data Exfiltration Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "ded_high_sent_bytes_destination_port" - }, - { - "name": "Service Path Modification", - "description": "Identifies attempts to modify a service path by an unusual process. Attackers may attempt to modify existing services for persistence or privilege escalation.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Data Source: Elastic Endgame", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1112", - "name": "Modify Registry", - "reference": "https://attack.mitre.org/techniques/T1112/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1543", - "name": "Create or Modify System Process", - "reference": "https://attack.mitre.org/techniques/T1543/", - "subtechnique": [ - { - "id": "T1543.003", - "name": "Windows Service", - "reference": "https://attack.mitre.org/techniques/T1543/003/" - } - ] - } - ] - } - ], - "id": "aa09f6c3-6c0c-4f54-a6b9-df77f6856adf", - "rule_id": "f243fe39-83a4-46f3-a3b6-707557a102df", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "registry.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "registry where host.os.type == \"windows\" and event.type == \"change\" and\n registry.path : (\n \"HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ImagePath\",\n \"\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\ImagePath\"\n ) and not (\n process.executable : (\n \"?:\\\\Program Files\\\\*.exe\",\n \"?:\\\\Program Files (x86)\\\\*.exe\",\n \"?:\\\\Windows\\\\System32\\\\services.exe\",\n \"?:\\\\Windows\\\\WinSxS\\\\*\"\n )\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*", - "endgame-*" - ] - }, - { - "name": "Machine Learning Detected a DNS Request Predicted to be a DGA Domain", - "description": "A supervised machine learning model has identified a DNS question name that is predicted to be the result of a Domain Generation Algorithm (DGA), which could indicate command and control network activity.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Domain: Network", - "Domain: Endpoint", - "Data Source: Elastic Defend", - "Use Case: Domain Generation Algorithm Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Command and Control" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-10m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/dga" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1568", - "name": "Dynamic Resolution", - "reference": "https://attack.mitre.org/techniques/T1568/", - "subtechnique": [ - { - "id": "T1568.002", - "name": "Domain Generation Algorithms", - "reference": "https://attack.mitre.org/techniques/T1568/002/" - } - ] - } - ] - } - ], - "id": "1c747962-1b5e-45c1-894c-04a0d048807a", - "rule_id": "f3403393-1fd9-4686-8f6e-596c58bc00b4", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "dga", - "version": "^2.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [ - { - "name": "dns.question.registered_domain", - "type": "keyword", - "ecs": true - }, - { - "name": "ml_is_dga.malicious_prediction", - "type": "unknown", - "ecs": false - } - ], - "setup": "The Domain Generation Algorithm (DGA) integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "query", - "index": [ - "logs-endpoint.events.*", - "logs-network_traffic.*" - ], - "query": "ml_is_dga.malicious_prediction:1 and not dns.question.registered_domain:avsvmcloud.com\n", - "language": "kuery" - }, - { - "name": "Setcap setuid/setgid Capability Set", - "description": "This rule monitors for the addition of the cap_setuid+ep or cap_setgid+ep capabilities via setcap. Setuid (Set User ID) and setgid (Set Group ID) are Unix-like OS features that enable processes to run with elevated privileges, based on the file owner or group. Threat actors can exploit these attributes to achieve persistence by creating malicious binaries, allowing them to maintain control over a compromised system with elevated permissions.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Linux", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0004", - "name": "Privilege Escalation", - "reference": "https://attack.mitre.org/tactics/TA0004/" - }, - "technique": [ - { - "id": "T1548", - "name": "Abuse Elevation Control Mechanism", - "reference": "https://attack.mitre.org/techniques/T1548/", - "subtechnique": [ - { - "id": "T1548.001", - "name": "Setuid and Setgid", - "reference": "https://attack.mitre.org/techniques/T1548/001/" - } - ] - } - ] - } - ], - "id": "1e73f88b-2f0a-4229-9b4e-f3f7fe8d24bd", - "rule_id": "f5c005d3-4e17-48b0-9cd7-444d48857f97", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "event.type", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "process where host.os.type == \"linux\" and event.action == \"exec\" and event.type == \"start\" and \nprocess.name == \"setcap\" and process.args : \"cap_set?id+ep\"\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Suspicious Windows Process Cluster Spawned by a Parent Process", - "description": "A machine learning job combination has detected a set of one or more suspicious Windows processes with unusually high scores for malicious probability. These process(es) have been classified as malicious in several ways. The process(es) were predicted to be malicious by the ProblemChild supervised ML model. If the anomaly contains a cluster of suspicious processes, each process has the same parent process name, and the aggregate score of the event cluster was calculated to be unusually high by an unsupervised ML model. Such a cluster often contains suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Living off the Land Attack Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Defense Evasion" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/problemchild", - "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/" - } - ] - } - ], - "id": "0af5753d-3f32-4e53-abfa-a9f9cd975dbf", - "rule_id": "f5d9d36d-7c30-4cdb-a856-9f653c13d4e0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "problemchild", - "version": "^2.0.0" - } - ], - "required_fields": [], - "setup": "The Living-off-the-Land (LotL) Detection integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 75, - "machine_learning_job_id": "problem_child_high_sum_by_parent" - }, - { - "name": "Browser Extension Install", - "description": "Identifies the install of browser extensions. Malicious browser extensions can be installed via app store downloads masquerading as legitimate extensions, social engineering, or by an adversary that has already compromised a system.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Persistence", - "Data Source: Elastic Defend", - "Rule Type: BBR" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0003", - "name": "Persistence", - "reference": "https://attack.mitre.org/tactics/TA0003/" - }, - "technique": [ - { - "id": "T1176", - "name": "Browser Extensions", - "reference": "https://attack.mitre.org/techniques/T1176/" - } - ] - } - ], - "id": "d33d7c5f-6750-4800-b6da-24cf7430ef31", - "rule_id": "f97504ac-1053-498f-aeaa-c6d01e76b379", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "file.name", - "type": "keyword", - "ecs": true - }, - { - "name": "file.path", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "file where event.action : \"creation\" and \n(\n /* Firefox-Based Browsers */\n (\n file.name : \"*.xpi\" and\n file.path : \"?:\\\\Users\\\\*\\\\AppData\\\\Roaming\\\\*\\\\Profiles\\\\*\\\\Extensions\\\\*.xpi\"\n ) or\n /* Chromium-Based Browsers */\n (\n file.name : \"*.crx\" and\n file.path : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\*\\\\*\\\\User Data\\\\Webstore Downloads\\\\*\"\n )\n)\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Image Loaded with Invalid Signature", - "description": "Identifies binaries that are loaded and with an invalid code signature. This may indicate an attempt to masquerade as a signed binary.", - "risk_score": 21, - "severity": "low", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1036", - "name": "Masquerading", - "reference": "https://attack.mitre.org/techniques/T1036/", - "subtechnique": [ - { - "id": "T1036.001", - "name": "Invalid Code Signature", - "reference": "https://attack.mitre.org/techniques/T1036/001/" - } - ] - } - ] - } - ], - "id": "d4a8f949-65af-4559-a667-46f732e31a68", - "rule_id": "fd9484f2-1c56-44ae-8b28-dc1354e3a0e8", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "dll.Ext.relative_file_creation_time", - "type": "unknown", - "ecs": false - }, - { - "name": "dll.Ext.relative_file_name_modify_time", - "type": "unknown", - "ecs": false - }, - { - "name": "dll.code_signature.status", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.name", - "type": "keyword", - "ecs": true - }, - { - "name": "dll.path", - "type": "keyword", - "ecs": true - }, - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "library where host.os.type == \"windows\" and event.action == \"load\" and\n dll.code_signature.status : (\"errorUntrustedRoot\", \"errorBadDigest\", \"errorUntrustedRoot\") and\n (dll.Ext.relative_file_creation_time <= 500 or dll.Ext.relative_file_name_modify_time <= 500) and\n not startswith~(dll.name, process.name) and\n not dll.path : (\n \"?:\\\\Windows\\\\System32\\\\DriverStore\\\\FileRepository\\\\*\"\n )\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "PowerShell Kerberos Ticket Dump", - "description": "Detects PowerShell scripts that have the capability of dumping Kerberos tickets from LSA, which potentially indicates an attacker's attempt to acquire credentials for lateral movement.", - "risk_score": 47, - "severity": "medium", - "timestamp_override": "event.ingested", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Credential Access", - "Data Source: PowerShell Logs" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "5m", - "from": "now-9m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://github.com/MzHmO/PowershellKerberos/blob/main/dumper.ps1" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0006", - "name": "Credential Access", - "reference": "https://attack.mitre.org/tactics/TA0006/" - }, - "technique": [ - { - "id": "T1003", - "name": "OS Credential Dumping", - "reference": "https://attack.mitre.org/techniques/T1003/" - }, - { - "id": "T1558", - "name": "Steal or Forge Kerberos Tickets", - "reference": "https://attack.mitre.org/techniques/T1558/" - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [ - { - "id": "T1059", - "name": "Command and Scripting Interpreter", - "reference": "https://attack.mitre.org/techniques/T1059/", - "subtechnique": [ - { - "id": "T1059.001", - "name": "PowerShell", - "reference": "https://attack.mitre.org/techniques/T1059/001/" - } - ] - } - ] - } - ], - "id": "0aeff3ef-6511-4b09-818e-0edac4a604e1", - "rule_id": "fddff193-48a3-484d-8d35-90bb3d323a56", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "windows", - "version": "^1.5.0" - } - ], - "required_fields": [ - { - "name": "event.category", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "powershell.file.script_block_text", - "type": "unknown", - "ecs": false - } - ], - "setup": "The 'PowerShell Script Block Logging' logging policy must be enabled.\nSteps to implement the logging policy with Advanced Audit Configuration:\n\n```\nComputer Configuration >\nAdministrative Templates >\nWindows PowerShell >\nTurn on PowerShell Script Block Logging (Enable)\n```\n\nSteps to implement the logging policy via registry:\n\n```\nreg add \"hklm\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\" /v EnableScriptBlockLogging /t REG_DWORD /d 1\n```", - "type": "query", - "index": [ - "winlogbeat-*", - "logs-windows.*" - ], - "query": "event.category:process and host.os.type:windows and\n powershell.file.script_block_text : (\n \"LsaCallAuthenticationPackage\" and\n (\n \"KerbRetrieveEncodedTicketMessage\" or\n \"KerbQueryTicketCacheMessage\" or\n \"KerbQueryTicketCacheExMessage\" or\n \"KerbQueryTicketCacheEx2Message\" or\n \"KerbRetrieveTicketMessage\" or\n \"KerbDecryptDataMessage\"\n )\n )\n", - "language": "kuery" - }, - { - "name": "Execution via MS VisualStudio Pre/Post Build Events", - "description": "Identifies the execution of a command via Microsoft Visual Studio Pre or Post build events. Adversaries may backdoor a trusted visual studio project to execute a malicious command during the project build process.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "building_block_type": "default", - "version": 1, - "tags": [ - "Domain: Endpoint", - "OS: Windows", - "Use Case: Threat Detection", - "Tactic: Defense Evasion", - "Tactic: Execution", - "Rule Type: BBR", - "Data Source: Elastic Defend" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "60m", - "from": "now-119m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://docs.microsoft.com/en-us/visualstudio/ide/reference/pre-build-event-post-build-event-command-line-dialog-box?view=vs-2022", - "https://www.pwc.com/gx/en/issues/cybersecurity/cyber-threat-intelligence/threat-actor-of-in-tur-est.html", - "https://blog.google/threat-analysis-group/new-campaign-targeting-security-researchers/", - "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Execution/execution_evasion_visual_studio_prebuild_event.evtx" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0005", - "name": "Defense Evasion", - "reference": "https://attack.mitre.org/tactics/TA0005/" - }, - "technique": [ - { - "id": "T1127", - "name": "Trusted Developer Utilities Proxy Execution", - "reference": "https://attack.mitre.org/techniques/T1127/", - "subtechnique": [ - { - "id": "T1127.001", - "name": "MSBuild", - "reference": "https://attack.mitre.org/techniques/T1127/001/" - } - ] - } - ] - }, - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0002", - "name": "Execution", - "reference": "https://attack.mitre.org/tactics/TA0002/" - }, - "technique": [] - } - ], - "id": "6c2be321-b075-4062-8b6c-5191cc19ed25", - "rule_id": "fec7ccb7-6ed9-4f98-93ab-d6b366b063a0", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "endpoint", - "version": "^8.2.0" - } - ], - "required_fields": [ - { - "name": "event.action", - "type": "keyword", - "ecs": true - }, - { - "name": "host.os.type", - "type": "keyword", - "ecs": true - }, - { - "name": "process.args", - "type": "keyword", - "ecs": true - }, - { - "name": "process.command_line", - "type": "wildcard", - "ecs": true - }, - { - "name": "process.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.executable", - "type": "keyword", - "ecs": true - }, - { - "name": "process.name", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.entity_id", - "type": "keyword", - "ecs": true - }, - { - "name": "process.parent.name", - "type": "keyword", - "ecs": true - } - ], - "setup": "", - "type": "eql", - "query": "sequence with maxspan=1m\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.name : \"cmd.exe\" and process.parent.name : \"MSBuild.exe\" and\n process.args : \"?:\\\\Users\\\\*\\\\AppData\\\\Local\\\\Temp\\\\tmp*.exec.cmd\"] by process.entity_id\n [process where host.os.type == \"windows\" and event.action == \"start\" and\n process.name : (\n \"cmd.exe\", \"powershell.exe\",\n \"MSHTA.EXE\", \"CertUtil.exe\",\n \"CertReq.exe\", \"rundll32.exe\",\n \"regsvr32.exe\", \"MSbuild.exe\",\n \"cscript.exe\", \"wscript.exe\",\n \"installutil.exe\"\n ) and\n not \n (\n process.name : (\"cmd.exe\", \"powershell.exe\") and\n process.args : (\n \"*\\\\vcpkg\\\\scripts\\\\buildsystems\\\\msbuild\\\\applocal.ps1\",\n \"HKLM\\\\SOFTWARE\\\\Microsoft\\\\VisualStudio\\\\SxS\\\\VS?\",\n \"process.versions.node*\",\n \"?:\\\\Program Files\\\\nodejs\\\\node.exe\",\n \"HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\MSBuild\\\\ToolsVersions\\\\*\",\n \"*Get-ChildItem*Tipasplus.css*\",\n \"Build\\\\GenerateResourceScripts.ps1\",\n \"Shared\\\\Common\\\\..\\\\..\\\\BuildTools\\\\ConfigBuilder.ps1\\\"\",\n \"?:\\\\Projets\\\\*\\\\PostBuild\\\\MediaCache.ps1\"\n )\n ) and\n not process.executable : \"?:\\\\Program Files*\\\\Microsoft Visual Studio\\\\*\\\\MSBuild.exe\" and\n not (process.name : \"cmd.exe\" and\n process.command_line :\n (\"*vswhere.exe -property catalog_productSemanticVersion*\",\n \"*git log --pretty=format*\", \"*\\\\.nuget\\\\packages\\\\vswhere\\\\*\",\n \"*Common\\\\..\\\\..\\\\BuildTools\\\\*\"))\n ] by process.parent.entity_id\n", - "language": "eql", - "index": [ - "logs-endpoint.events.*" - ] - }, - { - "name": "Potential DGA Activity", - "description": "A population analysis machine learning job detected potential DGA (domain generation algorithm) activity. Such activity is often used by malware command and control (C2) channels. This machine learning job looks for a source IP address making DNS requests that have an aggregate high probability of being DGA activity.", - "risk_score": 21, - "severity": "low", - "license": "Elastic License v2", - "note": "", - "version": 1, - "tags": [ - "Use Case: Domain Generation Algorithm Detection", - "Rule Type: ML", - "Rule Type: Machine Learning", - "Tactic: Command and Control" - ], - "enabled": false, - "risk_score_mapping": [], - "severity_mapping": [], - "interval": "15m", - "from": "now-45m", - "to": "now", - "actions": [], - "exceptions_list": [], - "author": [ - "Elastic" - ], - "false_positives": [], - "references": [ - "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html", - "https://docs.elastic.co/en/integrations/dga" - ], - "max_signals": 100, - "threat": [ - { - "framework": "MITRE ATT&CK", - "tactic": { - "id": "TA0011", - "name": "Command and Control", - "reference": "https://attack.mitre.org/tactics/TA0011/" - }, - "technique": [ - { - "id": "T1568", - "name": "Dynamic Resolution", - "reference": "https://attack.mitre.org/techniques/T1568/" - } - ] - } - ], - "id": "1b1b2bab-de71-4842-95ac-50c1138e0aac", - "rule_id": "ff0d807d-869b-4a0d-a493-52bc46d2f1b1", - "immutable": true, - "updated_at": "1970-01-01T00:00:00.000Z", - "updated_by": "", - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - "revision": 1, - "related_integrations": [ - { - "package": "dga", - "version": "^2.0.0" - }, - { - "package": "endpoint", - "version": "^8.2.0" - }, - { - "package": "network_traffic", - "version": "^1.1.0" - } - ], - "required_fields": [], - "setup": "The Domain Generation Algorithm (DGA) integration must be enabled and related ML jobs configured for this rule to be effective. Please refer to this rule's references for more information.", - "type": "machine_learning", - "anomaly_threshold": 70, - "machine_learning_job_id": "dga_high_sum_probability" - } - ] -} From edfc4cdf01e0158781c8d13487fa061034be93b1 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 27 Nov 2023 18:40:51 +0000 Subject: [PATCH 7/9] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- package.json | 2 +- .../rule_management/components/rule_details/rule_diff_tab.tsx | 3 ++- .../rule_details/rule_diff_tab_app_experience_team_poc.tsx | 3 ++- .../components/rule_details/rule_diff_tab_diff2html.tsx | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 273efb69af50d..3d3e286079c9f 100644 --- a/package.json +++ b/package.json @@ -1648,4 +1648,4 @@ "yargs": "^15.4.1", "yarn-deduplicate": "^6.0.2" } -} +} \ No newline at end of file diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx index 6b3b6d05ba004..e7f5f814b89a7 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx @@ -6,7 +6,8 @@ */ import React, { useMemo } from 'react'; -import { Change, diffLines } from 'diff'; +import type { Change } from 'diff'; +import { diffLines } from 'diff'; import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; import { EuiSpacer, useEuiBackgroundColor, tint } from '@elastic/eui'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx index f92ebd24a1ca0..ad56a74e8461d 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx @@ -9,7 +9,8 @@ import React, { useState, useMemo } from 'react'; import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; import { get } from 'lodash'; -import { Change, diffLines } from 'diff'; +import type { Change } from 'diff'; +import { diffLines } from 'diff'; import { EuiSpacer, EuiAccordion, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx index 3b996215371ce..29aff8a6ba7cc 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx @@ -153,7 +153,7 @@ const WholeObjectDiff = ({ toggleSection('whole'); }} > -
+
From dc6c2cfa3fe983646bb10c9ac77baa467ef7c5b6 Mon Sep 17 00:00:00 2001 From: Georgii Gorbachev Date: Wed, 29 Nov 2023 03:20:20 +0100 Subject: [PATCH 8/9] Remove unnecessary code, such as rendering individual fields --- .../json_diff/sort_stringify_json.ts | 11 + .../components/rule_details/rule_diff_tab.tsx | 142 ----------- .../rule_diff_tab_app_experience_team_poc.tsx | 218 ++++------------ .../rule_details/rule_diff_tab_diff2html.tsx | 200 +++------------ .../rule_details/rule_diff_tab_monaco.tsx | 224 +++-------------- .../rule_diff_tab_react_diff_view.tsx | 187 ++------------ ...e_diff_tab_react_diff_viewer_continued.tsx | 232 ++++-------------- .../components/rule_details/translations.ts | 7 - .../upgrade_prebuilt_rules_table_context.tsx | 7 - 9 files changed, 186 insertions(+), 1042 deletions(-) create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/json_diff/sort_stringify_json.ts delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/json_diff/sort_stringify_json.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/json_diff/sort_stringify_json.ts new file mode 100644 index 0000000000000..a5b40bfea7695 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/json_diff/sort_stringify_json.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import stringify from 'json-stable-stringify'; + +export const sortAndStringifyJson = (jsObject: Record): string => + stringify(jsObject, { space: 2 }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx deleted file mode 100644 index e7f5f814b89a7..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useMemo } from 'react'; -import type { Change } from 'diff'; -import { diffLines } from 'diff'; -import { css } from '@emotion/react'; -import { euiThemeVars } from '@kbn/ui-theme'; -import { EuiSpacer, useEuiBackgroundColor, tint } from '@elastic/eui'; -import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; - -const indicatorCss = css` - position: absolute; - width: ${euiThemeVars.euiSizeS}; - height: 100%; - margin-left: calc(-${euiThemeVars.euiSizeS} - calc(${euiThemeVars.euiSizeXS} / 2)); - text-align: center; - line-height: ${euiThemeVars.euiFontSizeM}; - font-weight: ${euiThemeVars.euiFontWeightMedium}; -`; - -const matchIndicatorCss = css` - &:before { - content: '+'; - ${indicatorCss} - background-color: ${euiThemeVars.euiColorSuccess}; - color: ${euiThemeVars.euiColorLightestShade}; - } -`; - -const diffIndicatorCss = css` - &:before { - content: '-'; - ${indicatorCss} - background-color: ${tint(euiThemeVars.euiColorDanger, 0.25)}; - color: ${euiThemeVars.euiColorLightestShade}; - } -`; - -const DiffSegment = ({ - change, - diffMode, - showDiffDecorations, -}: { - change: Change; - diffMode: 'lines' | undefined; - showDiffDecorations: boolean | undefined; -}) => { - const matchBackgroundColor = useEuiBackgroundColor('success'); - const diffBackgroundColor = useEuiBackgroundColor('danger'); - - const matchCss = css` - background-color: ${matchBackgroundColor}; - color: ${euiThemeVars.euiColorSuccessText}; - `; - const diffCss = css` - background-color: ${diffBackgroundColor}; - color: ${euiThemeVars.euiColorDangerText}; - `; - - const highlightCss = useMemo( - () => (change.added ? matchCss : change.removed ? diffCss : undefined), - [change.added, change.removed, diffCss, matchCss] - ); - - const paddingCss = useMemo(() => { - if (diffMode === 'lines') { - return css` - padding-left: calc(${euiThemeVars.euiSizeXS} / 2); - `; - } - }, [diffMode]); - - const decorationCss = useMemo(() => { - if (!showDiffDecorations) { - return undefined; - } - - if (diffMode === 'lines') { - if (change.added) { - return matchIndicatorCss; - } else if (change.removed) { - return diffIndicatorCss; - } - } else { - if (change.added) { - return css` - text-decoration: underline; - `; - } else if (change.removed) { - return css` - text-decoration: line-through; - `; - } - } - }, [change.added, change.removed, diffMode, showDiffDecorations]); - - return ( -
- {change.value} -
- ); -}; - -interface RuleDiffTabProps { - fields: RuleFieldsDiff; -} - -export const RuleDiffTab = ({ fields }: RuleDiffTabProps) => { - const diff = diffLines( - JSON.stringify(fields.references.current_version, null, 2), - JSON.stringify(fields.references.merged_version, null, 2), - { ignoreWhitespace: false } - ); - - return ( - <> - - {diff.map((change, i) => ( - - ))} - - ); -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx index ad56a74e8461d..474933a4ec970 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx @@ -5,26 +5,53 @@ * 2.0. */ -import React, { useState, useMemo } from 'react'; +import React, { useMemo } from 'react'; import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; -import { get } from 'lodash'; import type { Change } from 'diff'; import { diffLines } from 'diff'; -import { - EuiSpacer, - EuiAccordion, - EuiTitle, - EuiFlexGroup, - EuiHorizontalRule, - useGeneratedHtmlId, - useEuiBackgroundColor, - tint, -} from '@elastic/eui'; -import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; +import { EuiSpacer, useEuiBackgroundColor, tint } from '@elastic/eui'; import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; +import { sortAndStringifyJson } from './json_diff/sort_stringify_json'; -const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; +interface RuleDiffTabProps { + oldRule: RuleResponse; + newRule: RuleResponse; +} + +export const RuleDiffTabAppExperienceTeamPoc = ({ oldRule, newRule }: RuleDiffTabProps) => { + const diff = useDiff(oldRule, newRule); + + return ( + <> + + {diff.map((change, i) => ( + + ))} + + ); +}; + +const useDiff = (oldRule: RuleResponse, newRule: RuleResponse) => { + const memoizedDiff = useMemo(() => { + const oldSource = sortAndStringifyJson(oldRule); + const newSource = sortAndStringifyJson(newRule); + + return diffLines(JSON.stringify(oldSource), JSON.stringify(newSource), { + ignoreWhitespace: false, + }); + }, [oldRule, newRule]); + + return memoizedDiff; +}; + +// ------------------------------------------------------------------------------------------------- +// DiffSegment component const indicatorCss = css` position: absolute; @@ -125,166 +152,3 @@ const DiffSegment = ({
); }; - -interface FieldsProps { - fields: Partial; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { - const visibleFields = Object.keys(fields).filter( - (fieldName) => !HIDDEN_FIELDS.includes(fieldName) - ); - - return ( - <> - {visibleFields.map((fieldName) => { - const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); - const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); - - const oldSource = JSON.stringify(currentVersion, null, 2); - const newSource = JSON.stringify(mergedVersion, null, 2); - - const diff = diffLines(oldSource, newSource, { ignoreWhitespace: false }); - - return ( - <> - { - toggleSection(fieldName); - }} - > - <> - - {diff.map((change, i) => ( - - ))} - - - - - ); - })} - - ); -}; - -interface ExpandableSectionProps { - title: string; - isOpen: boolean; - toggle: () => void; - children: React.ReactNode; -} - -const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { - const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); - - return ( - -

{title}

- - } - initialIsOpen={true} - > - - - {children} - -
- ); -}; - -const sortAndStringifyJson = (jsObject: Record): string => - JSON.stringify(jsObject, Object.keys(jsObject).sort(), 2); - -interface WholeObjectDiffProps { - oldRule: RuleResponse; - newRule: RuleResponse; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const WholeObjectDiff = ({ - oldRule, - newRule, - openSections, - toggleSection, -}: WholeObjectDiffProps) => { - const oldSource = sortAndStringifyJson(oldRule); - const newSource = sortAndStringifyJson(newRule); - - const diff = diffLines(JSON.stringify(oldSource), JSON.stringify(newSource), { - ignoreWhitespace: false, - }); - - return ( - <> - { - toggleSection('whole'); - }} - > - <> - - {diff.map((change, i) => ( - - ))} - - - - - ); -}; - -interface RuleDiffTabProps { - oldRule: RuleResponse; - newRule: RuleResponse; - fields: Partial; -} - -export const RuleDiffTabAppExperienceTeamPoc = ({ fields, oldRule, newRule }: RuleDiffTabProps) => { - const [openSections, setOpenSections] = useState>( - Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) - ); - - const toggleSection = (sectionName: string) => { - setOpenSections((prevOpenSections) => ({ - ...prevOpenSections, - [sectionName]: !prevOpenSections[sectionName], - })); - }; - - return ( - <> - - - - - ); -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx index 29aff8a6ba7cc..e2c669c4c967e 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx @@ -5,189 +5,51 @@ * 2.0. */ -import React, { useState } from 'react'; +import React, { useMemo } from 'react'; import * as Diff2Html from 'diff2html'; -import { get } from 'lodash'; import { formatLines, diffLines } from 'unidiff'; import 'diff2html/bundles/css/diff2html.min.css'; -import { - EuiSpacer, - EuiAccordion, - EuiTitle, - EuiFlexGroup, - EuiHorizontalRule, - useGeneratedHtmlId, -} from '@elastic/eui'; -import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; +import { EuiSpacer } from '@elastic/eui'; import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; - -const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; - -interface FieldsProps { - fields: Partial; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { - const visibleFields = Object.keys(fields).filter( - (fieldName) => !HIDDEN_FIELDS.includes(fieldName) - ); - - return ( - <> - {visibleFields.map((fieldName) => { - const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); - const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); - - const oldSource = JSON.stringify(currentVersion, null, 2); - const newSource = JSON.stringify(mergedVersion, null, 2); - - const unifiedDiffString = formatLines(diffLines(oldSource, newSource), { context: 3 }); - - const diffHtml = Diff2Html.html(unifiedDiffString, { - inputFormat: 'json', - drawFileList: false, - fileListToggle: false, - fileListStartVisible: false, - fileContentToggle: false, - matching: 'lines', // "lines" or "words" - diffStyle: 'word', // "word" or "char" - outputFormat: 'side-by-side', - synchronisedScroll: true, - highlight: true, - renderNothingWhenEmpty: false, - }); - - return ( - <> - { - toggleSection(fieldName); - }} - > -
- - - - ); - })} - - ); -}; - -interface ExpandableSectionProps { - title: string; - isOpen: boolean; - toggle: () => void; - children: React.ReactNode; -} - -const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { - const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); - - return ( - -

{title}

- - } - initialIsOpen={true} - > - - - {children} - -
- ); -}; - -const sortAndStringifyJson = (jsObject: Record): string => - JSON.stringify(jsObject, Object.keys(jsObject).sort(), 2); - -interface WholeObjectDiffProps { - oldRule: RuleResponse; - newRule: RuleResponse; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const WholeObjectDiff = ({ - oldRule, - newRule, - openSections, - toggleSection, -}: WholeObjectDiffProps) => { - const unifiedDiffString = formatLines( - diffLines(sortAndStringifyJson(oldRule), sortAndStringifyJson(newRule)), - { context: 3 } - ); - - const diffHtml = Diff2Html.html(unifiedDiffString, { - inputFormat: 'json', - drawFileList: false, - fileListToggle: false, - fileListStartVisible: false, - fileContentToggle: false, - matching: 'lines', // "lines" or "words" - diffStyle: 'word', // "word" or "char" - outputFormat: 'side-by-side', - synchronisedScroll: true, - highlight: true, - renderNothingWhenEmpty: false, - }); - - return ( - <> - { - toggleSection('whole'); - }} - > -
- - - - ); -}; +import { sortAndStringifyJson } from './json_diff/sort_stringify_json'; interface RuleDiffTabProps { oldRule: RuleResponse; newRule: RuleResponse; - fields: Partial; } -export const RuleDiffTabDiff2Html = ({ fields, oldRule, newRule }: RuleDiffTabProps) => { - const [openSections, setOpenSections] = useState>( - Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) - ); - - const toggleSection = (sectionName: string) => { - setOpenSections((prevOpenSections) => ({ - ...prevOpenSections, - [sectionName]: !prevOpenSections[sectionName], - })); - }; +export const RuleDiffTabDiff2Html = ({ oldRule, newRule }: RuleDiffTabProps) => { + const diffHtml = useDiffHtml(oldRule, newRule); return ( <> - - +
); }; + +const useDiffHtml = (oldRule: RuleResponse, newRule: RuleResponse): string => { + const memoizedDiffHtml = useMemo(() => { + const unifiedDiffString = formatLines( + diffLines(sortAndStringifyJson(oldRule), sortAndStringifyJson(newRule)), + { context: 3 } + ); + + return Diff2Html.html(unifiedDiffString, { + inputFormat: 'json', + drawFileList: false, + fileListToggle: false, + fileListStartVisible: false, + fileContentToggle: false, + matching: 'lines', // "lines" or "words" + diffStyle: 'word', // "word" or "char" + outputFormat: 'side-by-side', + synchronisedScroll: true, + highlight: true, + renderNothingWhenEmpty: false, + }); + }, [oldRule, newRule]); + + return memoizedDiffHtml; +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx index f32a9287d3a31..98e2926256452 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx @@ -5,211 +5,53 @@ * 2.0. */ -import React, { useState } from 'react'; +import React, { useMemo } from 'react'; import { CodeEditorField } from '@kbn/kibana-react-plugin/public'; import { XJsonLang } from '@kbn/monaco'; -import { get } from 'lodash'; -import { - EuiSpacer, - EuiAccordion, - EuiTitle, - EuiFlexGroup, - EuiHorizontalRule, - useGeneratedHtmlId, -} from '@elastic/eui'; -import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; +import { EuiSpacer } from '@elastic/eui'; import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; - -const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; - -const sortAndStringifyJson = (jsObject: Record): string => - JSON.stringify(jsObject, Object.keys(jsObject).sort(), 2); - -interface WholeObjectDiffProps { - oldRule: RuleResponse; - newRule: RuleResponse; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const WholeObjectDiff = ({ - oldRule, - newRule, - openSections, - toggleSection, -}: WholeObjectDiffProps) => { - return ( - <> - { - toggleSection('whole'); - }} - > - - - - - ); -}; - -interface FieldsProps { - fields: Partial; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { - const visibleFields = Object.keys(fields).filter( - (fieldName) => !HIDDEN_FIELDS.includes(fieldName) - ); - - return ( - <> - {visibleFields.map((fieldName) => { - const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); - const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); - - const oldSource = JSON.stringify(currentVersion, null, 2); - const newSource = JSON.stringify(mergedVersion, null, 2); - - return ( - <> - { - toggleSection(fieldName); - }} - > - - - - - ); - })} - - ); -}; - -interface ExpandableSectionProps { - title: string; - isOpen: boolean; - toggle: () => void; - children: React.ReactNode; -} - -const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { - const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); - - return ( - -

{title}

- - } - initialIsOpen={true} - > - - - {children} - -
- ); -}; +import { sortAndStringifyJson } from './json_diff/sort_stringify_json'; interface RuleDiffTabProps { oldRule: RuleResponse; newRule: RuleResponse; - fields: Partial; } -export const RuleDiffTabMonaco = ({ fields, oldRule, newRule }: RuleDiffTabProps) => { - const [openSections, setOpenSections] = useState>( - Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) - ); - - const toggleSection = (sectionName: string) => { - setOpenSections((prevOpenSections) => ({ - ...prevOpenSections, - [sectionName]: !prevOpenSections[sectionName], - })); - }; +export const RuleDiffTabMonaco = ({ oldRule, newRule }: RuleDiffTabProps) => { + const [oldRuleString, newRuleString] = useMemo(() => { + return [sortAndStringifyJson(oldRule), sortAndStringifyJson(newRule)]; + }, [oldRule, newRule]); return ( <> - - ); }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx index f6023348948ba..4d4d20fc20778 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useState, useMemo, useContext, useCallback } from 'react'; +import React, { useState, useMemo, useCallback } from 'react'; import type { ReactElement } from 'react'; import { css, Global } from '@emotion/react'; import { @@ -22,27 +22,10 @@ import { import 'react-diff-view/style/index.css'; import type { RenderGutter, HunkData, DecorationProps, TokenizeOptions } from 'react-diff-view'; import unidiff from 'unidiff'; -import { get } from 'lodash'; -import { - EuiSpacer, - EuiAccordion, - EuiIcon, - EuiLink, - EuiTitle, - EuiFlexGroup, - EuiHorizontalRule, - useGeneratedHtmlId, - useEuiTheme, - EuiSwitch, - EuiRadioGroup, -} from '@elastic/eui'; -import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; +import { EuiSpacer, EuiIcon, EuiLink, useEuiTheme, EuiSwitch, EuiRadioGroup } from '@elastic/eui'; import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; import { markEditsBy, DiffMethod } from './mark_edits_by_word'; - -const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; - -const CompareMethodContext = React.createContext(DiffMethod.CHARS); +import { sortAndStringifyJson } from './json_diff/sort_stringify_json'; interface UnfoldProps extends Omit { start: number; @@ -158,7 +141,7 @@ const useExpand = (hunks: HunkData[], oldSource: string, newSource: string) => { }; }; -const useTokens = (hunks: HunkData[], compareMethod: DiffMethod, oldSource: string) => { +const useTokens = (hunks: HunkData[], diffMethod: DiffMethod, oldSource: string) => { if (!hunks) { return undefined; } @@ -168,12 +151,12 @@ const useTokens = (hunks: HunkData[], compareMethod: DiffMethod, oldSource: stri highlight: false, enhancers: [ /* - "markEditsBy" is a slightly modified version of "markEdits" enhancer from react-diff-view + "markEditsBy" is a slightly modified version of "markEdits" enhancer from react-diff-view to enable word-level highlighting. */ - compareMethod === DiffMethod.CHARS + diffMethod === DiffMethod.CHARS ? markEdits(hunks, { type: 'block' }) // Using built-in "markEdits" enhancer for char-level diffing - : markEditsBy(hunks, compareMethod), // Using custom "markEditsBy" enhancer for other-level diffing + : markEditsBy(hunks, diffMethod), // Using custom "markEditsBy" enhancer for other-level diffing ], }; @@ -191,7 +174,7 @@ const useTokens = (hunks: HunkData[], compareMethod: DiffMethod, oldSource: stri }; const convertToDiffFile = (oldSource: string, newSource: string) => { - /* + /* "diffLines" call below converts two strings of text into an array of Change objects. Change objects look like this: [ @@ -258,6 +241,7 @@ const convertToDiffFile = (oldSource: string, newSource: string) => { interface DiffViewProps { oldSource: string; newSource: string; + diffMethod: DiffMethod; } interface HunksProps { @@ -349,9 +333,7 @@ const CustomStyles = ({ children }: CustomStylesProps) => { ); }; -function DiffView({ oldSource, newSource }: DiffViewProps) { - const compareMethod = useContext(CompareMethodContext); - +function DiffView({ oldSource, newSource, diffMethod }: DiffViewProps) { /* "react-diff-view" components consume diffs not as a strings, but as something they call "hunks". So we first need to convert our "before" and "after" strings into these "hunks". @@ -363,7 +345,7 @@ function DiffView({ oldSource, newSource }: DiffViewProps) { */ const diffFile = useMemo(() => convertToDiffFile(oldSource, newSource), [oldSource, newSource]); - /* + /* Sections of diff without changes are hidden by default, because they are not present in the "hunks" array. "useExpand" allows to show these hidden sections when user clicks on "Expand hidden lines" button. @@ -378,15 +360,15 @@ function DiffView({ oldSource, newSource }: DiffViewProps) { Here we go over each hunk and extract tokens from it. For example, splitting strings into words, so we can later highlight changes on a word-by-word basis vs line-by-line. */ - const tokens = useTokens(hunks, compareMethod, oldSource); + const tokens = useTokens(hunks, diffMethod, oldSource); return ( ; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { - const visibleFields = Object.keys(fields).filter( - (fieldName) => !HIDDEN_FIELDS.includes(fieldName) - ); - - return ( - <> - {visibleFields.map((fieldName) => { - const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); - const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); - - const oldSource = JSON.stringify(currentVersion, null, 2); - const newSource = JSON.stringify(mergedVersion, null, 2); - - return ( - <> - { - toggleSection(fieldName); - }} - > - - - - - ); - })} - - ); -}; - -interface ExpandableSectionProps { - title: string; - isOpen: boolean; - toggle: () => void; - children: React.ReactNode; -} - -const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { - const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); - - return ( - -

{title}

- - } - initialIsOpen={true} - > - - - {children} - -
- ); -}; - const renderGutter: RenderGutter = ({ change }) => { - /* + /* Custom gutter (a column where you normally see line numbers). Here's I am returning "+" or "-" so the diff is more readable by colorblind people. */ @@ -490,59 +402,12 @@ const renderGutter: RenderGutter = ({ change }) => { } }; -const sortAndStringifyJson = (jsObject: Record): string => - JSON.stringify(jsObject, Object.keys(jsObject).sort(), 2); - -interface WholeObjectDiffProps { - oldRule: RuleResponse; - newRule: RuleResponse; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const WholeObjectDiff = ({ - oldRule, - newRule, - openSections, - toggleSection, -}: WholeObjectDiffProps) => { - const oldSource = sortAndStringifyJson(oldRule); - const newSource = sortAndStringifyJson(newRule); - - return ( - <> - { - toggleSection('whole'); - }} - > - - - - - ); -}; - interface RuleDiffTabProps { oldRule: RuleResponse; newRule: RuleResponse; - fields: Partial; } -export const RuleDiffTabReactDiffView = ({ fields, oldRule, newRule }: RuleDiffTabProps) => { - const [openSections, setOpenSections] = useState>( - Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) - ); - - const toggleSection = (sectionName: string) => { - setOpenSections((prevOpenSections) => ({ - ...prevOpenSections, - [sectionName]: !prevOpenSections[sectionName], - })); - }; - +export const RuleDiffTabReactDiffView = ({ oldRule, newRule }: RuleDiffTabProps) => { const options = [ { id: DiffMethod.CHARS, @@ -566,16 +431,20 @@ export const RuleDiffTabReactDiffView = ({ fields, oldRule, newRule }: RuleDiffT }, ]; - const [compareMethod, setCompareMethod] = useState(DiffMethod.CHARS); + const [diffMethod, setDiffMethod] = useState(DiffMethod.CHARS); + + const [oldSource, newSource] = useMemo(() => { + return [sortAndStringifyJson(oldRule), sortAndStringifyJson(newRule)]; + }, [oldRule, newRule]); return ( <> { - setCompareMethod(optionId as DiffMethod); + setDiffMethod(optionId as DiffMethod); }} legend={{ children: {'Diffing algorthm'}, @@ -583,15 +452,7 @@ export const RuleDiffTabReactDiffView = ({ fields, oldRule, newRule }: RuleDiffT /> - - - - + ); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx index 1ec4a48dcfd40..969e1fe6410c5 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued.tsx @@ -5,117 +5,14 @@ * 2.0. */ -import React, { useState, useContext } from 'react'; +import React, { useState, useContext, useMemo } from 'react'; import ReactDiffViewer, { DiffMethod } from 'react-diff-viewer-continued'; -import { get } from 'lodash'; -import { - EuiSpacer, - EuiAccordion, - EuiTitle, - EuiFlexGroup, - EuiSwitch, - EuiHorizontalRule, - EuiRadioGroup, - useGeneratedHtmlId, - useEuiTheme, -} from '@elastic/eui'; -import type { RuleFieldsDiff } from '../../../../../common/api/detection_engine/prebuilt_rules/model/diff/rule_diff/rule_diff'; +import { EuiSpacer, EuiSwitch, EuiRadioGroup, useEuiTheme } from '@elastic/eui'; import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; - -const HIDDEN_FIELDS = ['meta', 'rule_schedule', 'version']; +import { sortAndStringifyJson } from './json_diff/sort_stringify_json'; const CustomStylesContext = React.createContext({}); -const CompareMethodContext = React.createContext(DiffMethod.CHARS); - -interface FieldsProps { - fields: Partial; - openSections: Record; - toggleSection: (sectionName: string) => void; -} - -const Fields = ({ fields, openSections, toggleSection }: FieldsProps) => { - const styles = useContext(CustomStylesContext); - const compareMethod = useContext(CompareMethodContext); - - const visibleFields = Object.keys(fields).filter( - (fieldName) => !HIDDEN_FIELDS.includes(fieldName) - ); - - return ( - <> - {visibleFields.map((fieldName) => { - const currentVersion: string = get(fields, [fieldName, 'current_version'], ''); - const mergedVersion: string = get(fields, [fieldName, 'merged_version'], ''); - - const oldSource = - compareMethod === DiffMethod.JSON && typeof currentVersion === 'object' - ? currentVersion - : JSON.stringify(currentVersion, null, 2); - - const newSource = - compareMethod === DiffMethod.JSON && typeof currentVersion === 'object' - ? mergedVersion - : JSON.stringify(mergedVersion, null, 2); - - return ( - <> - { - toggleSection(fieldName); - }} - > - - - - - ); - })} - - ); -}; - -interface ExpandableSectionProps { - title: string; - isOpen: boolean; - toggle: () => void; - children: React.ReactNode; -} - -const ExpandableSection = ({ title, isOpen, toggle, children }: ExpandableSectionProps) => { - const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); - - return ( - -

{title}

- - } - initialIsOpen={true} - > - - - {children} - -
- ); -}; - -const sortAndStringifyJson = (jsObject: Record): string => - JSON.stringify(jsObject, Object.keys(jsObject).sort(), 2); +const DiffMethodContext = React.createContext(DiffMethod.CHARS); interface CustomStylesProps { children: React.ReactNode; @@ -161,90 +58,59 @@ const CustomStyles = ({ children }: CustomStylesProps) => { interface WholeObjectDiffProps { oldRule: RuleResponse; newRule: RuleResponse; - openSections: Record; - toggleSection: (sectionName: string) => void; } -const WholeObjectDiff = ({ - oldRule, - newRule, - openSections, - toggleSection, -}: WholeObjectDiffProps) => { - const compareMethod = useContext(CompareMethodContext); +const WholeObjectDiff = ({ oldRule, newRule }: WholeObjectDiffProps) => { + const diffMethod = useContext(DiffMethodContext); + const styles = useContext(CustomStylesContext); - const oldSource = - compareMethod === DiffMethod.JSON && typeof oldRule === 'object' - ? oldRule - : sortAndStringifyJson(oldRule); + const [oldSource, newSource] = useMemo(() => { + const oldSrc = + diffMethod === DiffMethod.JSON && typeof oldRule === 'object' + ? oldRule + : sortAndStringifyJson(oldRule); - const newSource = - compareMethod === DiffMethod.JSON && typeof newRule === 'object' - ? newRule - : sortAndStringifyJson(newRule); + const newSrc = + diffMethod === DiffMethod.JSON && typeof newRule === 'object' + ? newRule + : sortAndStringifyJson(newRule); - const styles = useContext(CustomStylesContext); + return [oldSrc, newSrc]; + }, [oldRule, newRule, diffMethod]); return ( - <> - { - toggleSection('whole'); - }} - > - - - - + ); }; interface RuleDiffTabProps { oldRule: RuleResponse; newRule: RuleResponse; - fields: Partial; } -export const RuleDiffTabReactDiffViewerContinued = ({ - fields, - oldRule, - newRule, -}: RuleDiffTabProps) => { - const [openSections, setOpenSections] = useState>( - Object.keys(fields).reduce((sections, fieldName) => ({ ...sections, [fieldName]: true }), {}) - ); - - const toggleSection = (sectionName: string) => { - setOpenSections((prevOpenSections) => ({ - ...prevOpenSections, - [sectionName]: !prevOpenSections[sectionName], - })); - }; - +export const RuleDiffTabReactDiffViewerContinued = ({ oldRule, newRule }: RuleDiffTabProps) => { const options = [ { id: DiffMethod.CHARS, @@ -268,7 +134,7 @@ export const RuleDiffTabReactDiffViewerContinued = ({ }, ]; - const [compareMethod, setCompareMethod] = useState(DiffMethod.CHARS); + const [compareMethod, setCompareMethod] = useState(DiffMethod.JSON); return ( <> @@ -284,17 +150,11 @@ export const RuleDiffTabReactDiffViewerContinued = ({ }} /> - + - - + - + ); }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/translations.ts index b1d3af9321429..1d159bf24a392 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/translations.ts @@ -21,13 +21,6 @@ export const INVESTIGATION_GUIDE_TAB_LABEL = i18n.translate( } ); -export const DIFF_TAB_LABEL = i18n.translate( - 'xpack.securitySolution.detectionEngine.ruleDetails.diffTabLabel', - { - defaultMessage: 'Updates', - } -); - export const DISMISS_BUTTON_LABEL = i18n.translate( 'xpack.securitySolution.detectionEngine.ruleDetails.dismissButtonLabel', { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx index 06ec74fb30c95..697d6833ebaff 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx @@ -32,13 +32,11 @@ import * as i18n from './translations'; import { MlJobUpgradeModal } from '../../../../../detections/components/modals/ml_job_upgrade_modal'; -// import { RuleDiffTab } from '../../../../rule_management/components/rule_details/rule_diff_tab'; import { RuleDiffTabAppExperienceTeamPoc } from '../../../../rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc'; import { RuleDiffTabReactDiffViewerContinued } from '../../../../rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued'; import { RuleDiffTabReactDiffView } from '../../../../rule_management/components/rule_details/rule_diff_tab_react_diff_view'; import { RuleDiffTabMonaco } from '../../../../rule_management/components/rule_details/rule_diff_tab_monaco'; import { RuleDiffTabDiff2Html } from '../../../../rule_management/components/rule_details/rule_diff_tab_diff2html'; -// import * as ruleDetailsI18n from '../../../../rule_management/components/rule_details/translations.ts'; export interface UpgradePrebuiltRulesTableState { /** @@ -315,7 +313,6 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ ), @@ -329,7 +326,6 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ ), @@ -343,7 +339,6 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ ), @@ -357,7 +352,6 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ ), @@ -371,7 +365,6 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ ), From 1190045299de4f33f38d1eda2113672bb3498eb0 Mon Sep 17 00:00:00 2001 From: Georgii Gorbachev Date: Wed, 29 Nov 2023 03:51:43 +0100 Subject: [PATCH 9/9] Keep only react-diff-viewer-continued --- package.json | 8 - .../shared-ux/code_editor/code_editor.tsx | 42 +- ...e_diff_tab_react_diff_viewer_continued.tsx | 4 +- .../rule_details/mark_edits_by_word.tsx | 241 --------- .../rule_diff_tab_app_experience_team_poc.tsx | 154 ------ .../rule_details/rule_diff_tab_diff2html.tsx | 55 --- .../rule_details/rule_diff_tab_monaco.tsx | 57 --- .../rule_diff_tab_react_diff_view.tsx | 459 ------------------ .../components/rule_details/unidiff.d.ts | 16 - .../upgrade_prebuilt_rules_table_context.tsx | 73 +-- yarn.lock | 160 +----- 11 files changed, 31 insertions(+), 1238 deletions(-) rename x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/{ => json_diff}/rule_diff_tab_react_diff_viewer_continued.tsx (95%) delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/mark_edits_by_word.tsx delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/unidiff.d.ts diff --git a/package.json b/package.json index 3d3e286079c9f..677575fed98ef 100644 --- a/package.json +++ b/package.json @@ -910,9 +910,6 @@ "deep-freeze-strict": "^1.1.1", "deepmerge": "^4.2.2", "del": "^6.1.0", - "diff-match-patch": "^1.0.5", - "diff-match-patch-line-and-word": "^0.1.3", - "diff2html": "^3.4.45", "elastic-apm-node": "^4.1.0", "email-addresses": "^5.0.0", "execa": "^5.1.1", @@ -1020,13 +1017,10 @@ "react": "^17.0.2", "react-ace": "^7.0.5", "react-color": "^2.13.8", - "react-diff-view": "^3.2.0", - "react-diff-viewer": "^3.1.1", "react-diff-viewer-continued": "^3.3.1", "react-dom": "^17.0.2", "react-dropzone": "^4.2.9", "react-fast-compare": "^2.0.4", - "react-gh-like-diff": "^2.0.2", "react-grid-layout": "^1.3.4", "react-hook-form": "^7.44.2", "react-intl": "^2.8.0", @@ -1084,7 +1078,6 @@ "type-detect": "^4.0.8", "typescript-fsa": "^3.0.0", "typescript-fsa-reducers": "^1.2.2", - "unidiff": "^1.0.4", "unified": "9.2.2", "use-resize-observer": "^9.1.0", "usng.js": "^0.4.5", @@ -1340,7 +1333,6 @@ "@types/dedent": "^0.7.0", "@types/deep-freeze-strict": "^1.1.0", "@types/delete-empty": "^2.0.0", - "@types/diff": "^5.0.8", "@types/ejs": "^3.0.6", "@types/enzyme": "^3.10.12", "@types/eslint": "^8.44.2", diff --git a/packages/shared-ux/code_editor/code_editor.tsx b/packages/shared-ux/code_editor/code_editor.tsx index 1f5862a6112bf..e6d54ddbff04d 100644 --- a/packages/shared-ux/code_editor/code_editor.tsx +++ b/packages/shared-ux/code_editor/code_editor.tsx @@ -8,7 +8,7 @@ import React, { useState, useRef, useCallback, useMemo, useEffect, KeyboardEvent } from 'react'; import { useResizeDetector } from 'react-resize-detector'; -import ReactMonacoEditor, { MonacoDiffEditor } from 'react-monaco-editor'; +import ReactMonacoEditor from 'react-monaco-editor'; import { htmlIdGenerator, EuiToolTip, @@ -151,7 +151,6 @@ export const CodeEditor: React.FC = ({ }), isCopyable = false, allowFullScreen = false, - original, }) => { const { colorMode, euiTheme } = useEuiTheme(); const useDarkTheme = useDarkThemeProp ?? colorMode === 'DARK'; @@ -163,8 +162,6 @@ export const CodeEditor: React.FC = ({ typeof ReactMonacoEditor === 'function' && ReactMonacoEditor.name === 'JestMockEditor'; return isMockedComponent ? (ReactMonacoEditor as unknown as () => typeof ReactMonacoEditor)() - : original - ? MonacoDiffEditor : ReactMonacoEditor; }, []); @@ -389,27 +386,23 @@ export const CodeEditor: React.FC = ({ textboxMutationObserver.current.observe(textbox, { attributes: true }); } - if (editor.onKeyDown && editor.onDidBlurEditorText) { - editor.onKeyDown(onKeydownMonaco); - editor.onDidBlurEditorText(onBlurMonaco); - } + editor.onKeyDown(onKeydownMonaco); + editor.onDidBlurEditorText(onBlurMonaco); - if (editor.getContribution) { - // "widget" is not part of the TS interface but does exist - // @ts-expect-errors - const suggestionWidget = editor.getContribution('editor.contrib.suggestController')?.widget - ?.value; - - // As I haven't found official documentation for "onDidShow" and "onDidHide" - // we guard from possible changes in the underlying lib - if (suggestionWidget && suggestionWidget.onDidShow && suggestionWidget.onDidHide) { - suggestionWidget.onDidShow(() => { - isSuggestionMenuOpen.current = true; - }); - suggestionWidget.onDidHide(() => { - isSuggestionMenuOpen.current = false; - }); - } + // "widget" is not part of the TS interface but does exist + // @ts-expect-errors + const suggestionWidget = editor.getContribution('editor.contrib.suggestController')?.widget + ?.value; + + // As I haven't found official documentation for "onDidShow" and "onDidHide" + // we guard from possible changes in the underlying lib + if (suggestionWidget && suggestionWidget.onDidShow && suggestionWidget.onDidHide) { + suggestionWidget.onDidShow(() => { + isSuggestionMenuOpen.current = true; + }); + suggestionWidget.onDidHide(() => { + isSuggestionMenuOpen.current = false; + }); } editorDidMount?.(editor); @@ -479,7 +472,6 @@ export const CodeEditor: React.FC = ({ Change[]; - diffWords: (oldStr: string, newStr: string) => Change[]; - diffWordsWithSpace: (oldStr: string, newStr: string) => Change[]; - diffLines: (oldStr: string, newStr: string) => Change[]; - diffTrimmedLines: (oldStr: string, newStr: string) => Change[]; - diffSentences: (oldStr: string, newStr: string) => Change[]; - diffCss: (oldStr: string, newStr: string) => Change[]; - diffJson: (oldObject: Record, newObject: Record) => Change[]; -} - -const jsDiff: JsDiff = diff; - -export enum DiffMethod { - CHARS = 'diffChars', - WORDS = 'diffWords', - WORDS_WITH_SPACE = 'diffWordsWithSpace', - LINES = 'diffLines', - TRIMMED_LINES = 'diffTrimmedLines', - SENTENCES = 'diffSentences', - CSS = 'diffCss', - JSON = 'diffJson', - WORDS_CUSTOM_USING_DMP = 'diffWordsCustomUsingDmp', -} - -const { DIFF_EQUAL, DIFF_DELETE, DIFF_INSERT } = DiffMatchPatch; - -function findChangeBlocks(changes: ChangeData[]): ChangeData[][] { - const start = findIndex(changes, (change) => !isNormal(change)); - - if (start === -1) { - return []; - } - - const end = findIndex(changes, (change) => !!isNormal(change), start); - - if (end === -1) { - return [changes.slice(start)]; - } - - return [changes.slice(start, end), ...findChangeBlocks(changes.slice(end))]; -} - -function groupDiffs(diffs: Diff[]): [Diff[], Diff[]] { - return diffs.reduce<[Diff[], Diff[]]>( - // eslint-disable-next-line @typescript-eslint/no-shadow - ([oldDiffs, newDiffs], diff) => { - const [type] = diff; - - switch (type) { - case DIFF_INSERT: - newDiffs.push(diff); - break; - case DIFF_DELETE: - oldDiffs.push(diff); - break; - default: - oldDiffs.push(diff); - newDiffs.push(diff); - break; - } - - return [oldDiffs, newDiffs]; - }, - [[], []] - ); -} - -function splitDiffToLines(diffs: Diff[]): Diff[][] { - return diffs.reduce( - (lines, [type, value]) => { - const currentLines = value.split('\n'); - - const [currentLineRemaining, ...nextLines] = currentLines.map( - (line: string): Diff => [type, line] - ); - const next: Diff[][] = [ - ...lines.slice(0, -1), - [...lines[lines.length - 1], currentLineRemaining], - ...nextLines.map((line: string) => [line]), - ]; - return next; - }, - [[]] - ); -} - -function diffsToEdits(diffs: Diff[], lineNumber: number): RangeTokenNode[] { - const output = diffs.reduce<[RangeTokenNode[], number]>( - // eslint-disable-next-line @typescript-eslint/no-shadow - (output, diff) => { - const [edits, start] = output; - const [type, value] = diff; - if (type !== DIFF_EQUAL) { - const edit: RangeTokenNode = { - type: 'edit', - lineNumber, - start, - length: value.length, - }; - edits.push(edit); - } - - return [edits, start + value.length]; - }, - [[], 0] - ); - - return output[0]; -} - -function convertToLinesOfEdits(linesOfDiffs: Diff[][], startLineNumber: number) { - return flatMap(linesOfDiffs, (diffs, i) => diffsToEdits(diffs, startLineNumber + i)); -} - -/* - UPDATE: I figured that there's a way to do it without relying on "diff-match-patch-line-and-word". - See a new function "diffBy" below. Leaving this function here for comparison. -*/ -function diffByWord(x: string, y: string): [Diff[], Diff[]] { - /* - This is a modified version of "diffText" from react-diff-view. - Original: https://github.com/otakustay/react-diff-view/blob/49cebd0958ef323c830395c1a1da601560a71781/src/tokenize/markEdits.ts#L96 - */ - const dmp = new DiffMatchPatch(); - /* - "diff_wordMode" comes from "diff-match-patch-line-and-word". - "diff-match-patch-line-and-word" adds word-level diffing to Google's "diff-match-patch" lib by - adding a new method "diff_wordMode" to the prototype of DiffMatchPatch. - There's an instruction how to do it in the "diff-match-patch" docs and somebody just made it into a package. - https://github.com/google/diff-match-patch/wiki/Line-or-Word-Diffs#word-mode - */ - const diffs = dmp.diff_wordMode(x, y); - - if (diffs.length <= 1) { - return [[], []]; - } - - return groupDiffs(diffs); -} - -function diffBy(diffMethod: DiffMethod, x: string, y: string): [Diff[], Diff[]] { - const jsDiffChanges: Change[] = jsDiff[diffMethod](x, y); - const diffs: Diff[] = diff.convertChangesToDMP(jsDiffChanges); - - if (diffs.length <= 1) { - return [[], []]; - } - - return groupDiffs(diffs); -} - -function diffChangeBlock( - changes: ChangeData[], - diffMethod: DiffMethod -): [RangeTokenNode[], RangeTokenNode[]] { - /* Convert ChangeData array to two strings representing old source and new source of a change block, like - - "created_at": "2023-11-20T16:47:52.801Z", - "created_by": "elastic", - ... - - and - - "created_at": "1970-01-01T00:00:00.000Z", - "created_by": "", - ... - */ - const [oldSource, newSource] = changes.reduce( - // eslint-disable-next-line @typescript-eslint/no-shadow - ([oldSource, newSource], change) => - isDelete(change) - ? [oldSource + (oldSource ? '\n' : '') + change.content, newSource] - : [oldSource, newSource + (newSource ? '\n' : '') + change.content], - ['', ''] - ); - - const [oldDiffs, newDiffs] = - diffMethod === DiffMethod.WORDS_CUSTOM_USING_DMP // <-- That's basically the only change I made to allow word-level diffing - ? diffByWord(oldSource, newSource) - : diffBy(diffMethod, oldSource, newSource); - - if (oldDiffs.length === 0 && newDiffs.length === 0) { - return [[], []]; - } - - const getLineNumber = (change: ChangeData | undefined) => { - if (!change || isNormal(change)) { - return undefined; - } - - return change.lineNumber; - }; - const oldStartLineNumber = getLineNumber(changes.find(isDelete)); - const newStartLineNumber = getLineNumber(changes.find(isInsert)); - - if (oldStartLineNumber === undefined || newStartLineNumber === undefined) { - throw new Error('Could not find start line number for edit'); - } - - const oldEdits = convertToLinesOfEdits(splitDiffToLines(oldDiffs), oldStartLineNumber); - const newEdits = convertToLinesOfEdits(splitDiffToLines(newDiffs), newStartLineNumber); - - return [oldEdits, newEdits]; -} - -export function markEditsBy(hunks: HunkData[], diffMethod: DiffMethod): TokenizeEnhancer { - const changeBlocks = flatMap( - hunks.map((hunk) => hunk.changes), - findChangeBlocks - ); - - const [oldEdits, newEdits] = changeBlocks - .map((changes) => diffChangeBlock(changes, diffMethod)) - .reduce( - // eslint-disable-next-line @typescript-eslint/no-shadow - ([oldEdits, newEdits], [currentOld, currentNew]) => [ - oldEdits.concat(currentOld), - newEdits.concat(currentNew), - ], - [[], []] - ); - - return pickRanges(flatten(oldEdits), flatten(newEdits)); -} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx deleted file mode 100644 index 474933a4ec970..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc.tsx +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useMemo } from 'react'; -import { css } from '@emotion/react'; -import { euiThemeVars } from '@kbn/ui-theme'; -import type { Change } from 'diff'; -import { diffLines } from 'diff'; -import { EuiSpacer, useEuiBackgroundColor, tint } from '@elastic/eui'; -import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; -import { sortAndStringifyJson } from './json_diff/sort_stringify_json'; - -interface RuleDiffTabProps { - oldRule: RuleResponse; - newRule: RuleResponse; -} - -export const RuleDiffTabAppExperienceTeamPoc = ({ oldRule, newRule }: RuleDiffTabProps) => { - const diff = useDiff(oldRule, newRule); - - return ( - <> - - {diff.map((change, i) => ( - - ))} - - ); -}; - -const useDiff = (oldRule: RuleResponse, newRule: RuleResponse) => { - const memoizedDiff = useMemo(() => { - const oldSource = sortAndStringifyJson(oldRule); - const newSource = sortAndStringifyJson(newRule); - - return diffLines(JSON.stringify(oldSource), JSON.stringify(newSource), { - ignoreWhitespace: false, - }); - }, [oldRule, newRule]); - - return memoizedDiff; -}; - -// ------------------------------------------------------------------------------------------------- -// DiffSegment component - -const indicatorCss = css` - position: absolute; - width: ${euiThemeVars.euiSizeS}; - height: 100%; - margin-left: calc(-${euiThemeVars.euiSizeS} - calc(${euiThemeVars.euiSizeXS} / 2)); - text-align: center; - line-height: ${euiThemeVars.euiFontSizeM}; - font-weight: ${euiThemeVars.euiFontWeightMedium}; -`; - -const matchIndicatorCss = css` - &:before { - content: '+'; - ${indicatorCss} - background-color: ${euiThemeVars.euiColorSuccess}; - color: ${euiThemeVars.euiColorLightestShade}; - } -`; - -const diffIndicatorCss = css` - &:before { - content: '-'; - ${indicatorCss} - background-color: ${tint(euiThemeVars.euiColorDanger, 0.25)}; - color: ${euiThemeVars.euiColorLightestShade}; - } -`; - -const DiffSegment = ({ - change, - diffMode, - showDiffDecorations, -}: { - change: Change; - diffMode: 'lines' | undefined; - showDiffDecorations: boolean | undefined; -}) => { - const matchBackgroundColor = useEuiBackgroundColor('success'); - const diffBackgroundColor = useEuiBackgroundColor('danger'); - - const matchCss = { - backgroundColor: matchBackgroundColor, - color: euiThemeVars.euiColorSuccessText, - }; - - const diffCss = { - backgroundColor: diffBackgroundColor, - color: euiThemeVars.euiColorDangerText, - }; - - const highlightCss = change.added ? matchCss : change.removed ? diffCss : undefined; - - const paddingCss = useMemo(() => { - if (diffMode === 'lines') { - return css` - padding-left: calc(${euiThemeVars.euiSizeXS} / 2); - `; - } - }, [diffMode]); - - const decorationCss = useMemo(() => { - if (!showDiffDecorations) { - return undefined; - } - - if (diffMode === 'lines') { - if (change.added) { - return matchIndicatorCss; - } else if (change.removed) { - return diffIndicatorCss; - } - } else { - if (change.added) { - return css` - text-decoration: underline; - `; - } else if (change.removed) { - return css` - text-decoration: line-through; - `; - } - } - }, [change.added, change.removed, diffMode, showDiffDecorations]); - - return ( -
- {change.value} -
- ); -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx deleted file mode 100644 index e2c669c4c967e..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_diff2html.tsx +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useMemo } from 'react'; -import * as Diff2Html from 'diff2html'; -import { formatLines, diffLines } from 'unidiff'; -import 'diff2html/bundles/css/diff2html.min.css'; -import { EuiSpacer } from '@elastic/eui'; -import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; -import { sortAndStringifyJson } from './json_diff/sort_stringify_json'; - -interface RuleDiffTabProps { - oldRule: RuleResponse; - newRule: RuleResponse; -} - -export const RuleDiffTabDiff2Html = ({ oldRule, newRule }: RuleDiffTabProps) => { - const diffHtml = useDiffHtml(oldRule, newRule); - - return ( - <> - -
- - ); -}; - -const useDiffHtml = (oldRule: RuleResponse, newRule: RuleResponse): string => { - const memoizedDiffHtml = useMemo(() => { - const unifiedDiffString = formatLines( - diffLines(sortAndStringifyJson(oldRule), sortAndStringifyJson(newRule)), - { context: 3 } - ); - - return Diff2Html.html(unifiedDiffString, { - inputFormat: 'json', - drawFileList: false, - fileListToggle: false, - fileListStartVisible: false, - fileContentToggle: false, - matching: 'lines', // "lines" or "words" - diffStyle: 'word', // "word" or "char" - outputFormat: 'side-by-side', - synchronisedScroll: true, - highlight: true, - renderNothingWhenEmpty: false, - }); - }, [oldRule, newRule]); - - return memoizedDiffHtml; -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx deleted file mode 100644 index 98e2926256452..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_monaco.tsx +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useMemo } from 'react'; -import { CodeEditorField } from '@kbn/kibana-react-plugin/public'; -import { XJsonLang } from '@kbn/monaco'; -import { EuiSpacer } from '@elastic/eui'; -import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; -import { sortAndStringifyJson } from './json_diff/sort_stringify_json'; - -interface RuleDiffTabProps { - oldRule: RuleResponse; - newRule: RuleResponse; -} - -export const RuleDiffTabMonaco = ({ oldRule, newRule }: RuleDiffTabProps) => { - const [oldRuleString, newRuleString] = useMemo(() => { - return [sortAndStringifyJson(oldRule), sortAndStringifyJson(newRule)]; - }, [oldRule, newRule]); - - return ( - <> - - - - ); -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx deleted file mode 100644 index 4d4d20fc20778..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab_react_diff_view.tsx +++ /dev/null @@ -1,459 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useState, useMemo, useCallback } from 'react'; -import type { ReactElement } from 'react'; -import { css, Global } from '@emotion/react'; -import { - Diff, - Hunk, - useSourceExpansion, - useMinCollapsedLines, - Decoration, - getCollapsedLinesCountBetween, - parseDiff, - tokenize, - markEdits, -} from 'react-diff-view'; -import 'react-diff-view/style/index.css'; -import type { RenderGutter, HunkData, DecorationProps, TokenizeOptions } from 'react-diff-view'; -import unidiff from 'unidiff'; -import { EuiSpacer, EuiIcon, EuiLink, useEuiTheme, EuiSwitch, EuiRadioGroup } from '@elastic/eui'; -import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema/rule_schemas.gen'; -import { markEditsBy, DiffMethod } from './mark_edits_by_word'; -import { sortAndStringifyJson } from './json_diff/sort_stringify_json'; - -interface UnfoldProps extends Omit { - start: number; - end: number; - direction: 'up' | 'down' | 'none'; - onExpand: (start: number, end: number) => void; -} - -function Unfold({ start, end, direction, onExpand, ...props }: UnfoldProps) { - const expand = useCallback(() => onExpand(start, end), [onExpand, start, end]); - - const linesCount = end - start; - - const iconType = { - up: 'sortUp', - down: 'sortDown', - none: 'sortable', - }; - - return ( - - - - {`Expand ${linesCount}${direction !== 'none' ? ' more' : ''} hidden line${ - linesCount > 1 ? 's' : '' - }`} - - - ); -} - -interface UnfoldCollapsedProps { - previousHunk: HunkData; - currentHunk?: HunkData; - linesCount: number; - onExpand: (start: number, end: number) => void; -} - -function UnfoldCollapsed({ - previousHunk, - currentHunk, - linesCount, - onExpand, -}: UnfoldCollapsedProps) { - if (!currentHunk) { - const nextStart = previousHunk.oldStart + previousHunk.oldLines; - const collapsedLines = linesCount - nextStart + 1; - - if (collapsedLines <= 0) { - return null; - } - - return ( - <> - {collapsedLines > 10 && ( - - )} - - - ); - } - - const collapsedLines = getCollapsedLinesCountBetween(previousHunk, currentHunk); - - if (!previousHunk) { - if (!collapsedLines) { - return null; - } - - const start = Math.max(currentHunk.oldStart - 10, 1); - - return ( - <> - - {collapsedLines > 10 && ( - - )} - - ); - } - - const collapsedStart = previousHunk.oldStart + previousHunk.oldLines; - const collapsedEnd = currentHunk.oldStart; - - if (collapsedLines < 10) { - return ( - - ); - } - - return ( - <> - - - - - ); -} - -const useExpand = (hunks: HunkData[], oldSource: string, newSource: string) => { - // useMemo(() => {}, [oldSource, newSource]); - const [hunksWithSourceExpanded, expandRange] = useSourceExpansion(hunks, oldSource); // Operates on hunks to allow "expansion" behaviour - substitutes two hunks with one hunk including data from two hunks and everything in between - const hunksWithMinLinesCollapsed = useMinCollapsedLines(0, hunksWithSourceExpanded, oldSource); - - return { - expandRange, - hunks: hunksWithMinLinesCollapsed, - }; -}; - -const useTokens = (hunks: HunkData[], diffMethod: DiffMethod, oldSource: string) => { - if (!hunks) { - return undefined; - } - - const options: TokenizeOptions = { - oldSource, - highlight: false, - enhancers: [ - /* - "markEditsBy" is a slightly modified version of "markEdits" enhancer from react-diff-view - to enable word-level highlighting. - */ - diffMethod === DiffMethod.CHARS - ? markEdits(hunks, { type: 'block' }) // Using built-in "markEdits" enhancer for char-level diffing - : markEditsBy(hunks, diffMethod), // Using custom "markEditsBy" enhancer for other-level diffing - ], - }; - - try { - /* - Synchroniously applies all the enhancers to the hunks and returns an array of tokens. - There's also a way to use a web worker to tokenize in a separate thread. - Example can be found here: https://github.com/otakustay/react-diff-view/blob/49cebd0958ef323c830395c1a1da601560a71781/site/components/DiffView/index.tsx#L43 - It didn't work for me right away, but theoretically the possibility is there. - */ - return tokenize(hunks, options); - } catch (ex) { - return undefined; - } -}; - -const convertToDiffFile = (oldSource: string, newSource: string) => { - /* - "diffLines" call below converts two strings of text into an array of Change objects. - Change objects look like this: - [ - ... - { - "count": 2, - "removed": true, - "value": "\"from\": \"now-540s\"" - }, - { - "count": 1, - "added": true, - "value": "\"from\": \"now-9m\"" - }, - ... - ] - - "formatLines" takes an array of Change objects and turns it into one big "unified Git diff" string. - Unified Git diff is a string with Git markers added. Looks something like this: - ` - @@ -3,16 +3,15 @@ - "author": ["Elastic"], - - "from": "now-540s", - + "from": "now-9m", - "history_window_start": "now-14d", - ` - */ - - const unifiedDiff: string = unidiff.formatLines(unidiff.diffLines(oldSource, newSource), { - context: 3, - }); - - /* - "parseDiff" converts a unified diff string into a JSDiff File object. - */ - const [diffFile] = parseDiff(unifiedDiff, { - nearbySequences: 'zip', - }); - /* - File object contains some metadata and the "hunks" property - an array of Hunk objects. - At this stage Hunks represent changed lines of code plus a few unchanged lines above and below for context. - Hunk objects look like this: - [ - ... - { - content: ' "from": "now-9m",' - isInsert: true, - lineNumber: 14, - type: "insert" - }, - { - content: ' "from": "now-540s",' - isDelete: true, - lineNumber: 15, - type: "delete" - }, - ... - ] - */ - - return diffFile; -}; - -interface DiffViewProps { - oldSource: string; - newSource: string; - diffMethod: DiffMethod; -} - -interface HunksProps { - hunks: HunkData[]; - oldSource: string; - expandRange: (start: number, end: number) => void; -} - -const Hunks = ({ hunks, oldSource, expandRange }: HunksProps) => { - const linesCount = oldSource.split('\n').length; - - const hunkElements = hunks.reduce((children: ReactElement[], hunk: HunkData, index: number) => { - const previousElement = children[children.length - 1]; - - children.push( - - ); - - children.push(); - - const isLastHunk = index === hunks.length - 1; - if (isLastHunk && oldSource) { - children.push( - - ); - } - - return children; - }, []); - - return <>{hunkElements}; -}; - -const CODE_CLASS_NAME = 'rule-update-diff-code'; -const GUTTER_CLASS_NAME = 'rule-update-diff-gutter'; - -interface CustomStylesProps { - children: React.ReactNode; -} - -const CustomStyles = ({ children }: CustomStylesProps) => { - const { euiTheme } = useEuiTheme(); - const [enabled, setEnabled] = useState(false); - - const customCss = css` - .${CODE_CLASS_NAME}.diff-code, .${GUTTER_CLASS_NAME}.diff-gutter { - background: transparent; - } - - .${CODE_CLASS_NAME}.diff-code-delete .diff-code-edit, - .${CODE_CLASS_NAME}.diff-code-insert .diff-code-edit { - background: transparent; - } - - .${CODE_CLASS_NAME}.diff-code-delete .diff-code-edit { - color: ${euiTheme.colors.dangerText}; - text-decoration: line-through; - } - - .${CODE_CLASS_NAME}.diff-code-insert .diff-code-edit { - color: ${euiTheme.colors.successText}; - } - `; - - return ( - <> - {enabled && } - { - setEnabled(!enabled); - }} - /> - - {children} - - ); -}; - -function DiffView({ oldSource, newSource, diffMethod }: DiffViewProps) { - /* - "react-diff-view" components consume diffs not as a strings, but as something they call "hunks". - So we first need to convert our "before" and "after" strings into these "hunks". - "hunks" are objects describing changed sections of code plus a few unchanged lines above and below for context. - */ - - /* - "diffFile" is essentially an object containing "hunks" and some metadata. - */ - const diffFile = useMemo(() => convertToDiffFile(oldSource, newSource), [oldSource, newSource]); - - /* - Sections of diff without changes are hidden by default, because they are not present in the "hunks" array. - - "useExpand" allows to show these hidden sections when user clicks on "Expand hidden lines" button. - - "expandRange" basically merges two hunks into one: takes first hunk, appends all the lines between it and the second hunk and finally appends the second hunk. - - returned "hunks" is the resulting array of hunks with hidden section expanded. - */ - const { expandRange, hunks } = useExpand(diffFile.hunks, oldSource, newSource); - - /* - Here we go over each hunk and extract tokens from it. For example, splitting strings into words, - so we can later highlight changes on a word-by-word basis vs line-by-line. - */ - const tokens = useTokens(hunks, diffMethod, oldSource); - - return ( - - {/* eslint-disable-next-line @typescript-eslint/no-shadow */} - {(hunks) => } - - ); -} - -const renderGutter: RenderGutter = ({ change }) => { - /* - Custom gutter (a column where you normally see line numbers). - Here's I am returning "+" or "-" so the diff is more readable by colorblind people. - */ - if (change.type === 'insert') { - return '+'; - } - - if (change.type === 'delete') { - return '-'; - } - - if (change.type === 'normal') { - return null; - } -}; - -interface RuleDiffTabProps { - oldRule: RuleResponse; - newRule: RuleResponse; -} - -export const RuleDiffTabReactDiffView = ({ oldRule, newRule }: RuleDiffTabProps) => { - const options = [ - { - id: DiffMethod.CHARS, - label: 'Chars', - }, - { - id: DiffMethod.WORDS, - label: 'Words', - }, - { - id: DiffMethod.WORDS_CUSTOM_USING_DMP, - label: 'Words, alternative method (using "diff-match-patch" library)', - }, - { - id: DiffMethod.LINES, - label: 'Lines', - }, - { - id: DiffMethod.SENTENCES, - label: 'Sentences', - }, - ]; - - const [diffMethod, setDiffMethod] = useState(DiffMethod.CHARS); - - const [oldSource, newSource] = useMemo(() => { - return [sortAndStringifyJson(oldRule), sortAndStringifyJson(newRule)]; - }, [oldRule, newRule]); - - return ( - <> - - { - setDiffMethod(optionId as DiffMethod); - }} - legend={{ - children: {'Diffing algorthm'}, - }} - /> - - - - - - ); -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/unidiff.d.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/unidiff.d.ts deleted file mode 100644 index 0ae55f9542bcb..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/unidiff.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -declare module 'unidiff' { - export interface FormatOptions { - context?: number; - } - - export function diffLines(x: string, y: string): string[]; - - export function formatLines(line: string[], options?: FormatOptions): string; -} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx index 697d6833ebaff..0b2092385e173 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx @@ -32,11 +32,7 @@ import * as i18n from './translations'; import { MlJobUpgradeModal } from '../../../../../detections/components/modals/ml_job_upgrade_modal'; -import { RuleDiffTabAppExperienceTeamPoc } from '../../../../rule_management/components/rule_details/rule_diff_tab_app_experience_team_poc'; -import { RuleDiffTabReactDiffViewerContinued } from '../../../../rule_management/components/rule_details/rule_diff_tab_react_diff_viewer_continued'; -import { RuleDiffTabReactDiffView } from '../../../../rule_management/components/rule_details/rule_diff_tab_react_diff_view'; -import { RuleDiffTabMonaco } from '../../../../rule_management/components/rule_details/rule_diff_tab_monaco'; -import { RuleDiffTabDiff2Html } from '../../../../rule_management/components/rule_details/rule_diff_tab_diff2html'; +import { RuleDiffTabReactDiffViewerContinued } from '../../../../rule_management/components/rule_details/json_diff/rule_diff_tab_react_diff_viewer_continued'; export interface UpgradePrebuiltRulesTableState { /** @@ -266,8 +262,6 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ actions, ]); - // console.log('ReactDiffViewer pre', ReactDiffViewer); - return ( <> @@ -299,9 +293,7 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ } getRuleTabs={(rule, defaultTabs) => { const activeRule = filteredRules.find(({ id }) => rule.id); - const diff = activeRule?.diff; - - if (!diff) { + if (!activeRule) { return defaultTabs; } @@ -318,66 +310,7 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ ), }; - const diffTabReactDiffView = { - id: 'react-diff-view', - name: 'react-diff-view', - content: ( - - - - ), - }; - - const diffTabMonaco = { - id: 'monaco', - name: 'monaco', - content: ( - - - - ), - }; - - const diffTabDiff2Html = { - id: 'diff2html', - name: 'diff2html', - content: ( - - - - ), - }; - - const diffTabAppExperienceTeamPoc = { - id: 'app-experience-team-poc', - name: 'app-experience-team-poc', - content: ( - - - - ), - }; - - return [ - diffTabReactDiffViewerContinued, - diffTabReactDiffView, - diffTabMonaco, - diffTabDiff2Html, - diffTabAppExperienceTeamPoc, - ...defaultTabs, - ]; + return [diffTabReactDiffViewerContinued, ...defaultTabs]; }} /> )} diff --git a/yarn.lock b/yarn.lock index b639e0bd2063c..bc958e8e1c98f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1876,18 +1876,7 @@ "@emotion/utils" "0.11.3" babel-plugin-emotion "^10.0.27" -"@emotion/css@^11.11.0": - version "11.11.0" - resolved "https://registry.yarnpkg.com/@emotion/css/-/css-11.11.0.tgz#dad6a27a77d5e5cbb0287674c3ace76d762563ca" - integrity sha512-m4g6nKzZyiKyJ3WOfdwrBdcujVcpaScIWHAnyNKPm/A/xJKwfXPfQAbEVi1kgexWTDakmg+r2aDj0KvnMTo4oQ== - dependencies: - "@emotion/babel-plugin" "^11.11.0" - "@emotion/cache" "^11.11.0" - "@emotion/serialize" "^1.1.2" - "@emotion/sheet" "^1.2.2" - "@emotion/utils" "^1.2.1" - -"@emotion/css@^11.11.2": +"@emotion/css@^11.11.0", "@emotion/css@^11.11.2": version "11.11.2" resolved "https://registry.yarnpkg.com/@emotion/css/-/css-11.11.2.tgz#e5fa081d0c6e335352e1bc2b05953b61832dca5a" integrity sha512-VJxe1ucoMYMS7DkiMdC2T7PWNbrEI0a39YRiyDvK2qq4lXwjRbVP/z4lpG+odCsRzadlR+1ywwrTzhdm5HNdew== @@ -8975,11 +8964,6 @@ resolved "https://registry.yarnpkg.com/@types/delete-empty/-/delete-empty-2.0.0.tgz#1647ae9e68f708a6ba778531af667ec55bc61964" integrity sha512-sq+kwx8zA9BSugT9N+Jr8/uWjbHMZ+N/meJEzRyT3gmLq/WMtx/iSIpvdpmBUi/cvXl6Kzpvve8G2ESkabFwmg== -"@types/diff@^5.0.8": - version "5.0.8" - resolved "https://registry.yarnpkg.com/@types/diff/-/diff-5.0.8.tgz#28dc501cc3e7c62d4c5d096afe20755170acf276" - integrity sha512-kR0gRf0wMwpxQq6ME5s+tWk9zVCfJUl98eRkD05HWWRbhPB/eu4V1IbyZAsvzC1Gn4znBJ0HN01M4DGXdBEV8Q== - "@types/ejs@^3.0.6": version "3.0.6" resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.0.6.tgz#aca442289df623bfa8e47c23961f0357847b83fe" @@ -13640,16 +13624,6 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-emotion@^10.0.14, create-emotion@^10.0.27: - version "10.0.27" - resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-10.0.27.tgz#cb4fa2db750f6ca6f9a001a33fbf1f6c46789503" - integrity sha512-fIK73w82HPPn/RsAij7+Zt8eCE8SptcJ3WoRMfxMtjteYxud8GDTKKld7MYwAX2TVhrw29uR1N/bVGxeStHILg== - dependencies: - "@emotion/cache" "^10.0.27" - "@emotion/serialize" "^0.11.15" - "@emotion/sheet" "0.9.4" - "@emotion/utils" "0.11.3" - create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -14894,12 +14868,7 @@ diacritics@^1.3.0: resolved "https://registry.yarnpkg.com/diacritics/-/diacritics-1.3.0.tgz#3efa87323ebb863e6696cebb0082d48ff3d6f7a1" integrity sha1-PvqHMj67hj5mls67AILUj/PW96E= -diff-match-patch-line-and-word@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/diff-match-patch-line-and-word/-/diff-match-patch-line-and-word-0.1.3.tgz#0f267c26ab7840785667cccd8c9dc1fb8b288964" - integrity sha512-CR+842NECOQO9qOvlyOf/9IAXMEW8km1Em9YrH8J4wVaeICXtEVJ8H9AZ5Xa0QBTSZUe4DFijGM5dZD5Dl3bEg== - -diff-match-patch@^1.0.0, diff-match-patch@^1.0.4, diff-match-patch@^1.0.5: +diff-match-patch@^1.0.0, diff-match-patch@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37" integrity sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw== @@ -14919,26 +14888,11 @@ diff-sequences@^29.4.3: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2" integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== -diff2html@^3.1.6, diff2html@^3.4.45: - version "3.4.45" - resolved "https://registry.yarnpkg.com/diff2html/-/diff2html-3.4.45.tgz#6b8cc7af9bb18359635527e5128f40cf3d34ef94" - integrity sha512-1SxsjYZYbxX0GGMYJJM7gM0SpMSHqzvvG0UJVROCDpz4tylH2T+EGiinm2boDmTrMlLueVxGfKNxGNLZ9zDlkQ== - dependencies: - diff "5.1.0" - hogan.js "3.0.2" - optionalDependencies: - highlight.js "11.8.0" - -diff@5.0.0, diff@^5.0.0: +diff@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== -diff@5.1.0, diff@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" - integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== - diff@^1.3.2: version "1.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" @@ -14954,6 +14908,11 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +diff@^5.0.0, diff@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" + integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== + diffie-hellman@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" @@ -14963,13 +14922,6 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" -difflib@^0.2.4: - version "0.2.4" - resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" - integrity sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w== - dependencies: - heap ">= 0.2.0" - digest-fetch@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/digest-fetch/-/digest-fetch-1.3.0.tgz#898e69264d00012a23cf26e8a3e40320143fc661" @@ -15446,14 +15398,6 @@ emoticon@^3.2.0: resolved "https://registry.yarnpkg.com/emoticon/-/emoticon-3.2.0.tgz#c008ca7d7620fac742fe1bf4af8ff8fed154ae7f" integrity sha512-SNujglcLTTg+lDAcApPNgEdudaqQFiAbJCqzjNxJkvN9vAwCGi0uu8IUVvx+f16h+V44KCY6Y2yboroc9pilHg== -emotion@^10.0.14: - version "10.0.27" - resolved "https://registry.yarnpkg.com/emotion/-/emotion-10.0.27.tgz#f9ca5df98630980a23c819a56262560562e5d75e" - integrity sha512-2xdDzdWWzue8R8lu4G76uWX5WhyQuzATon9LmNeCy/2BHVC6dsEpfhN1a0qhELgtDVdjyEA6J8Y/VlI5ZnaH0g== - dependencies: - babel-plugin-emotion "^10.0.27" - create-emotion "^10.0.27" - enabled@2.0.x: version "2.0.0" resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" @@ -17536,11 +17480,6 @@ git-hooks-list@1.0.3: resolved "https://registry.yarnpkg.com/git-hooks-list/-/git-hooks-list-1.0.3.tgz#be5baaf78203ce342f2f844a9d2b03dba1b45156" integrity sha512-Y7wLWcrLUXwk2noSka166byGCvhMtDRpgHdzCno1UQv/n/Hegp++a2xBWJL1lJarnKD3SWaljD+0z1ztqxuKyQ== -gitdiff-parser@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/gitdiff-parser/-/gitdiff-parser-0.3.1.tgz#5eb3e66eb7862810ba962fab762134071601baa5" - integrity sha512-YQJnY8aew65id8okGxKCksH3efDCJ9HzV7M9rsvd65habf39Pkh4cgYJ27AaoDMqo1X98pgNJhNMrm/kpV7UVQ== - github-from-package@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" @@ -18270,11 +18209,6 @@ he@1.2.0, he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -"heap@>= 0.2.0": - version "0.2.7" - resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" - integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== - heap@^0.2.6: version "0.2.6" resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" @@ -18285,11 +18219,6 @@ hexoid@^1.0.0: resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-1.0.0.tgz#ad10c6573fb907de23d9ec63a711267d9dc9bc18" integrity sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g== -highlight.js@11.8.0: - version "11.8.0" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.8.0.tgz#966518ea83257bae2e7c9a48596231856555bb65" - integrity sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg== - highlight.js@^10.1.1, highlight.js@~10.4.0: version "10.4.1" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.4.1.tgz#d48fbcf4a9971c4361b3f95f302747afe19dbad0" @@ -18328,14 +18257,6 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hogan.js@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/hogan.js/-/hogan.js-3.0.2.tgz#4cd9e1abd4294146e7679e41d7898732b02c7bfd" - integrity sha512-RqGs4wavGYJWE07t35JQccByczmNUXQT0E12ZYV1VKYu5UiAU9lsos/yBAcf840+zrUQQxgVduCR5/B8nNtibg== - dependencies: - mkdirp "0.3.0" - nopt "1.0.10" - hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.5, hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" @@ -21914,11 +21835,6 @@ memfs@^3.1.2, memfs@^3.4.3: resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== -memoize-one@^5.0.4: - version "5.2.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" - integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== - memoize-one@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" @@ -22367,11 +22283,6 @@ mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" - integrity sha512-OHsdUcVAQ6pOtg5JYWpCBo9W/GySVuwvP9hueRMW7UqshC0tbfzLv8wjySTPm3tfUZ/21CE9E1pJagOA91Pxew== - "mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" @@ -23063,13 +22974,6 @@ nodemailer@^6.6.2: resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.6.2.tgz#e184c9ed5bee245a3e0bcabc7255866385757114" integrity sha512-YSzu7TLbI+bsjCis/TZlAXBoM4y93HhlIgo0P5oiA2ua9Z4k+E2Fod//ybIzdJxOlXGRcHIh/WaeCBehvxZb/Q== -nopt@1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" - integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== - dependencies: - abbrev "1" - nopt@^4.0.1, nopt@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" @@ -25406,18 +25310,6 @@ react-colorful@^5.1.2: resolved "https://registry.yarnpkg.com/react-colorful/-/react-colorful-5.5.1.tgz#29d9c4e496f2ca784dd2bb5053a3a4340cfaf784" integrity sha512-M1TJH2X3RXEt12sWkpa6hLc/bbYS0H6F4rIqjQZ+RxNBstpY67d9TrFXtqdZwhpmBXcCwEi7stKqFue3ZRkiOg== -react-diff-view@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/react-diff-view/-/react-diff-view-3.2.0.tgz#8fbf04782d78423903a59202ce7533f6312c1cc3" - integrity sha512-p58XoqMxgt71ujpiDQTs9Za3nqTawt1E4bTzKsYSqr8I8br6cjQj1b66HxGnV8Yrc6MD6iQPqS1aZiFoGqEw+g== - dependencies: - classnames "^2.3.2" - diff-match-patch "^1.0.5" - gitdiff-parser "^0.3.1" - lodash "^4.17.21" - shallow-equal "^3.1.0" - warning "^4.0.3" - react-diff-viewer-continued@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/react-diff-viewer-continued/-/react-diff-viewer-continued-3.3.1.tgz#1ef6af86fc92ad721a5461f8f3c44f74381ea81d" @@ -25429,18 +25321,6 @@ react-diff-viewer-continued@^3.3.1: memoize-one "^6.0.0" prop-types "^15.8.1" -react-diff-viewer@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/react-diff-viewer/-/react-diff-viewer-3.1.1.tgz#21ac9c891193d05a3734bfd6bd54b107ee6d46cc" - integrity sha512-rmvwNdcClp6ZWdS11m1m01UnBA4OwYaLG/li0dB781e/bQEzsGyj+qewVd6W5ztBwseQ72pO7nwaCcq5jnlzcw== - dependencies: - classnames "^2.2.6" - create-emotion "^10.0.14" - diff "^4.0.1" - emotion "^10.0.14" - memoize-one "^5.0.4" - prop-types "^15.6.2" - react-docgen-typescript@^2.0.0, react-docgen-typescript@^2.1.1: version "2.2.2" resolved "https://registry.yarnpkg.com/react-docgen-typescript/-/react-docgen-typescript-2.2.2.tgz#4611055e569edc071204aadb20e1c93e1ab1659c" @@ -25554,16 +25434,6 @@ react-focus-on@^3.9.1: use-callback-ref "^1.3.0" use-sidecar "^1.1.2" -react-gh-like-diff@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/react-gh-like-diff/-/react-gh-like-diff-2.0.2.tgz#9a0f91511d7af20407666e5950d2056db0600d62" - integrity sha512-Cd5Kjijx74kz0POQNCSRvFnpfvY4E28NxWea8z0UPZ1J6b2RThRkMBfoD/FwaFvrT/7XeYk5SrQ8qtc0e8iRoA== - dependencies: - diff2html "^3.1.6" - difflib "^0.2.4" - prop-types "^15.7.2" - recompose "^0.30.0" - react-grid-layout@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/react-grid-layout/-/react-grid-layout-1.3.4.tgz#4fa819be24a1ba9268aa11b82d63afc4762a32ff" @@ -27322,11 +27192,6 @@ shallow-copy@~0.0.1: resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170" integrity sha1-QV9CcC1z2BAzApLMXuhurhoRoXA= -shallow-equal@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-3.1.0.tgz#e7a54bac629c7f248eff6c2f5b63122ba4320bec" - integrity sha512-pfVOw8QZIXpMbhBWvzBISicvToTiM5WBF1EeAUZDDSb5Dt29yl4AYbyywbJFSEsRUMr7gJaxqCdr4L3tQf9wVg== - shallowequal@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" @@ -29626,13 +29491,6 @@ unicode-trie@^2.0.0: pako "^0.2.5" tiny-inflate "^1.0.0" -unidiff@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unidiff/-/unidiff-1.0.4.tgz#45096a898285821c51e22e84be4215c05d6511cd" - integrity sha512-ynU0vsAXw0ir8roa+xPCUHmnJ5goc5BTM2Kuc3IJd8UwgaeRs7VSD5+eeaQL+xp1JtB92hu/Zy/Lgy7RZcr1pQ== - dependencies: - diff "^5.1.0" - unified@9.2.0: version "9.2.0" resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.0.tgz#67a62c627c40589edebbf60f53edfd4d822027f8" @@ -30642,7 +30500,7 @@ walker@^1.0.7, walker@^1.0.8, walker@~1.0.5: dependencies: makeerror "1.0.12" -warning@^4.0.2, warning@^4.0.3: +warning@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==